:root {
    /* Dark theme default */
    --bg: #0b0f14;           /* near-black slate */
    --surface: #11161c;      /* dark slate */
    --muted: #0d1217;        /* slightly darker panel */
    --text: #e7eaf0;         /* paper white */
    --subtext: #aab2bf;      /* cool grey */
    --primary: #4c7bf7;      /* calm blue */
    --primary-600: #3a68e9;
    --danger: #e25b5b;       /* soft red */
    --ok: #22c55e;           /* green */
    --card: #121821;         /* card surface */
    --border: #1f2630;       /* subtle border */
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
        background: radial-gradient(1200px 600px at 20% -10%, rgba(76,123,247,0.08), transparent), radial-gradient(800px 400px at 110% 10%, rgba(58,104,233,0.06), transparent), var(--bg);
    color: var(--text);
    margin: 0;
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-header, .app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
        background: rgba(10, 14, 20, 0.55);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
}
.app-footer {
    border-top: 1px solid var(--border);
    border-bottom: none;
    justify-content: center;
    position: static;
}
.brand { display: flex; align-items: center; gap: 10px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.logo { font-size: 24px; }
.title { font-size: 18px; margin: 0; }

/* Settings drawer */
.settings-drawer {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    animation: slideDown 0.2s ease;
}
.settings-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.settings-group h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--subtext);
    margin: 0 0 10px;
    font-weight: 700;
}
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Controls within settings drawer */
.control { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--subtext); }
.control select { padding: 8px 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; transition: border .2s ease; min-width: 120px; }
.control select:hover { border-color: var(--primary); }
.control select:focus { border-color: var(--primary); outline: none; }

.control-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Theme toggle - Single morphing icon */
#theme-toggle-btn {
    position: relative;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle-btn:hover {
    border-color: var(--primary);
    background: var(--surface);
    transform: none;
}

#theme-toggle-btn:active {
    transform: scale(0.92);
}

.theme-icon-moon,
.theme-icon-sun {
    position: absolute;
    width: 22px;
    height: 22px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #818cf8;
}

.theme-icon-sun {
    opacity: 0;
    transform: rotate(180deg) scale(0);
    color: #fbbf24;
}

body.light #theme-toggle-btn {
    background: #f0f4f8;
    border-color: #e2e8f0;
}

body.light .theme-icon-moon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

body.light .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Optional: Add subtle tooltip */
#theme-toggle-btn:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
    z-index: 1000;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.theme-toggle { display: flex; align-items: center; gap: 6px; color: var(--subtext); cursor: pointer; }
.theme-toggle input { cursor: pointer; }

.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.card {
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)), var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(0,0,0,0.4); }
.card-label { color: var(--subtext); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.card-value { font-size: 28px; margin-top: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card-trend { font-size: 12px; margin-top: 6px; color: var(--subtext); font-weight: 500; }
.card-trend .trend-new { color: var(--primary); font-style: italic; }

.panel {
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)), var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 18px;
    box-shadow: var(--shadow);
}
.panel.muted { opacity: .9; background: var(--muted); }
.panel h2 { margin: 0 0 16px; font-size: 20px; font-weight: 600; }
.panel .sub { font-size: 13px; color: var(--subtext); margin-top: 4px; }

/* Collapsible panels (details/summary) */
details.panel { cursor: default; }
details.panel > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--subtext);
    border-bottom: 2px solid var(--subtext);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}
details[open].panel > summary::after {
    transform: rotate(45deg);
}
details.panel > summary h2 { margin: 0; }
details.panel > summary + * { margin-top: 16px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--subtext); }
.grid label.full { grid-column: 1 / -1; }

input, select, .btn {
    outline: none;
    border: 1px solid var(--border);
        background: #0f141a;
    color: var(--text);
    padding: 10px 12px;
    border-radius: 8px;
    transition: border .2s ease, transform .05s ease;
}
input:focus, select:focus { border-color: var(--primary); }
input::placeholder { color: #8892b0; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
input[type="color"] { 
    width: 100%; 
    height: 42px; 
    padding: 4px; 
    cursor: pointer; 
    border-radius: 8px;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }

.actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn { cursor: pointer; transition: transform .05s ease, background .2s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn.primary { background: linear-gradient(180deg, var(--primary), var(--primary-600)); border-color: transparent; color: #fff; font-weight: 600; }

/* Google Sign In button - Official style */
#btn-google-signin {
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
}

#btn-google-signin:hover {
    background: #f8f9fa;
    border-color: #d2d4d8;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    transform: translateY(-1px);
}

#btn-google-signin:active {
    background: #f1f3f4;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
    transform: translateY(0);
}

#btn-google-signin .icon {
    width: 18px;
    height: 18px;
}

