:root {
    color-scheme: dark;

    --bg: #0F0F0F;
    --bg-gradient: none;
    --card: #1A1A1A;
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --muted: #9ca3af;

    --primary: #E37400;
    --primary-gradient: #E37400;
    --primary-glow: none;
    --primary-soft: rgba(227, 116, 0, 0.12);
    
    --purple: #F9AB00;
    --purple-gradient: #F9AB00;
    --purple-soft: rgba(249, 171, 0, 0.12);
    
    --orange: #FF9F43;
    --orange-gradient: #E37400;
    --orange-soft: rgba(255, 159, 67, 0.12);
    
    --blue: #FFB74D;
    --blue-gradient: #FFB74D;
    --blue-soft: rgba(255, 183, 77, 0.12);
    
    --mint: #00D4AA;
    --mint-gradient: #00D4AA;
    --mint-soft: rgba(0, 212, 170, 0.12);

    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
    --glow: none;
}

* { 
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* Smooth animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

html { color-scheme: dark; }

a { color: inherit; text-decoration: none; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    background: var(--bg);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 80px;
    min-height: 100vh;
    animation: fadeIn 0.3s ease-out;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}



.container, .topbar, .bottom-nav {
    position: relative;
    z-index: 1;
}

/* ---------- Top header ---------- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 20px 4px;
    padding-top: max(22px, env(safe-area-inset-top));
    max-width: 440px;
    margin: 0 auto;
    animation: slideUp 0.4s ease-out;
    width: 100%;
    box-sizing: border-box;
}
.topbar .brand {
    display: flex; align-items: center;
    text-decoration: none;
}
.topbar .brand .logo {
    height: 44px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 12px rgba(227, 116, 0, 0.4)) drop-shadow(0 0 8px rgba(249, 171, 0, 0.3));
}
.topbar .brand:hover .logo {
    transform: scale(1.08) rotate(-2deg);
    filter: drop-shadow(0 6px 16px rgba(227, 116, 0, 0.6)) drop-shadow(0 0 12px rgba(249, 171, 0, 0.5));
}
.topbar .settings-link {
    color: var(--muted); 
    text-decoration: none;
    padding: 8px;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}
.topbar .settings-link .settings-icon {
    width: 24px;
    height: 24px;
    /* Alb + glow ca logo-ul */
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%) drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
    transition: filter 0.2s ease, transform 0.3s ease;
}
.topbar .settings-link:hover {
    transform: scale(1.05);
}
.topbar .settings-link:hover .settings-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%) drop-shadow(0 2px 10px rgba(255, 255, 255, 0.8));
    transform: rotate(90deg);
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(26, 26, 31, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--card-border);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 0, 0, 0.3);
    display: flex; justify-content: space-around; align-items: center;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    z-index: 100;
}
.bottom-nav a {
    color: var(--muted);
    text-decoration: none;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: 0.66rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}
.bottom-nav a .nav-icon { 
    width: 22px; 
    height: 22px;
    transition: filter 0.2s ease, transform 0.2s ease;
    /* Alb + glow ca logo-ul */
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%) drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}
.bottom-nav a:hover .nav-icon {
    transform: scale(1.1);
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%) drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}
.bottom-nav a span {
    color: var(--muted);
    transition: color 0.2s ease;
}
.bottom-nav a.active { 
    color: var(--primary); 
    background: var(--primary-soft); 
}
.bottom-nav a.active span {
    color: white;
}

/* Toate iconițele active rămân albe + glow mai puternic */
.bottom-nav a.active .nav-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.6));
}

/* Doar bitcoin e auriu */
.bottom-nav a .expenses-icon {
    filter: brightness(0) saturate(100%) invert(69%) sepia(86%) saturate(468%) hue-rotate(359deg) brightness(101%) contrast(101%) drop-shadow(0 0 4px rgba(255, 193, 7, 0.5));
}
.bottom-nav a.active .expenses-icon {
    filter: brightness(0) saturate(100%) invert(69%) sepia(86%) saturate(468%) hue-rotate(359deg) brightness(101%) contrast(101%) drop-shadow(0 2px 8px rgba(255, 193, 7, 0.7));
}

.container {
    max-width: 440px;
    margin: 0 auto;
    padding: 14px 20px 30px;
    animation: fadeIn 0.5s ease-out;
    width: 100%;
    box-sizing: border-box;
}

h1 { color: var(--text); font-size: 1.2rem; font-weight: 700; margin: 4px 0 16px; }
h2 { font-size: 0.95rem; margin: 26px 0 12px; color: var(--text); font-weight: 700; }

@media (max-width: 480px) {
    h1 { 
        font-size: 1.4rem; 
        text-align: center;
    }
    h2 { 
        font-size: 1rem; 
        margin: 24px 0 14px;
    }
}

