:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --secondary-light: #1e293b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gray-bg: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-bg);
    color: var(--dark);
    min-height: 100vh;
}

/* Navbar - Matching Admin Panel */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 8px;
    border: 1px solid var(--border);
    border-radius: 40px;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.nav-profile-btn:hover {
    background: var(--gray-bg);
    border-color: var(--gray-light);
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.nav-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background: #fee2e2;
    color: var(--danger);
    border-color: #fecaca;
}

.logout-btn svg {
    width: 16px;
    height: 16px;
}

/* Main Container */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

/* Card - Matching Admin Panel */
.settings-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Profile Header */
.profile-header {
    padding: 28px 28px 0;
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border);
}

.avatar-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.big-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    box-shadow: var(--shadow);
}

.avatar-edit {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.avatar-edit:hover {
    background: var(--gray-bg);
    transform: scale(1.05);
}

.avatar-edit svg {
    width: 14px;
    height: 14px;
    fill: var(--gray);
}

.profile-info {
    flex: 1;
    padding-bottom: 20px;
}

.profile-info h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.role-badge {
    background: #e6f0ff;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
}

.location-badge {
    color: var(--gray);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-badge i {
    font-size: 12px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    background: var(--white);
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 28px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Title */
.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
}

.form-field label i {
    margin-right: 6px;
    font-size: 12px;
    color: var(--primary);
}

.form-field input,
.form-field textarea,
.form-field select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 90px;
}

/* Password Field */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 42px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-light);
    padding: 4px;
}

.toggle-password:hover {
    color: var(--gray);
}

/* Strength Meter */
.strength-meter {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
}

.strength-text {
    font-size: 11px;
    color: var(--gray-light);
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.social-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.social-row:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.social-row i {
    width: 20px;
    color: var(--gray);
    font-size: 16px;
}

.social-row input {
    flex: 1;
    border: none;
    background: none;
    font-size: 13px;
    outline: none;
}

/* Button Row */
.button-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-bg);
    color: var(--dark);
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--border);
}

.save-feedback {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--success);
}

.save-feedback.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.save-feedback i {
    font-size: 14px;
}

/* Security Items */
.security-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 24px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.security-item:last-child {
    border-bottom: none;
}

.security-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: #e6f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.security-icon i {
    font-size: 20px;
    color: var(--primary);
}

.security-info {
    flex: 1;
}

.security-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.security-info span {
    font-size: 12px;
    color: var(--gray);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.error {
    background: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }

    .nav-name {
        display: none;
    }

    .settings-container {
        padding: 20px 16px;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px 0;
    }

    .profile-info {
        text-align: center;
    }

    .profile-meta {
        justify-content: center;
    }

    .tabs {
        padding: 0 16px;
        overflow-x: auto;
    }

    .tab-btn {
        white-space: nowrap;
    }

    .tab-content {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .button-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .logout-btn span {
        display: none;
    }

    .logout-btn {
        padding: 8px 12px;
    }

    .big-avatar {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}