/* ================================================
   Kasař — style.css
   Tmavé téma jako základ, světlé jako alternativa
   ================================================ */

:root {
    --bg:          #0d1117;
    --bg2:         #161b27;
    --card:        #1a1f2e;
    --card2:       #1e2438;
    --border:      rgba(255,255,255,0.07);
    --accent:      #f59e0b;
    --accent-glow: rgba(245,158,11,0.18);
    --accent-dark: #d97706;
    --success:     #10b981;
    --danger:      #f43f5e;
    --warning:     #fb923c;
    --info:        #38bdf8;
    --text:        #e2e8f0;
    --text-muted:  #64748b;
    --text-dim:    #94a3b8;
    --shadow:      0 4px 24px rgba(0,0,0,0.5);
    --shadow-lg:   0 16px 48px rgba(0,0,0,0.6);
    --topbar-h:    58px;
    --nav-h:       76px;
    --radius:      14px;
    --radius-lg:   20px;
    --ease:        all 0.22s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
    --bg:          #f1f5f9;
    --bg2:         #e8edf5;
    --card:        #ffffff;
    --card2:       #f8fafc;
    --border:      rgba(0,0,0,0.07);
    --text:        #0f172a;
    --text-muted:  #64748b;
    --text-dim:    #94a3b8;
    --shadow:      0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg:   0 16px 48px rgba(0,0,0,0.12);
    --accent-glow: rgba(245,158,11,0.12);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    transition: background 0.3s, color 0.3s;
}

.hidden { display: none !important; }

/* ===========================
   SCROLLBAR
   =========================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ===========================
   AUTH PAGE
   =========================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-bg-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 60%);
    pointer-events: none;
    animation: authOrb 8s infinite alternate ease-in-out;
}

.auth-bg-glow::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(56,189,248,0.1) 0%, transparent 60%);
    animation: authOrb2 12s infinite alternate ease-in-out;
}

@keyframes authOrb {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-30%, -70%) scale(1.2); }
}

@keyframes authOrb2 {
    0% { transform: translate(10%, 20%) scale(0.8); }
    100% { transform: translate(-20%, -10%) scale(1.1); }
}

.auth-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    width: 420px;
    max-width: 100%;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: authEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authEntrance {
    0% { transform: scale(0.9) translateY(30px); opacity: 0; filter: blur(5px); }
    100% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
}

.auth-logo {
    text-align: center;
    margin-bottom: 8px;
}

.auth-logo-text {
    font-size: 42px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -2px;
}

.auth-logo-dot {
    font-size: 48px;
    color: var(--text);
    font-weight: 900;
}

.auth-tagline {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.auth-tabs {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 28px;
    background: var(--bg2);
}

.auth-tab {
    flex: 1;
    padding: 11px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--ease);
    font-family: inherit;
}

.auth-tab.active { background: var(--accent); color: #0d1117; }

.auth-form {
    animation: formFadeIn 0.4s forwards cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes formFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-hint {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===========================
   PIN PAGE
   =========================== */
.pin-dot {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border);
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.pin-dot.filled {
    background: var(--accent); border-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--accent-glow);
}
.pin-pad { max-width: 260px; margin: 0 auto; }
.pin-btn {
    width: 65px; height: 65px; border-radius: 50%;
    border: none; background: var(--bg2); color: var(--text);
    font-size: 24px; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
    display: flex; align-items: center; justify-content: center;
}
.pin-btn:hover { background: rgba(255,255,255,0.05); }
[data-theme="light"] .pin-btn:hover { background: rgba(0,0,0,0.05); }
.pin-btn:active { transform: scale(0.9); }
.pin-cmd { background: transparent; font-size: 20px; box-shadow: none; color: var(--text-muted); }
.pin-container.shake { animation: errShake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes errShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-8px, 0, 0); }
  40%, 60% { transform: translate3d(8px, 0, 0); }
}