body.light #btn-google-signin {
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { color: var(--subtext); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.table td.num { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight: 500; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: rgba(76,123,247,0.03); }
.table .sub { color: var(--subtext); font-size: 12px; margin-top: 4px; }

.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.badge.expense { background: rgba(255,107,107,0.15); color: #ff9c9c; border: 1px solid rgba(255,107,107,0.35); }
.badge.income { background: rgba(34,197,94,0.15); color: #78e0a2; border: 1px solid rgba(34,197,94,0.35); }

.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.icon-btn { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 6px 8px; border-radius: 6px; cursor: pointer; transition: all .2s ease; font-size: 12px; }
.icon-btn:hover { background: rgba(255,255,255,0.05); border-color: var(--primary); }
.icon-btn.danger { border-color: rgba(255,107,107,.4); color: #ff9c9c; }
.icon-btn.danger:hover { background: rgba(255,107,107,0.1); }

canvas { max-width: 100%; min-height: 200px; }

.progress { margin: 12px 0; }
.progress-top { display:flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.progress-top strong { font-weight: 600; }
.progress-bar { 
    height: 12px; 
    background: var(--muted); 
    border-radius: 999px; 
    overflow: hidden; 
    border: 1px solid var(--border); 
    position: relative;
}
.progress-bar > span { 
    display: block; 
    height: 100%; 
    background: var(--ok); 
    transition: width .3s ease;
    position: relative;
}
.progress-bar > span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

dialog { 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    background: var(--surface); 
    color: var(--text); 
    padding: 24px; 
    min-width: 420px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
dialog .dialog-header { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}
dialog .dialog-header h3 { margin: 0; font-size: 20px; font-weight: 700; }
dialog .dialog-header .icon { color: var(--primary); }
dialog h4 { 
    margin: 20px 0 12px; 
    font-size: 12px; 
    color: var(--primary); 
    text-transform: uppercase; 
    letter-spacing: 0.08em; 
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
dialog h4::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
}
dialog .profile-section { padding-top: 20px; margin-top: 20px; }
dialog .profile-section:first-of-type { margin-top: 0; padding-top: 0; }
dialog .auth-status { 
    background: rgba(76,123,247,0.08); 
    border: 2px solid rgba(76,123,247,0.2);
    padding: 10px 14px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    font-size: 13px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
}
dialog .auth-status.signed-in,
dialog .auth-status.signed-out {
    display: flex;
}
dialog .auth-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}
dialog .auth-status.signed-in {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
}
dialog .auth-status.signed-in::before {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}
dialog .auth-status.signed-out {
    border-color: #6b7280;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.08) 0%, rgba(107, 114, 128, 0.03) 100%);
}
dialog .auth-status.signed-out::before {
    background: #6b7280;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}
dialog .section-desc { font-size: 13px; color: var(--subtext); margin: 8px 0 16px; }
dialog .actions { margin-top: 16px; }

/* Profile dialog form groups */
dialog .form-group {
    margin-bottom: 20px;
}

dialog .form-group label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

dialog .form-group .label-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

dialog .form-group select,
dialog .form-group input {
    width: 100%;
    margin-bottom: 12px;
}

dialog .form-group button {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form divider with text */
dialog .form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--subtext);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

dialog .form-divider::before,
dialog .form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

dialog .form-divider span {
    padding: 0 16px;
}

@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .cards { grid-template-columns: 1fr; }
    .settings-drawer .control { flex: 1 1 calc(50% - 8px); min-width: 140px; }
    .settings-grid { flex-direction: column; gap: 16px; }
    .control-row { width: 100%; flex-wrap: wrap; gap: 8px; }
    .control-row .btn { flex: 1 1 auto; min-width: 120px; font-size: 14px; padding: 10px 12px; }
    .app-header { flex-direction: row; align-items: center; }
    .btn { min-height: 44px; padding: 12px 18px; font-size: 16px; }
    input, select, textarea { min-height: 44px; font-size: 16px; }
    .table td { padding: 12px 8px; }
    .table button { padding: 10px; min-width: 44px; min-height: 44px; }
    dialog { min-width: 90%; padding: 20px; }
    .header-actions span { display: none; }
    /* Responsive table: hide Notes sub-text, compact row actions */
    .table .sub { display: none; }
    .row-actions { gap: 4px; }
    .icon-btn { padding: 8px; }
    /* Stack pagination */
    .pagination { gap: 8px; }
    .pagination-btn { min-width: 60px; font-size: 12px; }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: 1fr; }
    .cards { gap: 10px; }
    .card { padding: 14px; }
    .card-value { font-size: 22px; }
    .panel { padding: 14px; margin-top: 12px; }
    .panel h2 { font-size: 17px; }
    .table th, .table td { padding: 8px 6px; font-size: 13px; }
    /* Hide 'Type' and 'Category' columns on very small screens */
    .table th:nth-child(2), .table td:nth-child(2) { display: none; }
    .table th:nth-child(3), .table td:nth-child(3) { display: none; }
    .confirm-dialog { min-width: unset; width: 90vw; }
}

/* Light theme (explicit .light class) */
body.light {
    --bg: #f7f8fb;          /* very light slate */
    --surface: #ffffff;
    --muted: #f2f4f8;
    --text: #0f1720;        /* dark slate */
    --subtext: #4b5563;
    --primary: #2f67f6;     /* deeper blue */
    --primary-600: #2555d8;
    --danger: #c24141;
    --card: #ffffff;
    --border: #e5e7eb;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(47,103,246,0.08), transparent), radial-gradient(800px 400px at 110% 10%, rgba(37,85,216,0.06), transparent), var(--bg);
}

/* Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Panel header with count badge */
.panel-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-header h2 { margin: 0; }
.tx-count {
    font-size: 12px;
    color: var(--subtext);
    background: rgba(76,123,247,0.1);
    border: 1px solid rgba(76,123,247,0.2);
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Sortable table headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px !important;
    transition: color 0.2s ease;
}
th.sortable:hover { color: var(--primary); }
th.sortable::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.3;
    border-bottom: 5px solid currentColor;
}
th.sortable.sort-asc::after {
    opacity: 1;
    border-bottom: 5px solid var(--primary);
    border-top: none;
}
th.sortable.sort-desc::after {
    opacity: 1;
    border-bottom: none;
    border-top: 5px solid var(--primary);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.pagination-btn {
    min-width: 80px;
    font-size: 13px;
    font-weight: 600;
}
.page-info {
    font-size: 13px;
    color: var(--subtext);
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

/* Custom confirm dialog */
.confirm-dialog {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    padding: 28px;
    min-width: 340px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    text-align: center;
}
.confirm-dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.confirm-body { margin-bottom: 24px; }
.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(226,91,91,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--danger);
}
.confirm-body p { font-size: 15px; font-weight: 500; margin: 0; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { min-width: 100px; font-weight: 600; }
.confirm-actions .btn.danger { background: var(--danger); border-color: transparent; color: #fff; }

/* Icon system */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    vertical-align: middle;
}
.icon-sm { width: 0.875em; height: 0.875em; }
.icon-md { width: 1.25em; height: 1.25em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em; height: 2em; }
.icon.fill { fill: currentColor; stroke: none; }

/* Button with icon */
.btn-with-icon { display: inline-flex; align-items: center; gap: 6px; }
.btn-with-icon .icon { width: 16px; height: 16px; }

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    opacity: 0;
    transition: all .3s ease;
    z-index: 2000;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.toast.success { border-color: var(--ok); background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.05)); }
.toast.error { border-color: var(--danger); background: linear-gradient(135deg, rgba(226,91,91,0.1), rgba(226,91,91,0.05)); }

/* Utility */
.btn.danger { border-color: rgba(226,91,91,.5); color: #ffb3b3; }
label.btn.file input { display: none; }

/* Light theme specific element overrides */
body.light .app-header, body.light .app-footer { background: rgba(255,255,255,0.85); }
body.light .settings-drawer { background: rgba(255,255,255,0.95); }
body.light input, body.light select, body.light .btn { background: #ffffff; color: var(--text); border-color: var(--border); }
body.light .panel, body.light .card { background: var(--surface); }
body.light .table th, body.light .table td { border-color: var(--border); }
body.light input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0); }
body.light .icon-btn:hover { background: rgba(0,0,0,0.05); }
body.light .support-fab { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
body.light .confirm-dialog { background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
body.light .tx-count { background: rgba(47,103,246,0.08); border-color: rgba(47,103,246,0.15); }
body.light th.sortable:hover { color: var(--primary); }
body.light .confirm-actions .btn.danger { background: var(--danger); color: #fff; }

/* Narrow layout tweaks */
@media (max-width: 900px) { .container { padding: 0 10px; } }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--subtext);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-text { font-size: 16px; }

/* List styling */
ul { list-style: none; padding: 0; margin: 8px 0; }
ul li { 
    padding: 10px 12px; 
    background: rgba(76,123,247,0.03); 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    margin-bottom: 8px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    transition: background .2s ease;
}
ul li:hover { background: rgba(76,123,247,0.06); }

/* Monetization/support link styles */
.support-links { display:flex; gap:12px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.bmc-button { 
    display:inline-block; 
    padding: 10px 16px; 
    border-radius: 8px; 
    background: linear-gradient(135deg, #ffdd00 0%, #ffc800 100%); 
    color: #111; 
    text-decoration: none; 
    font-weight: 600; 
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 2px 8px rgba(255,221,0,0.3);
}
.bmc-button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255,221,0,0.4); }
.gh-link { color: var(--primary); text-decoration: none; font-weight: 500; transition: color .2s ease; }
.gh-link:hover { text-decoration: underline; color: var(--primary-600); }

/* Floating support button */
.support-fab { 
    position: fixed; 
    right: 16px; 
    bottom: 16px; 
    width: 44px; 
    height: 44px; 
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; 
    background: rgba(255, 165, 0, 0.15); 
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: #ffa500; 
    text-decoration: none; 
    font-size: 18px; 
    box-shadow: none;
    transition: all .2s ease;
    z-index: 1000;
    opacity: 0.7;
}
.support-fab:hover { 
    opacity: 1;
    background: rgba(255, 165, 0, 0.25);
    transform: translateY(-2px); 
}
.support-fab .icon { width: 20px; height: 20px; stroke-width: 2; }