.flash {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(227, 116, 0, 0.3);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    animation: slideUp 0.4s ease-out;
}

/* ---------- Login ---------- */
.login-box {
    max-width: 300px;
    margin: 110px auto 0;
    text-align: center;
    background: var(--card);
    padding: 36px 26px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.login-box .emoji-badge {
    width: 52px; height: 52px; border-radius: 15px;
    background: var(--primary-gradient); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin: 0 auto 16px;
}
.login-box h1 { margin: 0 0 4px; }
.login-box .subtitle { color: var(--muted); margin-bottom: 22px; font-size: 0.85rem; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Inputs ---------- */
input, textarea, button, select { font-family: inherit; font-size: 1rem; }

input[type="text"], input[type="tel"], input[type="password"],
input[type="number"], input[type="date"], input[type="time"],
input[type="month"], input[type="file"], textarea {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
input:focus, textarea:focus { 
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227, 116, 0, 0.25), 0 0 0 3px rgba(227, 116, 0, 0.1);
}

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); font-weight: 600; }

.month-picker {
    display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--muted); font-size: 0.82rem;
    background: var(--card); padding: 9px 14px; border-radius: 30px; 
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
    width: fit-content;
}
.month-picker input { background: transparent; border: none; padding: 0; width: auto; color: var(--text); font-weight: 700; outline: none; }

@media (max-width: 480px) {
    .month-picker {
        width: 100%;
        justify-content: center;
        margin: 0 0 18px;
    }
}

/* ---------- Metric cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

@media (max-width: 480px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.card {
    background: var(--card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: scaleIn 0.4s ease-out backwards;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--glow);
    border-color: rgba(255, 255, 255, 0.12);
}
.card:hover::before {
    opacity: 1;
}
.card:active {
    transform: translateY(-2px) scale(1.01);
}

.card-label { color: var(--muted); font-size: 0.75rem; margin-bottom: 6px; font-weight: 600; }
.card-value { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.3px; }
.card-value.positive { color: var(--mint); }
.card-value.negative { color: var(--primary); }

/* ---------- Donut chart (SVG) ---------- */
.donut-card {
    background: var(--card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px; 
    margin-top: 20px;
    display: flex; align-items: center; gap: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: scaleIn 0.5s ease-out 0.3s backwards;
    position: relative;
    overflow: hidden;
}
.donut-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 50%, var(--mint) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.donut-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--glow);
    border-color: rgba(255, 255, 255, 0.12);
}
.donut-card:hover::before {
    opacity: 0.03;
}
.donut-wrap { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.donut-wrap svg { transform: rotate(-90deg); }
.donut-center {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
}
.donut-center strong { font-size: 0.92rem; font-weight: 800; line-height: 1.1; }
.donut-center span { font-size: 0.62rem; color: var(--muted); font-weight: 600; margin-top: 2px; }

.legend { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; font-weight: 500; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.legend-value { font-weight: 700; margin-left: auto; padding-left: 10px; }

/* ---------- List items (appointments / expenses) ---------- */
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

.list-item {
    background: var(--card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.4s ease-out backwards;
    position: relative;
    overflow: hidden;
}
.list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 3px 3px 0;
}
.list-item:hover {
    transform: translateX(6px) scale(1.01);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.1);
}
.list-item:hover::before {
    transform: scaleY(1);
}

.list-item.status-anulat { opacity: 0.45; }

.avatar-dot {
    width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: white; font-size: 0.95rem; flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}
.avatar-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: var(--primary-gradient);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}
.list-item:hover .avatar-dot {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: var(--primary-glow);
}
.list-item:hover .avatar-dot::after {
    opacity: 0.3;
}

.list-item-main { display: flex; align-items: center; gap: 12px; }
.list-item-main strong { font-size: 0.9rem; font-weight: 600; }

.muted { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.badge {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.66rem;
    font-weight: 700;
}
.badge-finalizat { 
    background: var(--mint-soft); 
    color: var(--mint);
    border: 1px solid rgba(0, 212, 170, 0.2);
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.15);
}
.badge-anulat { 
    background: var(--orange-soft); 
    color: var(--orange);
    border: 1px solid rgba(255, 159, 67, 0.2);
    box-shadow: 0 2px 8px rgba(255, 159, 67, 0.15);
}
.badge-programat { 
    background: var(--purple-soft); 
    color: var(--purple);
    border: 1px solid rgba(249, 171, 0, 0.2);
    box-shadow: 0 2px 8px rgba(249, 171, 0, 0.15);
}

.item-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* ---------- Buttons ---------- */
.btn, .btn-small {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.btn:active, .btn-small:active {
    transform: scale(0.96);
}
.btn {
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 14px 24px;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}
.btn:hover::before {
    width: 300px;
    height: 300px;
}
.btn:hover { 
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--primary-glow), var(--shadow-lg);
}
.btn-secondary { background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(227, 116, 0, 0.3); }

