/* ══════════════════════════════════════════════════
   Smart Expense Tracker — style.css
   Modern, Premium, and Fully Responsive
   ══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700&display=swap');

/* ── RESET & BASE ────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Rich, modern color palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #8b5cf6;

    --bg-main: #f4f7fb;
    --bg-card: #ffffff;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --border: #e2e8f0;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.02);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.01);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-main) url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239ba9b4' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* ── NAVBAR ──────────────────────────────────────── */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
}

.brand-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.btn-nav-add {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: var(--radius-full) !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    margin-left: 0.5rem;
}

.btn-nav-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    background: #000000 !important;
    color: #ffffff !important;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}

/* ── FLASH MESSAGES ──────────────────────────────── */
.flash-container {
    padding: 1rem 2rem 0;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.flash {
    padding: 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid var(--success);
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

/* ── CONTAINER ───────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    flex: 1;
    width: 100%;
}

/* ── PAGE HEADER ─────────────────────────────────── */
.page-header {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 0.5rem;
}

/* ── STAT CARDS ──────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 100%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.stat-card--blue .stat-icon {
    background: #eff6ff;
    color: #3b82f6;
}

.stat-card--green .stat-icon {
    background: #f0fdf4;
    color: #22c55e;
}

.stat-card--purple .stat-icon {
    background: #f5f3ff;
    color: #8b5cf6;
}

.stat-card--orange .stat-icon {
    background: #fff7ed;
    color: #f97316;
}

.stat-body {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.stat-sub {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* ── SECTION ─────────────────────────────────────── */
.section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ── CATEGORY BARS ───────────────────────────────── */
.category-bars {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.category-bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cat-label {
    width: 130px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.bar-track {
    flex: 1;
    height: 12px;
    background: var(--bg-main);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.cat-amount {
    width: 80px;
    text-align: right;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Outfit';
}

.cat-pct {
    width: 50px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── TABLE ───────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.expense-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    white-space: nowrap;
}

.expense-table th {
    background: var(--bg-main);
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 2px solid var(--border);
}

.expense-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.expense-table tbody tr {
    transition: background 0.15s;
}

.expense-table tbody tr:hover {
    background: #f8fafc;
}

.td-id {
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

.td-amount {
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.td-desc {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.td-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.td-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── BADGES ──────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-food {
    background: #dcfce7;
    color: #15803d;
}

.badge-transport {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-housing {
    background: #fef9c3;
    color: #a16207;
}

.badge-entertainment {
    background: #fce7f3;
    color: #9d174d;
}

.badge-health {
    background: #ccfbf1;
    color: #0f766e;
}

.badge-shopping {
    background: #ede9fe;
    color: #6d28d9;
}

.badge-education {
    background: #ffedd5;
    color: #c2410c;
}

.badge-other {
    background: var(--bg-main);
    color: var(--text-muted);
}

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-main);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    color: var(--text-muted);
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-edit:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.btn-delete:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.inline-form {
    display: inline;
}

/* ── FORMS ───────────────────────────────────────── */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 600px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.required {
    color: var(--danger);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: #f8fafc;
    color: var(--text-main);
    transition: var(--transition);
    appearance: none;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.input-prefix-wrapper {
    display: flex;
    align-items: stretch;
}

.input-prefix {
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.input-with-prefix {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ── FILTER BAR ──────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.filter-select {
    width: auto;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ── HIGHLIGHT CARD ──────────────────────────────── */
.highlight-card {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.highlight-amount {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Outfit';
    margin-bottom: 0.5rem;
}

.highlight-desc {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.9;
}

.highlight-meta {
    font-size: 0.9rem;
    opacity: 0.75;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── EMPTY STATE ─────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px dashed var(--border);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* ── FOOTER ──────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-card);
    margin-top: auto;
}

/* ── RESPONSIVE DESIGN (MOBILE FIRST APPROACH IN MEDIA QUERIES) ── */

@media (max-width: 860px) {
    .category-bar-row {
        flex-wrap: wrap;
    }

    .bar-track {
        order: 3;
        width: 100%;
        flex: none;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 0 1.25rem;
        height: 64px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border);
        align-items: stretch;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
    }

    .btn-nav-add {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .section {
        padding: 1.25rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .form-card {
        padding: 1.5rem;
    }

    /* CARD BASED TABLE FOR MOBILE */
    .table-wrapper {
        border: none;
        background: transparent;
        border-radius: 0;
    }

    .expense-table thead {
        display: none;
    }

    .expense-table,
    .expense-table tbody,
    .expense-table tr,
    .expense-table td {
        display: block;
        width: 100%;
    }

    .expense-table tr {
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: var(--radius-lg);
        background: var(--bg-card);
        box-shadow: var(--shadow);
        border: 1px solid var(--border);
        transition: var(--transition);
    }

    .expense-table tr:hover {
        transform: translateY(-2px);
    }

    .expense-table td {
        text-align: right;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        white-space: normal;
    }

    .expense-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .expense-table td:first-child {
        padding-top: 0;
    }

    .expense-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .td-desc {
        text-align: right;
    }
}

/* ── LOGIN PAGE ──────────────────────────────────── */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
}

.login-actions {
    margin-bottom: 2rem;
}

.btn-google-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-google-login:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

.google-logo {
    width: 24px;
    height: 24px;
}

.login-features {
    display: flex;
    justify-content: space-around;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

/* ── PROFILE PAGE ────────────────────────────────── */

.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    margin-bottom: 2rem;
}

.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.profile-info-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 3rem 2rem;
    background: linear-gradient(to right, var(--primary-light), #ffffff);
    border-bottom: 1px solid var(--border);
}

.profile-picture-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow);
}

.profile-picture-placeholder-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Outfit';
    border: 4px solid white;
    box-shadow: var(--shadow);
}

.profile-details h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.profile-email {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-logout {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-logout:hover {
    background: #fef2f2;
}

.profile-stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 2rem;
}

.profile-stat-card {
    background: var(--bg-main);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.profile-stat-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ── NAVBAR OVERRIDES FOR PROFILE ─────────────────── */

.nav-profile-menu {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background-color: var(--bg-card);
    min-width: 150px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    z-index: 100;
    overflow: hidden;
    border: 1px solid var(--border);
}

.dropdown-content.show {
    display: block;
}

.profile-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: var(--transition);
}

.profile-toggle-btn:hover {
    background: var(--bg-main);
    border-radius: var(--radius-sm);
}

.dropdown-caret {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.dropdown-content a {
    color: var(--text-main) !important;
    padding: 0.75rem 1rem !important;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0 !important;
}

.dropdown-content a.text-danger {
    color: var(--danger) !important;
}

.dropdown-content a.text-danger:hover {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem !important;
    background: transparent !important;
}

.profile-link:hover {
    background: var(--bg-main) !important;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
}

.nav-user-name {
    font-weight: 600;
    color: var(--text-main);
}

.btn-nav-login {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
}

.btn-nav-login:hover {
    background: var(--primary-hover) !important;
}

@media (max-width: 640px) {
    .nav-profile-menu {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        position: static;
    }

    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        background-color: transparent;
        margin-top: 0;
        padding-left: 1rem;
    }

    .profile-info-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-stats-section {
        grid-template-columns: 1fr;
    }
}