/* ===========================
   FORMS
   =========================== */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.label-hint {
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    margin-left: 4px;
    opacity: 0.7;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 14px;
    color: var(--text);
    background: var(--bg2);
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea { height: 80px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.error-msg { color: var(--danger); font-size: 13px; margin-bottom: 10px; min-height: 18px; }

/* ===========================
   BUTTONS
   =========================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--ease);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-accent {
    background: var(--accent);
    color: #0d1117;
}
.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg2); color: var(--text); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 0;
}
.btn-link:hover { opacity: 0.8; }

.full-width { width: 100%; justify-content: center; }

/* ===========================
   APP LAYOUT
   =========================== */
.app { min-height: 100vh; animation: appEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes appEntrance {
    0% { opacity: 0; filter: blur(4px); transform: scale(0.98); }
    100% { opacity: 1; filter: blur(0); transform: scale(1); }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   TOPBAR
   =========================== */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: rgba(13,17,23,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
}

[data-theme="light"] .topbar {
    background: rgba(241,245,249,0.92);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.app-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -1px;
    line-height: 1;
}

.logo-dot { color: var(--text); }

.topbar-date {
    font-size: 13px;
    color: var(--text-muted);
}

.topbar-right { display: flex; align-items: center; gap: 8px; }

.lang-switcher {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg2);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 5px 9px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--ease);
    line-height: 1;
}

.lang-btn:hover  { background: rgba(255,255,255,0.05); }
.lang-btn.active { background: var(--accent-glow); }

.icon-btn {
    width: 36px; height: 36px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ease);
}

.icon-btn:hover        { color: var(--text); border-color: rgba(255,255,255,0.15); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

.user-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #0d1117;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

/* ===========================
   MAIN CONTENT
   =========================== */
.main-content {
    padding-top: calc(var(--topbar-h) + 20px);
    padding-bottom: calc(var(--nav-h) + 28px);
    min-height: 100vh;
}

.page {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.page.hidden { display: none; }
.page.active { display: block; animation: pageFadeIn 0.35s var(--ease) forwards; }

@keyframes pageFadeIn {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 16px;
    padding-top: 8px;
}

.page-header h2 { font-size: 22px; font-weight: 800; margin-bottom: 3px; }
.page-subtitle   { color: var(--text-muted); font-size: 13px; }

/* ===========================
   GREETING
   =========================== */
.greeting {
    font-size: 15px;
    color: var(--text-dim);
    padding: 10px 0 14px;
    font-weight: 500;
}

/* ===========================
   HERO CARD
   =========================== */
.hero-card {
    position: relative;
    overflow: hidden;
    background: rgba(26, 31, 46, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 28px 28px 22px;
    margin-bottom: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
}

[data-theme="light"] .hero-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 40px rgba(0,0,0,0.2), inset 0 0 20px rgba(255,255,255,0.05);
}

.hero-glow {
    position: absolute;
    top: -80px; right: -60px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(245,158,11,0.14) 0%, transparent 70%);
    pointer-events: none;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.hero-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(245,158,11,0.15);
    color: var(--accent);
    border: 1px solid rgba(245,158,11,0.25);
}

.hero-balance {
    font-size: 54px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -2px;
    margin: 8px 0 20px;
}

.hero-balance .sign-positive { color: var(--accent); }
.hero-balance .sign-negative { color: var(--danger); }

.hero-trend {
    font-size: 13px;
    font-weight: 600;
    margin-top: -12px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
    color: white;
}
.hero-trend.up { color: var(--success); }
.hero-trend.down { color: var(--danger); }

.hero-split {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
}

.hero-split-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.hero-split-item strong {
    color: white;
    font-size: 15px;
    font-weight: 700;
}

.hero-split-item i { font-size: 11px; }
.income-item i  { color: var(--success); }
.expense-item i { color: var(--danger); }

.hero-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.08);
    margin: 0 16px;
}

/* ===========================
   FINANCIAL SCORE
   =========================== */
.score-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.score-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.score-value {
    font-size: 34px;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}

.score-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

.score-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.score-emoji {
    font-size: 22px;
}

.score-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
    transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

/* ===========================
   INSIGHTS
   =========================== */
.insight-section { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }

.insight-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: fadeSlideIn 0.3s ease backwards;
}

.insight-card:nth-child(2) { animation-delay: 0.07s; }
.insight-card:nth-child(3) { animation-delay: 0.14s; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.insight-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.insight-text {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.55;
}

.insight-text strong { color: var(--text); font-weight: 700; }

/* ===========================
   CHART ROW
   =========================== */
.chart-row {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-card { margin-bottom: 0; }

/* ===========================
   GENERIC CARD
   =========================== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.card h3 { font-size: 15px; font-weight: 700; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header select {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg2);
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===========================
   PIE LEGEND
   =========================== */
.pie-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
}

.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ===========================
   TRANSACTIONS
   =========================== */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input[type="text"] {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    background: var(--bg2);
    outline: none;
    transition: var(--ease);
    font-family: inherit;
}

.filter-bar input[type="text"] { flex: 1; min-width: 140px; }
.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--accent); }