.btn-small { padding: 7px 12px; font-size: 0.75rem; background: rgba(255, 255, 255, 0.05); color: var(--text); font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.1); }
.btn-small:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}
.btn-ok { background: var(--mint-soft); color: var(--mint); border-color: var(--mint); }
.btn-ok:hover { background: var(--mint); color: white; }
.btn-cancel { background: var(--orange-soft); color: var(--orange); border-color: var(--orange); }
.btn-cancel:hover { background: var(--orange); color: white; }
.btn-delete { background: transparent; color: var(--muted); border: none; }
.btn-delete:hover { color: var(--primary); }

.action-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

@media (max-width: 480px) {
    .action-row {
        flex-direction: column;
        gap: 12px;
    }
    .action-row .btn,
    .action-row .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

button.btn { border: none; }

/* ---------- Autocomplete ---------- */
.autocomplete-wrapper {
    position: relative;
}
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    z-index: 100;
    display: none;
}
.autocomplete-list.show {
    display: block;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease, transform 0.15s ease;
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}
.autocomplete-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.autocomplete-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.autocomplete-details strong {
    display: block;
    font-size: 0.88rem;
}
.autocomplete-details small {
    color: var(--muted);
    font-size: 0.75rem;
}

/* ---------- Profile image preview ---------- */
.photo-preview {
    margin-top: 8px;
}
.photo-preview img {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.client-photo {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.list-item:hover .client-photo {
    transform: scale(1.1);
}

/* ---------- Total card ---------- */
.total-card {
    background: var(--card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px 24px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    animation: scaleIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}
.total-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    box-shadow: var(--primary-glow);
}
.total-label {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 600;
}
.total-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* ---------- Price display ---------- */
.price-display {
    font-size: 0.95rem;
    font-weight: 700;
}
.price-display.positive {
    color: var(--mint);
}
.price-display.negative {
    color: var(--primary);
}

/* ---------- Status badges ---------- */
.status-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}
.status-badge.success {
    background: var(--mint-soft);
    color: var(--mint);
}
.status-badge.cancel {
    background: var(--orange-soft);
    color: var(--orange);
}
.status-badge.pending {
    background: var(--purple-soft);
    color: var(--purple);
}

/* ---------- Period selector ---------- */
.period-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--card);
    padding: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.period-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    text-align: center;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.period-btn.active {
    background: var(--primary-gradient);
    color: white;
}
.period-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

/* ---------- Profit summary ---------- */
.profit-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.summary-item {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}
.summary-item.highlight {
    background: var(--primary-soft);
    border-color: rgba(227, 116, 0, 0.3);
}
.summary-label {
    color: var(--muted);
    font-size: 0.75rem;
    margin-bottom: 6px;
    font-weight: 600;
}
.summary-value {
    font-size: 1.2rem;
    font-weight: 800;
}

/* ---------- Chart container ---------- */
.chart-container {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 20px;
    height: 350px;
    box-shadow: var(--shadow);
    animation: scaleIn 0.5s ease-out;
}

/* ---------- Client profile ---------- */
.profile-header {
    text-align: center;
    padding: 20px 0 30px;
    animation: fadeIn 0.5s ease-out;
}
.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    margin-bottom: 16px;
}
.profile-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    margin: 0 auto 16px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.profile-header h1 {
    margin: 0 0 8px;
    font-size: 1.8rem;
}
.profile-phone {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-soft);
    border-radius: 20px;
    margin-top: 8px;
    transition: transform 0.2s ease;
}
.profile-phone:hover {
    transform: scale(1.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 20px 12px;
    text-align: center;
    box-shadow: var(--shadow);
    animation: scaleIn 0.4s ease-out backwards;
}
.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}

.list-item-link {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.chevron {
    font-size: 1.5rem;
    color: var(--muted);
    font-weight: 300;
}

.current-photo {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* design simplificat */
*, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* fix date/time pe iOS */
.form input[type="date"], .form input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 52px;
    text-align: left;
}
.form input[type="date"]::-webkit-date-and-time-value,
.form input[type="time"]::-webkit-date-and-time-value {
    text-align: left;
    min-height: 1.2em;
}

/* selector zi (Programari) */
.month-picker {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px !important;
    min-height: 0 !important;
    height: auto !important;
    border-radius: 16px;
}
.month-picker label {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
    color: var(--muted);
    font-size: 16px;
    flex: 0 0 auto;
}
.month-picker input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    line-height: 1.2;
}
.month-picker input[type="date"]::-webkit-date-and-time-value {
    text-align: right;
    min-height: 0;
    margin: 0;
}
