/* Settings Page Styles - Matching Dashboard Design System */
:root {
    --primary: #1a4b8c;
    --primary-light: #2a6bc5;
    --primary-dark: #0d2b56;
    --secondary: #28a745;
    --success: #20c997;
    --warning: #ffc107;
    --error: #dc3545;
    --info: #17a2b8;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-primary: linear-gradient(135deg, #1a4b8c 0%, #2a6bc5 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-warning: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    --gradient-error: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Settings Container */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Settings Sections */
.settings-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.settings-section:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.settings-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.settings-content {
    padding: 1.5rem;
}

/* Profile Picture Section - Improved Sizing */
.profile-picture-section {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.current-avatar {
    flex-shrink: 0;
    text-align: center;
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
    box-shadow: var(--shadow-md);
}

.profile-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    border: 4px solid var(--primary-light);
    box-shadow: var(--shadow-md);
}

.upload-form {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.file-upload {
    margin-bottom: 0;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    border: 1px solid var(--primary);
    text-decoration: none;
    justify-content: center;
    max-width: 250px;
}

.file-label:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design for Profile Picture */
@media (max-width: 768px) {
    .profile-picture-section {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1.5rem;
    }
    
    .profile-image,
    .profile-placeholder {
        width: 120px;
        height: 120px;
        font-size: 1.5rem;
    }
    
    .upload-form {
        width: 100%;
        align-items: center;
        min-width: auto;
    }
    
    .file-label {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .profile-image,
    .profile-placeholder {
        width: 100px;
        height: 100px;
        font-size: 1.25rem;
    }
    
    .upload-form {
        gap: 0.75rem;
    }
    
    .file-label {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 1200px) {
    .profile-image,
    .profile-placeholder {
        width: 160px;
        height: 160px;
        font-size: 2.25rem;
    }
}

/* Ensure proper alignment in user info sections */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-details h2 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
}

.user-details p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Mobile header specific styles */
.mobile-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
}

/* Main header styles */
.header {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Button adjustments for better mobile fit */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
    font-family: inherit;
    white-space: nowrap;
}

/* Mobile navigation adjustments */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem;
    z-index: 100;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    flex: 1;
    max-width: 80px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item i {
    font-size: 1.25rem;
}

/* Ensure content doesn't get hidden behind mobile nav */
.main-content {
    padding-bottom: 80px; /* Space for mobile navigation */
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .user-info {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .user-details h2 {
        font-size: 1.25rem;
    }
    
    .user-details p {
        font-size: 0.8rem;
    }
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--card-bg);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

.form-group small {
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

/* Button Styles - Matching Dashboard */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
    font-family: inherit;
    text-transform: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Security Section */
.security-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.security-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.security-details {
    flex: 1;
}

.security-details strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.security-details span {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Login History */
.login-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.login-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.login-info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.login-location,
.login-device,
.login-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.login-status {
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.login-status.success {
    background: rgba(32, 201, 151, 0.1);
    color: #059669;
    border: 1px solid rgba(32, 201, 151, 0.3);
}

.login-status.failed {
    background: rgba(220, 53, 69, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* No Data State */
.no-data {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

.no-data i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

/* Text Utilities */
.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

/* Alert Styles - Matching Dashboard Modals */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid transparent;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.alert-success {
    background: rgba(32, 201, 151, 0.05);
    color: #059669;
    border-left-color: var(--success);
    border-color: rgba(32, 201, 151, 0.2);
}

.alert-error {
    background: rgba(220, 53, 69, 0.05);
    color: #dc2626;
    border-left-color: var(--error);
    border-color: rgba(220, 53, 69, 0.2);
}

.alert i {
    font-size: 1.2rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.field-error {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-container {
        margin: 0;
        padding: 0 0.5rem;
    }
    
    .profile-picture-section {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1.5rem;
    }
    
    .upload-form {
        width: 100%;
        align-items: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .login-info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .security-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .security-details {
        text-align: center;
    }
    
    .login-item {
        flex-direction: column;
        gap: 1rem;
        text-align: left;
        align-items: flex-start;
    }
    
    .settings-content {
        padding: 1rem;
    }
    
    .settings-header {
        padding: 1rem;
    }
    
    .settings-header h3 {
        font-size: 1.1rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .settings-content {
        padding: 0.75rem;
    }
    
    .profile-image,
    .profile-placeholder {
        width: 100px;
        height: 100px;
        font-size: 1.25rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .file-label {
        width: 100%;
        justify-content: center;
    }
    
    .login-info {
        align-items: flex-start;
    }
    
    .login-location,
    .login-device,
    .login-time {
        justify-content: flex-start;
        width: 100%;
    }
    
    .login-status {
        align-self: flex-start;
    }
}

/* Animation for better UX */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-section {
    animation: fadeInUp 0.5s ease-out;
}

.settings-section:nth-child(1) { animation-delay: 0.1s; }
.settings-section:nth-child(2) { animation-delay: 0.2s; }
.settings-section:nth-child(3) { animation-delay: 0.3s; }
.settings-section:nth-child(4) { animation-delay: 0.4s; }
.settings-section:nth-child(5) { animation-delay: 0.5s; }

/* Focus states for accessibility */
.btn:focus,
.file-label:focus,
.form-group input:focus,
.form-group select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Section headers to match dashboard */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Card styles matching dashboard */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}