.transaction-list { display: flex; flex-direction: column; }

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    border-radius: 9px;
    transition: var(--ease);
    border-bottom: 1px solid var(--border);
}

.transaction-item:last-child { border-bottom: none; }
.transaction-item:hover { background: var(--bg2); }

.trans-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.trans-info { flex: 1; min-width: 0; }

.trans-desc {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trans-meta { font-size: 12px; color: var(--text-muted); }

.trans-amount {
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.trans-amount.income  { color: var(--success); }
.trans-amount.expense { color: var(--danger);  }

.trans-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--ease);
    flex-shrink: 0;
}

.transaction-item:hover .trans-actions { opacity: 1; }

.action-btn {
    width: 28px; height: 28px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    transition: var(--ease);
}

.action-btn.edit   { background: rgba(56,189,248,0.1);  color: var(--info);   }
.action-btn.delete { background: rgba(244,63,94,0.1);   color: var(--danger); }
.action-btn:hover  { opacity: 0.7; transform: scale(1.1); }

.transactions-summary {
    display: flex;
    gap: 18px;
    padding: 12px 6px 2px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.transactions-summary strong { color: var(--text); }

/* ===========================
   GOALS
   =========================== */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.goal-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: var(--ease);
    position: relative;
    overflow: hidden;
}

.goal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--goal-color, var(--accent));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.goal-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg), 0 0 20px var(--accent-glow); }

.goal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.goal-emoji {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.goal-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.goal-ring-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.goal-ring {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
}

.goal-ring circle { transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1); }

.goal-stats { flex: 1; }

.goal-pct {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}

.goal-amounts {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.goal-amounts strong { color: var(--text); }

.goal-complete-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(16,185,129,0.15);
    color: var(--success);
    margin-top: 6px;
}

.goal-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

/* ===========================
   BUDGETS
   =========================== */
.budget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.budget-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--ease);
}

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

.budget-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.budget-card-header h3 { font-size: 15px; font-weight: 700; }

.budget-month {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg2);
    padding: 3px 8px;
    border-radius: 20px;
}

.budget-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 9px;
}

.budget-spent { font-weight: 700; }
.budget-limit { color: var(--text-muted); }

.progress-bar {
    height: 7px;
    background: var(--bg2);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 7px;
}

.progress-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
}

.budget-status { font-size: 12px; font-weight: 600; text-align: right; }
.budget-card-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ===========================
   SETTINGS
   =========================== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-grid .card h3 { font-size: 15px; font-weight: 700; }

.data-actions { display: flex; flex-direction: column; gap: 10px; }

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: var(--bg2);
    border-radius: 8px;
    font-size: 13px;
}

.category-item-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.category-item span { flex: 1; font-weight: 500; }

.category-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    background: var(--card);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.delete-cat {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 2px 4px;
    opacity: 0.4;
    font-size: 12px;
    transition: var(--ease);
}

.delete-cat:hover { opacity: 1; }

.add-category {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.add-category input[type="text"],
.add-category select {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    background: var(--bg2);
    outline: none;
    font-family: inherit;
}

.add-category input[type="text"] { flex: 1; min-width: 90px; }

.add-category input[type="color"] {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 2px;
    cursor: pointer;
    background: var(--bg2);
}

/* ===========================
   BOTTOM NAV DOCK
   =========================== */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22,27,39,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 28px;
    padding: 8px;
    display: flex;
    gap: 2px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03);
    z-index: 100;
}

[data-theme="light"] .bottom-nav {
    background: rgba(255,255,255,0.97);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: transparent;
    color: rgba(255,255,255,0.28);
    transition: var(--ease);
    font-family: inherit;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 3px;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 -2px 10px var(--accent-dark);
}

.nav-item i { font-size: 17px; transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); }

.nav-item:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.04); }
.nav-item:hover i { transform: translateY(-2px); }

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.nav-item.active::after {
    width: 20px;
}

.nav-item.active:hover { background: rgba(245,158,11,0.25); }

[data-theme="light"] .nav-item { color: rgba(0,0,0,0.3); }
[data-theme="light"] .nav-item:hover { color: rgba(0,0,0,0.6); background: rgba(0,0,0,0.04); }
[data-theme="light"] .nav-item.active { background: var(--accent-glow); color: var(--accent-dark); }

/* ===========================
   FLOATING ACTION BUTTON
   =========================== */
.fab {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    color: #0d1117;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(245,158,11,0.45);
    transition: var(--ease);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fabPulse 2.5s infinite;
}

@keyframes fabPulse {
    0% { box-shadow: 0 8px 28px rgba(245,158,11,0.45), 0 0 0 0 rgba(245,158,11,0.4); }
    70% { box-shadow: 0 8px 28px rgba(245,158,11,0.45), 0 0 0 15px rgba(245,158,11,0); }
    100% { box-shadow: 0 8px 28px rgba(245,158,11,0.45), 0 0 0 0 rgba(245,158,11,0); }
}

.fab:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 14px 40px rgba(245,158,11,0.55);
    animation: none;
}

/* ===========================
   MODAL
   =========================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 480px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    animation: modalIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-content.small { width: 360px; }

@keyframes modalIn {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.modal-header h3 { font-size: 18px; font-weight: 800; }

.modal-close {
    background: var(--bg2);
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--ease);
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ===========================
   RADIO BUTTONS
   =========================== */
.radio-group { display: flex; gap: 10px; }
.radio-label { cursor: pointer; }
.radio-label input[type="radio"] { display: none; }

.radio-custom {
    display: block;
    padding: 9px 22px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    transition: var(--ease);
    color: var(--text-muted);
}

.radio-label input:checked + .expense-radio {
    border-color: var(--danger);
    background: rgba(244,63,94,0.1);
    color: var(--danger);
}

.radio-label input:checked + .income-radio {
    border-color: var(--success);
    background: rgba(16,185,129,0.1);
    color: var(--success);
}

/* ===========================
   EMPTY STATE
   =========================== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .empty-emoji { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; line-height: 1.5; }
.empty-state .empty-hint { font-size: 12px; margin-top: 6px; opacity: 0.7; }

/* ===========================
   TOAST
   =========================== */
.toast {
    position: fixed;
    bottom: 96px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.25s ease;
    white-space: nowrap;
}

.toast.success { background: var(--success); border-color: var(--success); color: white; }
.toast.error   { background: var(--danger);  border-color: var(--danger);  color: white; }

@keyframes toastIn {
    from { transform: translateX(-50%) translateY(10px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ===========================
   PRINT
   =========================== */
@media print {
    .topbar, .bottom-nav, .fab, .toast { display: none !important; }
    .main-content { padding-top: 0; padding-bottom: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    body { background: white; color: black; }
}

/* ===========================
   SUBSCRIPTIONS
   =========================== */
.subscriptions-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; min-height: 50vh; }
.sub-card { 
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 16px;
    display: flex; justify-content: space-between; align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sub-info strong { display: block; font-size: 16px; color: var(--text); margin-bottom: 2px; }
.sub-info span { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.sub-amount { font-size: 18px; font-weight: 700; color: var(--danger); text-align: right; }
.sub-meta { font-size: 11px; color: var(--text-muted); display: block; margin-top:4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===========================
   WRAPPED UI
   =========================== */
.wrapped-overlay {
    position: fixed; inset: 0; background: #000; z-index: 9999;
    display: flex; flex-direction: column; color: white;
}
.wrapped-content { flex: 1; display:flex; flex-direction:column; justify-content:center; align-items:center; }
.wrapped-progress-container {
    position: absolute; top: 12px; left: 12px; right: 12px;
    display: flex; gap: 6px; z-index: 10000;
}
.wrapped-progress-bar {
    flex: 1; height: 3px; background: rgba(255,255,255,0.3); border-radius: 3px;
    overflow: hidden;
}
.wrapped-progress-fill { height: 100%; background: white; width: 0%; transform-origin: left; }
.wrapped-close {
    position: absolute; top: 24px; right: 16px; background: transparent; border: none;
    color: white; font-size: 24px; z-index: 10000; cursor: pointer; opacity: 0.8;
}
.wrapped-nav-left { position: absolute; left: 0; top: 40px; bottom: 0; width: 40%; z-index: 9998; cursor: pointer; }
.wrapped-nav-right { position: absolute; right: 0; top: 40px; bottom: 0; width: 60%; z-index: 9998; cursor: pointer; }

.wrapped-slide {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 32px; text-align: center;
    opacity: 0; transform: scale(0.95); transition: all 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.wrapped-slide.active { opacity: 1; transform: scale(1); }

.wrapped-title { font-size: 24px; font-weight: 800; margin-bottom: 24px; line-height: 1.3; }
.wrapped-highlight { font-size: 64px; font-weight: 900; margin-bottom: 24px; text-shadow: 0 0 20px rgba(255,255,255,0.5); }
.wrapped-text { font-size: 16px; opacity: 0.8; line-height: 1.6; }

.bg-gradient-1 { background: radial-gradient(circle at center, #6366f1 0%, #312e81 100%); }
.bg-gradient-2 { background: radial-gradient(circle at center, #ec4899 0%, #831843 100%); }
.bg-gradient-3 { background: radial-gradient(circle at center, #10b981 0%, #064e3b 100%); }
.bg-gradient-4 { background: radial-gradient(circle at center, #f59e0b 0%, #78350f 100%); }

/* ===========================
   KASAŘ BOT (AI)
   =========================== */
.bot-fab {
    position: fixed; right: 20px; bottom: 160px;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: white; border: none; font-size: 20px;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    cursor: pointer; z-index: 99; transition: all 0.2s ease;
}
.bot-fab:hover { transform: scale(1.1); }

.bot-window {
    position: fixed; right: 20px; bottom: 220px;
    width: 320px; height: 420px; background: var(--bg2);
    border-radius: 16px; border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 100; display: flex; flex-direction: column; overflow: hidden;
    transform-origin: bottom right; animation: popIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.bot-header {
    padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.bot-header h4 { margin: 0; font-size: 14px; color: var(--text); }
.bot-header button { background: none; border: none; color: var(--text-muted); cursor: pointer; }

.bot-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.bot-message {
    max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.4;
    word-wrap: break-word; font-weight: 500;
}
.bot-message.bot { background: var(--card); color: var(--text); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.bot-message.user { background: var(--accent); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.bot-typing { display: flex; gap: 4px; padding: 12px; align-self: flex-start; background: transparent; }
.bot-typing span { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: botTyping 1s infinite; }
.bot-typing span:nth-child(2) { animation-delay: 0.2s; }
.bot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes botTyping { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.bot-input-area {
    display: flex; padding: 12px; border-top: 1px solid var(--border); background: var(--bg);
}
.bot-input-area input {
    flex: 1; border: none; background: transparent; color: var(--text); padding: 8px; outline: none; font-size: 13px;
}
.bot-input-area button {
    background: transparent; border: none; color: var(--accent); cursor: pointer; padding: 0 8px; font-size: 16px; transition: 0.2s;
}
.bot-input-area button:hover { transform: scale(1.1); }

/* ===========================
   MEDIA QUERIES A PRINT
   =========================== */
@media print {
    body { background: white !important; color: black !important; padding: 0 !important; margin: 0 !important; }
    .bottom-nav, .fab, .page-header button, .nav-item, .auth-page, .modal, .toast { display: none !important; }
    .page.hidden { display: block !important; opacity: 1 !important; visibility: visible !important; margin-bottom: 24px; }
    .app { animation: none !important; padding: 0 !important; margin: 0 !important; }
    .card, .hero-card { page-break-inside: avoid; border: 1px solid #ccc !important; box-shadow: none !important; background: white !important; color: black !important; }
    * { box-shadow: none !important; }
    .hero-balance, .hero-trend { color: black !important; }
    .canvas-container { page-break-inside: avoid; }
    .settings-grid, [id="settingsPage"] { display: none !important; }
    h2 { border-bottom: 2px solid #ccc; padding-bottom: 8px; }
}

@media (min-width: 600px) {
    .chart-row      { grid-template-columns: 1fr; }
    .settings-grid  { grid-template-columns: 1fr; }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
    .chart-row      { grid-template-columns: 1fr; }
    .settings-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .page           { padding: 0 12px 12px; }
    .hero-balance   { font-size: 40px; }
    .nav-item       { padding: 9px 12px; min-width: 48px; font-size: 8px; }
    .nav-item i     { font-size: 16px; }
    .topbar-date    { display: none; }
    .form-row       { grid-template-columns: 1fr; }
    .filter-bar     { flex-direction: column; }
    .filter-bar select,
    .filter-bar input { width: 100%; }
    .goals-grid, .budget-grid { grid-template-columns: 1fr; }
    .fab            { right: 14px; bottom: 96px; }
}

@media (max-width: 400px) {
    .auth-container { padding: 28px 20px; }
    .hero-balance   { font-size: 32px; }
}
