/* ----------------------------------------------------
   КОРПОРАТИВНІ ЗМІННІ ТА ТЕМИ (LIGHT & DARK)
---------------------------------------------------- */
:root[data-theme="light"] {
    --bg-main: #c4d7e6;
    --card-bg: #e8f1f8;
    --right-panel-bg: #dbe7f2;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --input-bg: #f1f6fb;
    --input-border: #b0c6dd;
    --azure: #008ba3;
    --blue: #1565c0;
    --orange: #ff9800;
    --orange-hover: #f57c00;
    --shadow: rgba(15, 23, 42, 0.12);
    --blob-1: rgba(0, 188, 212, 0.32);
    --blob-2: rgba(255, 152, 0, 0.22);
    --blob-3: rgba(25, 118, 210, 0.28);
    --ios-bg: #a8c1db;
    --ios-knob: #ffffff;
    --ios-pill-bg: rgba(15, 23, 42, 0.06);
    --ios-pill-border: rgba(15, 23, 42, 0.12);
    --grid-line-color: rgba(15, 23, 42, 0.07);
}

:root[data-theme="dark"] {
    --bg-main: #090d16;
    --card-bg: #121928;
    --right-panel-bg: #0d1322;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --input-bg: #1a2336;
    --input-border: #2d3b54;
    --azure: #38bdf8;
    --blue: #3b82f6;
    --orange: #ffa726;
    --orange-hover: #fb8c00;
    --shadow: rgba(0, 0, 0, 0.45);
    --blob-1: rgba(56, 189, 248, 0.12);
    --blob-2: rgba(255, 167, 38, 0.1);
    --blob-3: rgba(59, 130, 246, 0.12);
    --ios-bg: #334155;
    --ios-knob: #ffffff;
    --ios-pill-bg: rgba(255, 255, 255, 0.05);
    --ios-pill-border: rgba(255, 255, 255, 0.1);
    --grid-line-color: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

body.dashboard-body {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.ambient-bg {
    position: fixed;
    width: 100%; height: 100%;
    top: 0; left: 0;
    overflow: hidden;
    z-index: 0;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: floatBlob 12s infinite alternate ease-in-out;
}

.blob-1 { width: 380px; height: 380px; background: var(--blob-1); top: 8%; left: 12%; }
.blob-2 { width: 320px; height: 320px; background: var(--blob-2); bottom: 12%; right: 15%; animation-delay: -4s; }
.blob-3 { width: 420px; height: 420px; background: var(--blob-3); top: 45%; left: 45%; transform: translate(-50%, -50%); animation-delay: -8s; }

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(35px, -35px) scale(1.08); }
}

/* ----------------------------------------------------
   🔒 СТИЛІ СТОРІНКИ АВТОРИЗАЦІЇ (LOGIN.PHP)
---------------------------------------------------- */
.ai-border-wrapper {
    position: relative;
    z-index: 1;
    padding: 3px;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--azure), var(--orange), var(--blue), var(--azure));
    background-size: 300% 300%;
    animation: aiGlow 6s linear infinite;
    box-shadow: 0 20px 45px var(--shadow);
    width: 890px;
    max-width: 92%;
}

@keyframes aiGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 17px;
    overflow: hidden;
    min-height: 520px;
}

.left-panel {
    flex: 1;
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.tech-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at 50% 45%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 45%, black 20%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

.brand-content {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 30px 10px 30px;
}

.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brand-logo-img {
    max-width: 220px;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--azure);
    opacity: 0.9;
    margin-top: 2px;
}

.brand-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
    max-width: 280px;
    margin-top: 16px;
}

.waves-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 180px;
    display: flex;
    align-items: flex-end;
    margin-bottom: -5px;
}

.ai-waves-full { width: 100%; height: 100%; }
.wave { transform-origin: center; }

.wave-full-1 { animation: waveMorphFull1 5s ease-in-out infinite alternate; }
.wave-full-2 { animation: waveMorphFull2 5s ease-in-out infinite alternate; }
.wave-full-3 { animation: waveDash 12s linear infinite; }

@keyframes waveMorphFull1 {
    0% { d: path("M 0 90 Q 250 15, 500 90 T 1000 90"); }
    100% { d: path("M 0 90 Q 250 165, 500 90 T 1000 90"); }
}

@keyframes waveMorphFull2 {
    0% { d: path("M 0 90 Q 250 165, 500 90 T 1000 90"); }
    100% { d: path("M 0 90 Q 250 15, 500 90 T 1000 90"); }
}

@keyframes waveDash { to { stroke-dashoffset: -120; } }

.right-panel {
    flex: 1;
    background: var(--right-panel-bg);
    padding: 30px 35px 35px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-inner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.welcome-header {
    margin-bottom: 22px;
    text-align: left;
}

.welcome-header h2 {
    color: var(--text-primary);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.welcome-header p {
    color: var(--text-secondary);
    font-size: 13px;
}

.input-group { position: relative; margin-bottom: 16px; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--azure); font-size: 14px; }

.input-group input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.input-group input:focus { border-color: var(--azure); box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15); }

.toggle-password {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-secondary);
    cursor: pointer; font-size: 14px; padding: 4px;
}

.toggle-password:hover { color: var(--azure); }

.options {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
}

.ios-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.remember-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.btn-login {
    position: relative;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.35);
    transition: all 0.3s ease;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5); }
.btn-login:hover::before { left: 100%; }
.btn-arrow { transition: transform 0.3s ease; }
.btn-login:hover .btn-arrow { transform: translateX(5px); }

.security-text-subtle {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
}

.security-text-subtle i { color: var(--azure); font-size: 13px; }
.security-text-subtle strong { color: var(--text-primary); font-weight: 600; }

.error-msg {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ----------------------------------------------------
   🚀 СТИЛІ ДАШБОРДУ ТА НАВІГАЦІЙНОЇ ПАНЕЛІ (DASHBOARD.PHP)
---------------------------------------------------- */
.dashboard-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 16px 20px;
}

.top-navbar-wrapper {
    width: 100%;
}

.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 8px 18px;
    box-shadow: 0 10px 30px var(--shadow);
    gap: 12px;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-brand-link:hover {
    opacity: 0.85;
    transform: scale(0.98);
}

.nav-logo-img {
    max-height: 34px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    margin-left: 14px;
    margin-right: auto;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-menu li.active a,
.nav-menu a:hover {
    background: var(--right-panel-bg);
    color: var(--azure);
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* 👥 ВІДЖЕТ "В МЕРЕЖІ" (36px) */
.online-team-wrapper {
    position: relative;
}

.online-team-pill {
    display: flex;
    align-items: center;
    height: 36px;
    background: var(--ios-pill-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--ios-pill-border);
    border-radius: 20px;
    padding: 0 12px;
    gap: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
}

.online-team-pill:hover {
    border-color: var(--azure);
    background: var(--right-panel-bg);
}

.online-team-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.team-chevron {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.team-chevron.open {
    transform: rotate(180deg);
    color: var(--azure);
}

.online-users-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 15px 35px var(--shadow);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.online-users-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--input-border);
    margin-bottom: 10px;
}

.popover-header h5 {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
}

.popover-badge {
    font-size: 10px;
    font-weight: 700;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.popover-users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popover-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.popover-user-item:hover {
    background: var(--ios-pill-bg);
}

.popover-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azure), var(--blue));
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.popover-user-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
    flex-grow: 1;
}

.popover-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.popover-role {
    font-size: 9px;
    color: var(--text-secondary);
}

/* 🧭 ВІДЖЕТ ГОДИННИКА (36px) */
.sketch-clock-pill {
    display: flex;
    align-items: center;
    height: 36px;
    background: var(--ios-pill-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--ios-pill-border);
    border-radius: 20px;
    padding: 0 12px 0 3px;
    box-shadow: 0 2px 10px var(--shadow);
    gap: 8px;
}

.analog-clock-disc {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), inset 0 -1px 2px rgba(0, 0, 0, 0.15);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.analog-svg { width: 100%; height: 100%; }
.clock-face-bg { fill: #ffffff; }
.clock-tick-major { stroke: #1e293b; stroke-width: 3.5; stroke-linecap: round; }
.clock-tick-minor { stroke: #94a3b8; stroke-width: 2; stroke-linecap: round; }

.hand {
    transform-origin: 50px 50px;
    stroke-linecap: round;
    transition: transform 0.05s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

.hour-hand { stroke: #0f172a; stroke-width: 5; }
.minute-hand { stroke: #334155; stroke-width: 4; }
.second-hand { stroke: #ef4444; stroke-width: 2.2; }
.center-pin { fill: #ef4444; }

.digital-clock-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    line-height: 1.1;
}

.sketch-time-text {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

.sketch-date-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.2px;
}

/* ----------------------------------------------------
   👤 КАПСУЛА ТА ВІДЖЕТ ПРОФІЛЮ
---------------------------------------------------- */
.user-capsule-wrapper {
    position: relative;
}

.user-capsule-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    background: var(--ios-pill-bg);
    border: 1px solid var(--ios-pill-border);
    padding: 2px 10px 2px 3px;
    border-radius: 20px;
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.user-capsule-btn:hover {
    border-color: var(--azure);
    background: var(--right-panel-bg);
}

.user-avatar-badge,
.dropdown-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azure), var(--blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dropdown-avatar {
    width: 42px;
    height: 42px;
    font-size: 15px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Статусні ободки */
.status-ring-green { border: 2px solid #22c55e !important; box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); }
.status-ring-red { border: 2px solid #ef4444 !important; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.status-ring-orange { border: 2px solid #f97316 !important; box-shadow: 0 0 8px rgba(249, 115, 22, 0.4); }
.status-ring-yellow { border: 2px solid #eab308 !important; box-shadow: 0 0 8px rgba(234, 179, 8, 0.4); }

.user-capsule-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1;
}

.user-capsule-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.user-capsule-role {
    font-size: 9px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.profile-chevron {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 2px;
    transition: transform 0.3s ease, color 0.2s ease;
}

.profile-chevron.open {
    transform: rotate(180deg);
    color: var(--azure);
}

.profile-dropdown-widget {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 15px 35px var(--shadow);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-dropdown-widget.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--input-border);
}

.dropdown-user-titles h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.dropdown-role-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--azure);
    text-transform: uppercase;
}

/* 🟢 СЕЛЕКТОР СТАТУСУ */
.dropdown-status-box {
    margin: 12px 0;
}

.custom-status-dropdown {
    position: relative;
    width: 100%;
}

.custom-status-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ios-pill-bg);
    border: 1px solid var(--ios-pill-border);
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-status-selected:hover {
    border-color: var(--azure);
    background: var(--right-panel-bg);
}

.selected-status-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    flex-grow: 1;
}

.custom-status-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.custom-status-arrow.open {
    transform: rotate(180deg);
    color: var(--azure);
}

.custom-status-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 10px 25px var(--shadow);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.25s ease;
}

.custom-status-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-status-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.2s ease;
}

.custom-status-option:hover,
.custom-status-option.active {
    background: var(--ios-pill-bg);
    color: var(--azure);
}

.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-pulse-dot.green { background-color: #22c55e; box-shadow: 0 0 8px #22c55e; }
.status-pulse-dot.red { background-color: #ef4444; box-shadow: 0 0 8px #ef4444; }
.status-pulse-dot.orange { background-color: #f97316; box-shadow: 0 0 8px #f97316; }
.status-pulse-dot.yellow { background-color: #eab308; box-shadow: 0 0 8px #eab308; }

/* 💬 СЕКЦІЯ КОМУНІКАЦІЇ */
.dropdown-section {
    margin: 12px 0;
    padding-top: 10px;
    border-top: 1px solid var(--input-border);
}

.dropdown-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.comm-links-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comm-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    text-align: left;
    line-height: 1;
}

.comm-link-item:hover {
    border-color: var(--azure);
    background: var(--right-panel-bg);
    transform: translateX(2px);
}

.comm-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.comm-icon.telegram { color: #229ED9; }
.comm-icon.workchat { color: var(--azure); }
.comm-icon.meet { color: #22c55e; }
.comm-icon.presentation { color: var(--orange); }

.external-icon, .add-icon {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-secondary);
}

.presentation-btn {
    border: 1px solid var(--input-border);
    margin-bottom: 4px;
}

.presentation-btn span {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.dropdown-settings {
    border-top: 1px solid var(--input-border);
    padding-top: 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-primary);
}

.dropdown-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-logout-btn:hover {
    background: #ef4444;
    color: #ffffff;
}

/* 📱 iOS SWITCHER (36px) — В КІНЦІ ПАНЕЛІ */
.ios-switch-wide {
    position: relative;
    display: inline-block;
    width: 76px;
    height: 36px;
    cursor: pointer;
    flex-shrink: 0;
}

.ios-switch-wide input { opacity: 0; width: 0; height: 0; }

.ios-slider-wide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--ios-bg);
    border-radius: 30px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.switch-icon { width: 20px; height: 20px; z-index: 1; }

.ios-knob-wide {
    position: absolute;
    content: "";
    height: 30px;
    width: 30px;
    left: 3px;
    bottom: 3px;
    background-color: var(--ios-knob);
    border-radius: 50%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.ios-switch-wide input:checked + .ios-slider-wide .ios-knob-wide {
    transform: translateX(40px);
}

/* 📱 МІНІ ТУМБЛЕРЫ */
.ios-switch-mini {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.ios-switch-mini input { opacity: 0; width: 0; height: 0; }

.ios-slider-mini {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--ios-bg);
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.ios-slider-mini::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--ios-knob);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.ios-switch-mini input:checked + .ios-slider-mini { background-color: var(--azure); }
.ios-switch-mini input:checked + .ios-slider-mini::before { transform: translateX(18px); }

/* 📱 АДАПТИВНІСТЬ */
@media (max-width: 1200px) {
    .nav-menu span { display: none; }
    .nav-menu a { padding: 7px 9px; }
}

@media (max-width: 850px) {
    .top-navbar { flex-wrap: wrap; }
    .nav-menu { order: 3; width: 100%; overflow-x: auto; margin-left: 0; }
}

/* ====================================================
   🔮 REALISTIC 3D SIRI GLASS SPHERE (EXACT APPLE LOOK)
==================================================== */

.siri-glass-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 99;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

/* 🌟 Зовнішнє м'яке свічення за кулею */
.siri-ambient-shadow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.45) 0%, rgba(244, 63, 94, 0.35) 50%, rgba(168, 85, 247, 0.25) 70%, transparent 100%);
    filter: blur(12px);
    opacity: 0.8;
    animation: siriAmbientPulse 3.5s ease-in-out infinite alternate;
}

/* 🌐 Прозора Скляна 3D Сфера */
.siri-glass-sphere {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.2) 0%, rgba(5, 10, 25, 0.85) 100%);
    box-shadow: 
        inset 0 0 12px rgba(255, 255, 255, 0.3),
        inset 0 3px 6px rgba(255, 255, 255, 0.45),
        inset 0 -6px 12px rgba(6, 182, 212, 0.35),
        0 10px 25px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

/* Верхній скляний відблиск (Світлова дуга) */
.siri-glass-glare {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 75%);
    border-radius: 50% 50% 0 0;
    pointer-events: none;
    z-index: 6;
}

/* 💥 М'яке розмите ядро в центрі */
.siri-center-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0.9) 30%, rgba(244, 63, 94, 0.6) 65%, transparent 100%);
    filter: blur(1.5px);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.9), 0 0 30px rgba(244, 63, 94, 0.7);
    z-index: 5;
    animation: coreBreath 2.8s ease-in-out infinite alternate;
}

/* 🌊 Плазмові кольорові хвилі (Blobs) */
.siri-plasma {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: blur(6px);
    opacity: 0.9;
}

.blob-pink {
    width: 44px;
    height: 44px;
    top: 0;
    left: 20%;
    background: radial-gradient(circle, #f43f5e 0%, #fb7185 60%, transparent 100%);
    animation: plasmaFlow1 5s ease-in-out infinite alternate;
}

.blob-cyan {
    width: 42px;
    height: 42px;
    bottom: 2%;
    right: 10%;
    background: radial-gradient(circle, #06b6d4 0%, #38bdf8 65%, transparent 100%);
    animation: plasmaFlow2 6s ease-in-out infinite alternate;
}

.blob-purple {
    width: 38px;
    height: 38px;
    top: 15%;
    right: 5%;
    background: radial-gradient(circle, #c084fc 0%, #a855f7 70%, transparent 100%);
    animation: plasmaFlow1 7s ease-in-out infinite alternate-reverse;
}

.blob-teal {
    width: 40px;
    height: 40px;
    bottom: 10%;
    left: 5%;
    background: radial-gradient(circle, #2dd4bf 0%, #0d9488 70%, transparent 100%);
    animation: plasmaFlow2 5.5s ease-in-out infinite alternate-reverse;
}

/* 🏷️ Бейдж AI */
.siri-glass-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-main);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

/* ⚡ Наведення мишки */
.siri-glass-trigger:hover .siri-glass-sphere {
    transform: scale(1.12);
    box-shadow: 
        inset 0 0 16px rgba(255, 255, 255, 0.5),
        inset 0 4px 10px rgba(255, 255, 255, 0.7),
        0 12px 30px rgba(6, 182, 212, 0.5);
}

.siri-glass-trigger:hover .siri-ambient-shadow {
    opacity: 1;
    transform: scale(1.25);
    filter: blur(16px);
}

/* 🔄 АНІМАЦІЇ SIRI */
@keyframes siriAmbientPulse {
    0% { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 0.85; transform: scale(1.12); }
}

@keyframes coreBreath {
    0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.75; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

@keyframes plasmaFlow1 {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    100% {
        border-radius: 60% 40% 30% 70% / 50% 30% 70% 50%;
        transform: translate(5px, -6px) rotate(180deg) scale(1.15);
    }
}

@keyframes plasmaFlow2 {
    0% {
        border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    100% {
        border-radius: 30% 70% 60% 40% / 40% 60% 30% 70%;
        transform: translate(-6px, -4px) rotate(-180deg) scale(1.1);
    }
}

/* 🔮 ВИСУВНА ПАНЕЛЬ AI ПОМІЧНИКА (ІЗОЛЬОВАНА ВІД ПРОБИВАННЯ ТІНЕЙ) */
.ai-widget-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-widget-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ai-widget-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: var(--card-bg);
    border-left: 1px solid var(--input-border);
    box-shadow: -15px 0 40px var(--shadow);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease, opacity 0.35s ease;
}

.ai-widget-drawer.active {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Шапка віджета */
.ai-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--input-border);
}

.ai-brand-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar-sparkle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--azure), var(--blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.ai-title-info h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.ai-status-online {
    font-size: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-close-btn {
    background: var(--ios-pill-bg);
    border: 1px solid var(--ios-pill-border);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ai-close-btn:hover {
    color: var(--text-primary);
    background: var(--right-panel-bg);
}

/* Вкладки */
.ai-tabs-nav {
    display: flex;
    padding: 10px 20px;
    gap: 8px;
    border-bottom: 1px solid var(--input-border);
    background: var(--ios-pill-bg);
}

.ai-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-tab-btn.active {
    background: var(--card-bg);
    color: var(--azure);
    box-shadow: 0 2px 8px var(--shadow);
}

.ai-drawer-body {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.ai-tab-content {
    display: none;
    height: 100%;
    flex-direction: column;
}

.ai-tab-content.active {
    display: flex;
}

.ai-welcome-banner {
    padding: 14px 20px;
    background: var(--ios-pill-bg);
    border-bottom: 1px solid var(--input-border);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.ai-quick-prompts {
    padding: 12px 20px;
    border-bottom: 1px solid var(--input-border);
}

.prompts-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.prompts-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.prompt-chip {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 5px 10px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-chip:hover {
    border-color: var(--azure);
    background: var(--right-panel-bg);
}

.ai-chat-messages {
    flex-grow: 1;
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.chat-message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azure), var(--blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.message-bubble {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 12.5px;
    color: var(--text-primary);
    line-height: 1.45;
    position: relative;
}

.chat-message.user .message-bubble {
    background: var(--azure);
    color: #ffffff;
    border-color: transparent;
}

.message-time {
    display: block;
    font-size: 9px;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

.ai-typing-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 11px;
    color: var(--text-secondary);
}

.ai-typing-indicator.active {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    background: var(--azure);
    border-radius: 50%;
    animation: typingBounce 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.ai-chat-input-form {
    padding: 12px 20px;
    border-top: 1px solid var(--input-border);
    background: var(--card-bg);
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 6px 10px 6px 14px;
}

.chat-input-container textarea {
    flex-grow: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    resize: none;
    max-height: 80px;
    font-family: inherit;
}

.ai-send-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--azure);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ai-send-btn:hover {
    transform: scale(1.05);
}

.chat-input-footer {
    text-align: center;
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-secondary);
}

/* База знань */
#tab-content-kb {
    padding: 20px;
    overflow-y: auto;
}

.kb-search-box {
    position: relative;
    margin-bottom: 16px;
}

.kb-search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 13px;
}

.kb-search-box input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.kb-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kb-category-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-category-card:hover {
    border-color: var(--azure);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.kb-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.kb-card-icon.azure { background: rgba(56, 189, 248, 0.15); color: var(--azure); }
.kb-card-icon.orange { background: rgba(255, 167, 38, 0.15); color: var(--orange); }
.kb-card-icon.green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.kb-card-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }

.kb-card-content h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.kb-card-content p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 6px;
}

.kb-card-meta {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* ====================================================
   📊 СТИЛІ МОДУЛЯ «ПРИБУТКОВІ»
==================================================== */

.main-dashboard-content {
    margin-top: 28px;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 14px;
}

.page-main-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon { color: var(--azure); }

.page-subtitle {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.header-controls-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sheet-sync-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ios-pill-bg);
    border: 1px solid var(--ios-pill-border);
    padding: 0 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    height: 36px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.sheet-sync-btn:hover {
    background: var(--right-panel-bg);
    color: var(--azure);
    border-color: var(--azure);
}

.sync-spin-icon {
    font-size: 12px;
}

.month-selector-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    padding: 0 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 4px 12px var(--shadow);
    height: 36px;
    box-sizing: border-box;
}

.header-month-select {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 16px;
}

.header-month-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.select-arrow {
    position: absolute;
    right: 12px;
    font-size: 9px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* 📈 6 КОМПАКТНИХ КАРТОК */
.revenue-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.revenue-card.compact {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 18px var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
    min-height: 72px;
}

.revenue-card.compact:hover {
    transform: translateY(-2px);
    border-color: var(--azure);
}

.card-icon-wrapper.purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.card-icon-wrapper.pink { background: rgba(236, 72, 153, 0.15); color: #ec4899; }

.flag-star {
    opacity: 0.1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='%23a855f7' d='M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.4 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z'/%3E%3C/svg%3E");
}

.flag-receipt {
    opacity: 0.1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23ec4899' d='M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM96 128H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128H224c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z'/%3E%3C/svg%3E");
}

.quick-dates-group {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    overflow: hidden;
    height: 36px;
    box-shadow: 0 4px 12px var(--shadow);
}

.quick-date-btn {
    background: transparent;
    border: none;
    border-right: 1px solid var(--input-border);
    padding: 0 14px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-date-btn:last-child {
    border-right: none;
}

.quick-date-btn:hover {
    background: var(--ios-pill-bg);
    color: var(--text-primary);
}

.quick-date-btn.active {
    background: var(--azure);
    color: #ffffff;
}

.flag-bg {
    position: absolute;
    right: -5px;
    top: -5px;
    bottom: -5px;
    width: 145px;
    pointer-events: none;
    opacity: 0.22;
    background-size: cover;
    background-position: center right;
    mask-image: linear-gradient(to right, transparent 0%, black 60%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60%);
    z-index: 0;
    border-radius: 0 16px 16px 0;
}

.flag-usd {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 741 390'%3E%3Cpath fill='%23b22234' d='M0 0h741v390H0z'/%3E%3Cpath stroke='%23fff' stroke-width='30' d='M0 45h741M0 105h741M0 165h741M0 225h741M0 285h741M0 345h741'/%3E%3Cpath fill='%233c3b6e' d='M0 0h296v210H0z'/%3E%3C/svg%3E");
}

.flag-eur {
    opacity: 0.25;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 341'%3E%3Crect width='512' height='341' fill='%23003399'/%3E%3Cg fill='%23ffcc00' transform='translate(256,170.5) scale(1.15)'%3E%3Cg id='s'%3E%3Cpath id='st' d='M0-110l3.2 9.8h10.3l-8.3 6 3.2 9.8-8.4-6.1-8.4 6.1 3.2-9.8-8.3-6h10.3z'/%3E%3Cuse href='%23st' transform='rotate(30)'/%3E%3C/g%3E%3Cuse href='%23s' transform='rotate(60)'/%3E%3Cuse href='%23s' transform='rotate(120)'/%3E%3Cuse href='%23s' transform='rotate(180)'/%3E%3Cuse href='%23s' transform='rotate(240)'/%3E%3Cuse href='%23s' transform='rotate(300)'/%3E%3C/g%3E%3C/svg%3E");
}

.flag-uah {
    opacity: 0.25;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Crect width='1200' height='400' fill='%230057b7'/%3E%3Crect y='400' width='1200' height='400' fill='%23ffd700'/%3E%3C/svg%3E");
}

.flag-total {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='%23ff9800' d='M20 180h160v10H20zM40 120h25v50H40zM85 80h25v90H85zM130 40h25v130h-25z'/%3E%3C/svg%3E");
}

.card-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.card-icon-wrapper.cyan { background: rgba(56, 189, 248, 0.15); color: var(--azure); }
.card-icon-wrapper.green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.card-icon-wrapper.yellow { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.card-icon-wrapper.orange { background: rgba(255, 167, 38, 0.15); color: var(--orange); }

.card-info-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.card-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.card-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 1px 0;
    letter-spacing: -0.3px;
}

.unit-text { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.card-subtext { font-size: 10px; font-weight: 600; }
.card-subtext.positive { color: #22c55e; }
.card-subtext.azure-link { color: var(--azure); }

/* 🛠️ ПАНЕЛЬ ФІЛЬТРІВ */
.table-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-search-box {
    position: relative;
    flex-grow: 1;
    max-width: 380px;
    height: 38px;
}

.filter-search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 12.5px;
}

.filter-search-box input {
    width: 100%;
    height: 100%;
    padding: 0 12px 0 36px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 12.5px;
    outline: none;
    box-sizing: border-box;
}

.filter-search-box input:focus {
    border-color: var(--azure);
}

.filter-dropdowns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 0 12px;
    height: 38px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

.filter-select option { background: var(--card-bg); }

/* Таблиця */
.revenue-table-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 18px;
    overflow-x: auto;
    box-shadow: 0 8px 25px var(--shadow);
}

.revenue-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12.5px;
}

.revenue-data-table th {
    background: var(--ios-pill-bg);
    padding: 12px 16px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--input-border);
    white-space: nowrap;
}

.revenue-data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--input-border);
    color: var(--text-primary);
    vertical-align: middle;
    white-space: nowrap;
}

.revenue-data-table tr:last-child td { border-bottom: none; }
.revenue-data-table tbody tr:hover { background: var(--ios-pill-bg); }

.font-bold { font-weight: 800; }
.font-semibold { font-weight: 600; }

.currency-pill {
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 800;
    display: inline-block;
    letter-spacing: 0.5px;
}

.currency-pill.curr-usd {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.currency-pill.curr-eur {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.currency-pill.curr-uah {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.manager-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-primary);
}

.manager-badge i { color: var(--azure); }

.category-tag {
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 700;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
}

.text-subtle-dash { color: var(--text-secondary); opacity: 0.5; }

/* ====================================================
   📊 ЗАМОРОЖЕНА ШАПКА ТАБЛИЦІ З СІТКОЮ-ГРАДІЄНТОМ
==================================================== */

.table-fixed-header {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
}

/* ФІКСОВАНА ШАПКА ТАБЛИЦІ З СІТКОЮ В СТИЛІ LOGIN.PHP */
.revenue-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--card-bg);
    /* Паттерн технічної сітки */
    background-image: 
        linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
    background-size: 20px 20px;
    border-bottom: 1px solid var(--input-border);
    box-shadow: 0 4px 12px var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.revenue-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--card-bg);
    box-shadow: 0 1px 2px var(--input-border);
}

.revenue-data-table tbody tr {
    animation: fadeInRow 0.3s ease forwards;
}

@keyframes fadeInRow {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sync-text {
    font-size: 11px;
    opacity: 0.9;
}

.no-results-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    gap: 12px;
}

.no-results-msg i {
    font-size: 32px;
    color: var(--input-border);
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    margin-bottom: 30px;
}

.page-num-btn, .page-control-btn {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.page-num-btn:hover, .page-control-btn:hover {
    border-color: var(--azure);
    color: var(--azure);
}

.page-num-btn.active {
    background: var(--azure);
    color: #ffffff;
    border-color: var(--azure);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

/* ====================================================
   📅 УНІФІКОВАНІ КАСТОМНІ СЕЛЕКТОРЫ (GLASSMORPHISM)
==================================================== */

.custom-select-dropdown {
    position: relative;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    padding: 0 14px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 4px 12px var(--shadow);
    height: 38px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Окремий кастомний радіус для селектора місяця в шапці */
#dropdown-month .custom-select-trigger {
    border-radius: 20px;
}

.custom-select-trigger:hover {
    border-color: var(--azure);
    background: var(--right-panel-bg);
}

.select-prefix-icon {
    color: var(--azure);
    font-size: 13px;
    flex-shrink: 0;
}

.selected-text {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-trigger .select-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: auto;
}

.custom-select-trigger .select-arrow.open {
    transform: rotate(180deg);
    color: var(--azure);
}

/* Випадаюче меню */
.custom-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    width: max-content;
    max-width: 260px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 12px 30px var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 260px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-menu::-webkit-scrollbar {
    width: 4px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

.custom-select-menu::-webkit-scrollbar-thumb:hover {
    background: var(--azure);
}

.custom-select-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select-item:hover {
    background: var(--ios-pill-bg);
    color: var(--azure);
}

.custom-select-item.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
    font-weight: 700;
}

.custom-select-item.active::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    color: var(--azure);
}

/* ====================================================
   💰 СТИЛІ МОДУЛЯ «ЗАБОРГОВАНІСТЬ» (DEBTS MODULE)
==================================================== */

.card-icon-wrapper.azure-bg {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
}

.card-icon-wrapper.green-bg {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

/* Плашки сум заборгованості */
.debt-amount-pill {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    display: inline-block;
    letter-spacing: 0.3px;
}

.debt-amount-pill.usd {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.debt-amount-pill.eur {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Бейдж коментаря */
.comment-text-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 11.5px;
    color: var(--text-primary);
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comment-text-badge i {
    color: var(--orange);
    font-size: 12px;
    flex-shrink: 0;
}

/* ====================================================
   📊 КОМПАКТНИЙ 3-КАРТОЧНИЙ ВІДЖЕТ З АНІМАЦІЄЮ ТА ПРАПОРАМИ
==================================================== */

.debts-dynamics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.dynamics-card.compact {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 6px 20px var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.dynamics-card.compact:hover {
    transform: translateY(-2px);
    border-color: var(--azure);
}

/* 🚩 Напівпрозорий фон прапорів у картках */
.dynamics-card .flag-bg {
    position: absolute;
    right: -5px;
    top: -5px;
    bottom: -5px;
    width: 135px;
    pointer-events: none;
    opacity: 0.18;
    background-size: cover;
    background-position: center right;
    mask-image: linear-gradient(to right, transparent 0%, black 70%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 70%);
    z-index: 0;
    border-radius: 0 16px 16px 0;
}

.dynamics-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 2px;
    position: relative;
    z-index: 1;
}

.dynamics-value {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.3px;
    margin-bottom: 1px;
    position: relative;
    z-index: 1;
}

.text-green { color: #22c55e; }
.text-blue { color: #38bdf8; }
.text-orange { color: #f97316; }
.text-red { color: #ef4444; }

.dynamics-subtext {
    font-size: 10.5px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* Внутрішній розрахунковий блок */
.dynamics-inner-box {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.dynamics-inner-box.border-green { border-color: rgba(34, 197, 94, 0.3); }
.dynamics-inner-box.border-blue { border-color: rgba(56, 189, 248, 0.3); }
.dynamics-inner-box.border-red { border-color: rgba(239, 68, 68, 0.3); }

.inner-box-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 800;
}

.inner-label {
    color: var(--text-secondary);
    letter-spacing: 0.4px;
}

.inner-val {
    font-size: 11px;
    font-weight: 800;
}

/* 🌟 ВИРАЗНА ТОВША ЛІНІЯ ПРОГРЕСУ З НЕОНОВИМ СЯЙВОМ */
.dynamics-progress-track {
    width: 100%;
    height: 8px;
    background: var(--ios-pill-bg);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dynamics-progress-bar {
    height: 100%;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Яскраві неонові градієнти */
.bg-green { 
    background: linear-gradient(90deg, #10b981, #22c55e); 
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6); 
}

.bg-blue { 
    background: linear-gradient(90deg, #0284c7, #38bdf8); 
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6); 
}

.bg-red { 
    background: linear-gradient(90deg, #dc2626, #ef4444); 
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); 
}

/* ✨ АНІМАЦІЯ БЛИСКУ НА ЛІНІЇ ПРОГРЕСУ */
.dynamics-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
    animation: shimmerGlint 2.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shimmerGlint {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.inner-box-footer {
    font-size: 10px;
    font-weight: 700;
    text-align: right;
}

/* ====================================================
   🏆 СТИЛІ БЛОКІВ ТОП-8 БОРЖНИКІВ ТА МЕНЕДЖЕРІВ
==================================================== */

.analytics-section-card {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 20px 22px;
    margin-bottom: 22px;
    box-shadow: 0 10px 30px var(--shadow);
}

.analytics-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.analytics-card-header h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.section-badge.azure {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
    border-color: rgba(56, 189, 248, 0.3);
}

/* ====================================================
   🏆 ВИПРАВЛЕНІ СТИЛІ СЛАЙДЕРА ТОП-8 (GLASSMORPHISM)
==================================================== */

/* М'яка дрібна фонова сітка */
.analytics-section-card.grid-bg {
    position: relative;
    background-color: var(--card-bg);
    background-image: 
        linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
    background-size: 12px 12px; /* Зменшено клітку вдвічі */
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 10px 30px var(--shadow);
}

.slider-controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-arrow-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    outline: none;
}

.slider-arrow-btn:hover {
    border-color: var(--azure);
    color: var(--azure);
    background: var(--right-panel-bg);
}

/* Контейнер слайдера */
.top-debtors-slider-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    padding: 4px 2px;
}

.top-debtors-slider-container::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
}

.top-debtors-slider-track {
    display: flex;
    gap: 12px;
}

/* Компактна акуратна картка */
.top-debtors-slider-track .top-debtor-card {
    flex: 0 0 270px;
    width: 270px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 4px 14px var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.top-debtors-slider-track .top-debtor-card:hover {
    border-color: var(--azure);
    transform: translateY(-2px);
}

/* Зменшений квадратний бейдж номера ЗЛІВА */
.debtor-rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Текст та ім'я клієнта */
.debtor-info {
    flex: 1;
    min-width: 0; /* Дозволяє працювати ellipsis */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.debtor-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.debtor-manager {
    font-size: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* Суми заборгованостей праворуч */
.debtor-sums {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.debt-tag {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.debt-tag.usd {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.debt-tag.eur {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* 🎨 КОЛЬОРИ БЕЙДЖІВ РАНГІВ */
.debtor-rank-badge.rank-badge-1 { background: rgba(234, 179, 8, 0.2); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.4); }
.debtor-rank-badge.rank-badge-2 { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.debtor-rank-badge.rank-badge-3 { background: rgba(249, 115, 22, 0.2); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.4); }
.debtor-rank-badge.rank-badge-4 { background: rgba(168, 85, 247, 0.2); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.4); }
.debtor-rank-badge.rank-badge-5 { background: rgba(34, 197, 94, 0.2); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.4); }
.debtor-rank-badge.rank-badge-6 { background: rgba(236, 72, 153, 0.2); color: #ec4899; border: 1px solid rgba(236, 72, 153, 0.4); }
.debtor-rank-badge.rank-badge-7 { background: rgba(99, 102, 241, 0.2); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.4); }
.debtor-rank-badge.rank-badge-8 { background: rgba(20, 184, 166, 0.2); color: #14b8a6; border: 1px solid rgba(20, 184, 166, 0.4); }

/* ====================================================
   👔 ОНОВЛЕНИЙ СТИЛЬ ТА АВАТАРКИ МЕНЕДЖЕРІВ
==================================================== */

.analytics-section-card.manager-theme-card {
    background: var(--card-bg);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.08);
}

.text-indigo {
    color: #6366f1;
}

.section-badge.indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ====================================================
   👔 ВИПРАВЛЕНІ СТИЛІ СЛАЙДЕРА ТА АВАТАРОК МЕНЕДЖЕРІВ
==================================================== */

.analytics-section-card.manager-theme-card {
    background: var(--card-bg);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.08);
}

.text-indigo {
    color: #6366f1;
}

.section-badge.indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Слайдер менеджерів */
.managers-slider-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    padding: 4px 2px;
}

.managers-slider-container::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
}

.managers-slider-track {
    display: flex;
    gap: 12px;
}

.managers-slider-track .manager-stat-card {
    flex: 0 0 230px;
    width: 230px;
    box-sizing: border-box;
    position: relative;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 4px 14px var(--shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.managers-slider-track .manager-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #38bdf8);
    opacity: 0.8;
}

.managers-slider-track .manager-stat-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.2);
}

/* Шапка картки та жорсткі розміри аватарок (36x36px) */
.mgr-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--input-border);
}

.mgr-avatar-container {
    position: relative;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.mgr-avatar-img {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #6366f1;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
    display: block;
    box-sizing: border-box;
}

.mgr-avatar-fallback {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.mgr-title-box {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mgr-title-box h4 {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.mgr-clients-count {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 1px;
}

.mgr-debts-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mgr-debt-item {
    display: flex;
    flex-direction: column;
}

.mgr-debt-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mgr-debt-val {
    font-size: 12px;
    font-weight: 800;
    margin-top: 1px;
}

.mgr-debt-val.usd { color: var(--azure); }
.mgr-debt-val.eur { color: #22c55e; }

/* ====================================================
   🌟 ОНОВЛЕНИЙ КОМПАКТНИЙ ПРИВІТАЛЬНИЙ БЛОК GEMINI
==================================================== */

/* Gemini-рамка з переливанням по периметру */
.gemini-border-wrapper {
    position: relative;
    padding: 2px;
    border-radius: 20px;
    background: linear-gradient(90deg, #38bdf8, #a855f7, #f97316, #3b82f6, #38bdf8);
    background-size: 300% 300%;
    animation: geminiGlow 6s linear infinite;
    box-shadow: 0 8px 25px var(--shadow);
    margin-bottom: 18px;
    box-sizing: border-box;
    width: 100%;
}

@keyframes geminiGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dashboard-welcome-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 18px;
    padding: 14px 20px; /* Звужено вертикальні відступи */
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Дрібна фонова сітка 8px */
.tech-grid-pattern.micro-grid {
    background-size: 8px 8px !important;
    opacity: 0.45;
}

.welcome-bg-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.12) 0%, transparent 60%),
                radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.1) 0%, transparent 60%);
    animation: ambientPulse 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes ambientPulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
    100% { transform: scale(1.08) translate(10px, -10px); opacity: 1; }
}

.welcome-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.welcome-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.welcome-title {
    font-size: 21px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* ====================================================
   📜 ОДНОРЯДНА ВТИСНУТА БІГУЧА СТРІЧКА (STRICT SINGLE LINE)
==================================================== */

.ticker-wrapper.deep-bar.inset-recessed {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border-radius: 12px;
    padding: 0 8px;
    overflow: hidden !important;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.ticker-badge {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px;
    height: 30px !important;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1;
}

.ticker-today-pill {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 6px;
    margin-left: 4px;
}

.ticker-container {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.ticker-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: max-content;
    height: 100%;
    white-space: nowrap !important;
    animation: tickerScroll 35s linear infinite;
}

.ticker-container:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px;
    padding-right: 12px;
    flex-shrink: 0 !important;
    height: 100%;
    white-space: nowrap !important;
}

.ticker-item-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex !important;
    align-items: center;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.ticker-item-card {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap !important;
    height: 30px;
    box-sizing: border-box;
    line-height: 1;
}

/* Іконки та елементи без скорочення */
.ticker-mgr, .ticker-sum, .ticker-client {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px;
    white-space: nowrap !important;
    line-height: 1;
}

.ticker-mgr { font-size: 11px; font-weight: 700; }
.ticker-sum.text-azure-val { font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.ticker-client { font-size: 11.5px; font-weight: 700; }

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ----------------------------------------------------
   ☀️ СВІТЛА ТЕМА (LIGHT THEME - INSET)
---------------------------------------------------- */
:root[data-theme="light"] .ticker-wrapper.deep-bar.inset-recessed {
    background: #d0e0ee !important;
    border: 1px solid #a8c1d8;
    box-shadow: inset 0 3px 7px rgba(15, 23, 42, 0.16), inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

:root[data-theme="light"] .ticker-item-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(168, 193, 216, 0.8);
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .ticker-item-link:hover .ticker-item-card {
    background: #ffffff;
    border-color: #008ba3;
    box-shadow: 0 3px 8px rgba(0, 139, 163, 0.2);
}

:root[data-theme="light"] .ticker-badge {
    background: #ffffff;
    border: 1px solid rgba(168, 193, 216, 0.9);
    color: #0f172a;
}

:root[data-theme="light"] .ticker-mgr { color: #475569; }
:root[data-theme="light"] .ticker-mgr i { color: #008ba3; }
:root[data-theme="light"] .ticker-sum.text-azure-val {
    color: #00768d !important;
    background: rgba(0, 139, 163, 0.12);
    border: 1px solid rgba(0, 139, 163, 0.3);
}
:root[data-theme="light"] .ticker-sum.text-azure-val i { color: #008ba3; }
:root[data-theme="light"] .ticker-client { color: #0f172a; }
:root[data-theme="light"] .ticker-client i { color: #64748b; }

/* ----------------------------------------------------
   🌙 ТЕМНА ТЕМА (DARK THEME - INSET)
---------------------------------------------------- */
:root[data-theme="dark"] .ticker-wrapper.deep-bar.inset-recessed {
    background: #060a12 !important;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.85);
}

:root[data-theme="dark"] .ticker-item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

:root[data-theme="dark"] .ticker-item-link:hover .ticker-item-card {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    box-shadow: 0 3px 10px rgba(56, 189, 248, 0.25);
}

:root[data-theme="dark"] .ticker-badge {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    color: #f8fafc;
}

:root[data-theme="dark"] .ticker-mgr { color: #94a3b8; }
:root[data-theme="dark"] .ticker-mgr i { color: #38bdf8; }
:root[data-theme="dark"] .ticker-sum.text-azure-val {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
}
:root[data-theme="dark"] .ticker-sum.text-azure-val i { color: #38bdf8; }
:root[data-theme="dark"] .ticker-client { color: #f8fafc; }
:root[data-theme="dark"] .ticker-client i { color: #64748b; }

/* ====================================================
   🌤️ 💱 РЕАЛІСТИЧНА ПОГОДА, КУРСИ ТА СТИЛЬНА МОДАЛКА
==================================================== */

.welcome-widgets-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 🌤️ Погода */
.weather-pill.realistic-weather {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 0 16px;
    height: 38px !important;
    border-radius: 26px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 2px 6px var(--shadow);
    box-sizing: border-box;
}

.weather-sun-icon {
    font-size: 16px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.4));
}

.weather-location {
    font-weight: 700;
    color: var(--text-primary);
}

.weather-deg {
    font-weight: 800;
    color: var(--text-primary);
}

.weather-status-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* 💱 Курси валют */
.currency-rates-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 0 16px;
    height: 38px !important;
    border-radius: 26px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px var(--shadow);
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-rates-pill:hover {
    border-color: var(--azure);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.rate-divider {
    color: var(--text-secondary);
    opacity: 0.4;
    font-weight: 400;
}

.rate-edit-icon {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 2px;
}

.currency-rates-pill:hover .rate-edit-icon {
    color: var(--azure);
}

/* ⚙️ МОДАЛЬНЕ ВІКНО ЗМІНИ КУРСУ ВАЛЮТ (GLASSMORPHISM) */
.rates-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.rates-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.rates-modal-card {
    width: 360px;
    max-width: 90vw;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rates-modal-overlay.active .rates-modal-card {
    transform: scale(1);
}

.rates-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--input-border);
}

.rates-modal-header h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rates-modal-close {
    background: var(--ios-pill-bg);
    border: 1px solid var(--ios-pill-border);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.rates-modal-close:hover {
    color: var(--text-primary);
    background: var(--right-panel-bg);
}

.rates-inputs-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.rate-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rate-input-group label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rate-input-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.rate-input-group input:focus {
    border-color: var(--azure);
}

.rates-save-btn {
    width: 100%;
    padding: 11px;
    background: var(--azure);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.rates-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.5);
}

/* ====================================================
   👋 АНІМАЦІЯ РУКИ ПРИВІТАННЯ ТА ВІДЖЕТИ ПРАВОРУЧ
==================================================== */

.waving-hand {
    display: inline-block;
    animation: wave-animation 2.5s infinite;
    transform-origin: 70% 70%;
    margin-left: 4px;
}

@keyframes wave-animation {
    0% { transform: rotate(0.0deg); }
    10% { transform: rotate(14.0deg); }
    20% { transform: rotate(-8.0deg); }
    30% { transform: rotate(14.0deg); }
    40% { transform: rotate(-4.0deg); }
    50% { transform: rotate(10.0deg); }
    60% { transform: rotate(0.0deg); }
    100% { transform: rotate(0.0deg); }
}

.welcome-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.welcome-widgets-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}

/* 🌤️ Погода (38px) */
.weather-pill.realistic-weather {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 0 16px;
    height: 38px !important;
    border-radius: 26px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 2px 6px var(--shadow);
    box-sizing: border-box;
}

.weather-sun-icon {
    font-size: 16px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.4));
}

.weather-location {
    font-weight: 700;
    color: var(--text-primary);
}

.weather-deg {
    font-weight: 800;
    color: var(--text-primary);
}

.weather-status-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* 💱 Курси валют (38px) */
.currency-rates-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 0 16px;
    height: 38px !important;
    border-radius: 26px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px var(--shadow);
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-rates-pill:hover {
    border-color: var(--azure);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.rate-divider {
    color: var(--text-secondary);
    opacity: 0.4;
    font-weight: 400;
}

.rate-edit-icon {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 2px;
}

.currency-rates-pill:hover .rate-edit-icon {
    color: var(--azure);
}

/* ====================================================
   🏆 СУЦІЛЬНИЙ ВІДЖЕТ МІСЯЧНОГО ПЛАНУ З ВБУДОВАНОЮ ШАПКОЮ
==================================================== */

.company-plan-section-wrapper {
    margin-bottom: 24px;
    width: 100%;
}

.main-plan-card.unified-plan-card {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 22px;
    padding: 18px 24px 22px 24px;
    box-shadow: 0 10px 35px var(--shadow);
    position: relative;
    overflow: hidden;
}

.card-inner-content {
    position: relative;
    z-index: 1;
}

/* 📌 ВБУДОВАНА ШАПКА ВСЕРЕДИНІ ВІДЖЕТА */
.card-embedded-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--input-border);
    gap: 12px;
    flex-wrap: wrap;
}

.card-embedded-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-embedded-title i {
    font-size: 16px;
}

.card-embedded-month-badge {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px var(--shadow);
}

.card-embedded-month-badge i {
    color: var(--azure);
}

/* 📏 МЕТРИКИ ПЛАН / ФАКТ / ЗАЛИШИЛОСЬ */
.main-plan-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.plan-metrics-group {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .plan-metrics-group {
        gap: 20px;
    }
}

.plan-metric-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.metric-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-val {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.3px;
}

.metric-val.plan-target { color: var(--text-primary); }
.metric-val.fact-achieved { color: var(--azure); font-size: 22px; }
.metric-val.fact-remaining { color: var(--orange); }

.plan-percentage-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.12);
    border: 1.5px solid rgba(56, 189, 248, 0.4);
    padding: 6px 20px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
    margin-left: auto;
}

.percent-num {
    font-size: 23px;
    font-weight: 900;
    color: var(--azure);
    line-height: 1;
}

.percent-sub {
    font-size: 9.5px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

/* 🌟 АНІМОВАНА 3D ШКАЛА ПРОГРЕСУ */
.deep-3d-progress-wrapper {
    margin-bottom: 18px;
}

.deep-3d-progress-track {
    width: 100%;
    height: 18px;
    background: rgba(15, 23, 42, 0.08);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.18), inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

:root[data-theme="dark"] .deep-3d-progress-track {
    background: rgba(0, 0, 0, 0.35);
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.6);
}

.deep-3d-progress-bar.animated-flow {
    height: 100%;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 35%, #22c55e 70%, #0284c7 100%);
    background-size: 200% 100%;
    animation: flowProgressGradient 3s linear infinite;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
    position: relative;
    overflow: hidden;
}

@keyframes flowProgressGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.deep-3d-progress-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 10px 10px 0 0;
}

/* 🎛️ ЗБІЛЬШЕНІ ВІКНА ВАЛЮТ */
.integrated-currencies-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--input-border);
    flex-wrap: wrap;
}

.embedded-curr-card.compact-curr-card {
    position: relative;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    flex: 1 1 310px;
    min-width: 300px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.embedded-curr-card:hover {
    transform: translateY(-2px);
    border-color: var(--azure);
    box-shadow: 0 4px 14px var(--shadow);
}

.curr-flag-bg {
    position: absolute;
    right: -5px;
    top: -5px;
    bottom: -5px;
    width: 110px;
    pointer-events: none;
    opacity: 0.16;
    background-size: cover;
    background-position: center right;
    mask-image: linear-gradient(to right, transparent 0%, black 70%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 70%);
    z-index: 0;
    border-radius: 0 14px 14px 0;
}

.curr-flag-bg.flag-uah {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Crect width='1200' height='400' fill='%230057b7'/%3E%3Crect y='400' width='1200' height='400' fill='%23ffd700'/%3E%3C/svg%3E");
}

.curr-flag-bg.flag-usd {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 741 390'%3E%3Cpath fill='%23b22234' d='M0 0h741v390H0z'/%3E%3Cpath stroke='%23fff' stroke-width='30' d='M0 45h741M0 105h741M0 165h741M0 225h741M0 285h741M0 345h741'/%3E%3Cpath fill='%233c3b6e' d='M0 0h296v210H0z'/%3E%3C/svg%3E");
}

.curr-flag-bg.flag-eur {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 341'%3E%3Crect width='512' height='341' fill='%23003399'/%3E%3Cg fill='%23ffcc00' transform='translate(256,170.5) scale(1.15)'%3E%3Cg id='s'%3E%3Cpath id='st' d='M0-110l3.2 9.8h10.3l-8.3 6 3.2 9.8-8.4-6.1-8.4 6.1 3.2-9.8-8.3-6h10.3z'/%3E%3Cuse href='%23st' transform='rotate(30)'/%3E%3C/g%3E%3Cuse href='%23s' transform='rotate(60)'/%3E%3Cuse href='%23s' transform='rotate(120)'/%3E%3Cuse href='%23s' transform='rotate(180)'/%3E%3Cuse href='%23s' transform='rotate(240)'/%3E%3Cuse href='%23s' transform='rotate(300)'/%3E%3C/g%3E%3C/svg%3E");
}

.curr-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.curr-mini-icon.uah { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.curr-mini-icon.usd { background: rgba(56, 189, 248, 0.15); color: var(--azure); }
.curr-mini-icon.eur { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

.curr-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.curr-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.curr-name {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.curr-flag-emoji {
    font-size: 13px;
    line-height: 1;
}

.curr-subtag {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.curr-num-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.curr-main-sum {
    font-size: 15px;
    font-weight: 900;
    color: var(--text-primary);
    white-space: nowrap;
}

.curr-sub-info {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 📅 КАСТОМНИЙ ВБУДОВАНИЙ СЕЛЕКТОР МІСЯЦЯ У ВІДЖЕТІ */
.card-embedded-month-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 0 30px 0 34px;
    height: 32px;
    box-shadow: 0 2px 6px var(--shadow);
    transition: all 0.2s ease;
}

.card-embedded-month-select-wrapper:hover {
    border-color: var(--azure);
}

.card-embedded-month-select-wrapper .select-icon {
    position: absolute;
    left: 12px;
    color: var(--azure);
    font-size: 12px;
}

.card-embedded-month-select-wrapper select {
    background: transparent;
    border: none;
    outline: none;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}

.card-embedded-month-select-wrapper select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.card-embedded-month-select-wrapper .arrow-icon {
    position: absolute;
    right: 12px;
    font-size: 10px;
    color: var(--text-secondary);
    pointer-events: none;
}

.status-pulse-dot.gray {
    background-color: #94a3b8;
    box-shadow: none;
    opacity: 0.6;
}

.status-ring-gray {
    border: 2px solid #94a3b8 !important;
}

/* ====================================================
   📅 КАСТОМНИЙ ВБІДОВАНИЙ ВІДЖЕТ СЕЛЕКТОР МІСЯЦЯ (GLASSMORPHISM)
==================================================== */

.custom-month-dropdown {
    position: relative;
    user-select: none;
    z-index: 50;
}

.custom-month-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-month-trigger:hover {
    border-color: var(--azure);
    background: var(--card-bg);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.custom-month-trigger .select-icon {
    color: var(--azure);
    font-size: 13px;
}

.custom-month-trigger .arrow-icon {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.25s ease, color 0.25s ease;
    margin-left: 2px;
}

.custom-month-trigger .arrow-icon.open {
    transform: rotate(180deg);
    color: var(--azure);
}

/* ====================================================
   📅 ЧИСТИЙ ВИПАДАЮЧИЙ СПИСОК МІСЯЦІВ (БЕЗ ЗАЙВИХ ГАЛОК)
==================================================== */

.custom-month-dropdown {
    position: relative;
    user-select: none;
    z-index: 1000;
}

.custom-month-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 15px 35px var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 3px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.custom-month-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-month-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-month-option .option-icon {
    font-size: 12px;
    color: var(--text-secondary);
}

.custom-month-option .option-text {
    flex-grow: 1;
}

/* ❌ Галка ГАРАНТОВАНО ПРИХОВАНА для звичайних пунктів */
.custom-month-option .active-check-icon {
    display: none !important;
    font-size: 11px;
    color: var(--azure);
}

/* 🟢 Галка показується ТІЛЬКИ у вибраного активного місяця */
.custom-month-option.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
    font-weight: 800;
}

.custom-month-option.active .option-icon {
    color: var(--azure);
}

.custom-month-option.active .active-check-icon {
    display: inline-block !important;
}

.custom-month-option:hover:not(.active) {
    background: var(--input-bg);
    color: var(--azure);
}

/* ====================================================
   📈 MoM ТРЕНД ТА ⏱️ ПАНЕЛЬ ТЕМПУ ВИКОНАННЯ
==================================================== */

.fact-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 📈 MoM Бейдж */
.mom-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
}

.mom-badge.up {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.mom-badge.down {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.mom-badge.neutral {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
    border: 1px solid var(--input-border);
}

/* ⏱️ Панель Темпу та Денного Плану */
.pace-analytics-row {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pace-badge-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pace-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 800;
}

/* Варіанти статусу темпу */
.pace-status-pill.pace-ahead {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.pace-status-pill.pace-behind {
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.pace-status-pill.pace-completed {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.pace-status-pill.pace-closed {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.pace-status-pill.pace-future {
    background: var(--ios-pill-bg);
    color: var(--text-secondary);
    border: 1px solid var(--input-border);
}

.pace-days-info {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.pace-metrics-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pace-metric-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pace-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.pace-label i {
    color: var(--azure);
}

.pace-val {
    font-size: 13.5px;
    font-weight: 900;
    color: var(--text-primary);
}

/* 🇺🇦 🇺🇸 🇪🇺 ВЕКТОРНІ ІКОНКИ ПРАПОРІВ БІЛЯ НАЗВИ ВАЛЮТИ */
.curr-flag-icon {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

/* ====================================================
   🏢 ОНОВЛЕНІ СТИЛІ БЛОКУ НАПРЯМКІВ (ВНУТРІШНІ КАРТКИ ТА ЗБІЛЬШЕНІ ВІДСОТКИ)
==================================================== */

.directions-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.direction-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.direction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow);
}

.direction-card.theme-cyan:hover { border-color: #38bdf8; }
.direction-card.theme-indigo:hover { border-color: #818cf8; }
.direction-card.theme-amber:hover { border-color: #f59e0b; }
.direction-card.theme-emerald:hover { border-color: #10b981; }

.dir-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dir-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.dir-icon-badge.cyan { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.dir-icon-badge.indigo { background: rgba(129, 140, 248, 0.15); color: #818cf8; }
.dir-icon-badge.amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.dir-icon-badge.emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.dir-title-info {
    flex-grow: 1;
    min-width: 0;
}

.dir-title-info h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.dir-leader {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* 🔍 ЗБІЛЬШЕНИЙ ОСЕРЕДОК ВІДСОТКА (ПОКРАЩЕНА ВИДИМІСТЬ) */
.dir-percent-badge {
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.3px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--shadow);
    line-height: 1;
}

.dir-percent-badge.cyan { 
    background: rgba(56, 189, 248, 0.18); 
    color: #38bdf8; 
    border: 1.5px solid rgba(56, 189, 248, 0.4); 
}

.dir-percent-badge.indigo { 
    background: rgba(129, 140, 248, 0.18); 
    color: #818cf8; 
    border: 1.5px solid rgba(129, 140, 248, 0.4); 
}

.dir-percent-badge.amber { 
    background: rgba(245, 158, 11, 0.18); 
    color: #f59e0b; 
    border: 1.5px solid rgba(245, 158, 11, 0.4); 
}

.dir-percent-badge.emerald { 
    background: rgba(16, 185, 129, 0.18); 
    color: #10b981; 
    border: 1.5px solid rgba(16, 185, 129, 0.4); 
}

.dir-metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dir-metric-box {
    display: flex;
    flex-direction: column;
}

.dir-metric-box.text-right {
    text-align: right;
}

.dir-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.dir-val {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.2px;
}

.dir-val.fact { color: var(--text-primary); }
.dir-val.plan { color: var(--text-secondary); }

.dir-progress-wrapper {
    width: 100%;
}

.dir-progress-track {
    width: 100%;
    height: 10px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dir-progress-bar {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dir-progress-bar.cyan { background: linear-gradient(90deg, #0284c7, #38bdf8); box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
.dir-progress-bar.indigo { background: linear-gradient(90deg, #4f46e5, #818cf8); box-shadow: 0 0 10px rgba(129, 140, 248, 0.4); }
.dir-progress-bar.amber { background: linear-gradient(90deg, #d97706, #f59e0b); box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
.dir-progress-bar.emerald { background: linear-gradient(90deg, #059669, #10b981); box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }

/* Окремі класи для меню вибору місяця блоку напрямків */
.custom-bizdir-month-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-bizdir-month-option .option-icon {
    font-size: 12px;
    color: var(--text-secondary);
}

.custom-bizdir-month-option .option-text {
    flex-grow: 1;
}

.custom-bizdir-month-option .active-check-icon {
    display: none !important;
    font-size: 11px;
    color: var(--azure);
}

.custom-bizdir-month-option.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--azure);
    font-weight: 800;
}

.custom-bizdir-month-option.active .active-check-icon {
    display: inline-block !important;
}

.custom-bizdir-month-option:hover:not(.active) {
    background: var(--input-bg);
    color: var(--azure);
}

/* ====================================================
   💎 ПРЕМІУМ СТИЛІЗАЦІЯ ПУНКТІВ 1, 2, 4 ТА 5
==================================================== */

.directions-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.direction-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;

    /* ⚡ ПУНКТ 5: Плавні мікро-анімації при наведенні */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                border-color 0.3s ease, 
                box-shadow 0.3s ease;
}

/* 🎨 ПУНКТ 2: Градієнтна лінія зверху кожної картки */
.direction-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3.5px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.direction-card.theme-cyan::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.direction-card.theme-indigo::before { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.direction-card.theme-amber::before { background: linear-gradient(90deg, #d97706, #f59e0b); }
.direction-card.theme-emerald::before { background: linear-gradient(90deg, #059669, #10b981); }

/* ⚡ ПУНКТ 5: Ефекти підйому картки та неонової тіні */
.direction-card:hover {
    transform: translateY(-4px);
}

.direction-card.theme-cyan:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.18);
}
.direction-card.theme-indigo:hover {
    border-color: rgba(129, 140, 248, 0.5);
    box-shadow: 0 10px 25px rgba(129, 140, 248, 0.18);
}
.direction-card.theme-amber:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.18);
}
.direction-card.theme-emerald:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.18);
}

.dir-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dir-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.dir-icon-badge.cyan { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.dir-icon-badge.indigo { background: rgba(129, 140, 248, 0.15); color: #818cf8; }
.dir-icon-badge.amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.dir-icon-badge.emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.dir-title-info h4 {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.dir-leader {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.dir-percent-badge {
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.3px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--shadow);
    line-height: 1;
}

.dir-percent-badge.cyan { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1.5px solid rgba(56, 189, 248, 0.4); }
.dir-percent-badge.indigo { background: rgba(129, 140, 248, 0.18); color: #818cf8; border: 1.5px solid rgba(129, 140, 248, 0.4); }
.dir-percent-badge.amber { background: rgba(245, 158, 11, 0.18); color: #f59e0b; border: 1.5px solid rgba(245, 158, 11, 0.4); }
.dir-percent-badge.emerald { background: rgba(16, 185, 129, 0.18); color: #10b981; border: 1.5px solid rgba(16, 185, 129, 0.4); }

.dir-metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dir-metric-box {
    display: flex;
    flex-direction: column;
}

.dir-metric-box.text-right { text-align: right; }

.dir-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dir-val {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.3px;
}

.dir-val.fact { color: var(--text-primary); }
.dir-val.plan { color: var(--text-secondary); opacity: 0.85; }

/* 📊 ПУНКТ 4: Стильні плашки залишку виконання до плану */
.dir-sub-info-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.dir-remaining-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    padding: 2px 8px;
    border-radius: 8px;
    letter-spacing: 0.2px;
}

/* ✨ ПУНКТ 1: 3D-Смужки прогресу з неон-сяйвом та анімованим блиском */
.dir-progress-wrapper {
    width: 100%;
}

.dir-progress-track {
    width: 100%;
    height: 12px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dir-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Сяючі неонові градієнти */
.dir-progress-bar.cyan { background: linear-gradient(90deg, #0284c7, #38bdf8); box-shadow: 0 0 12px rgba(56, 189, 248, 0.5); }
.dir-progress-bar.indigo { background: linear-gradient(90deg, #4f46e5, #818cf8); box-shadow: 0 0 12px rgba(129, 140, 248, 0.5); }
.dir-progress-bar.amber { background: linear-gradient(90deg, #d97706, #f59e0b); box-shadow: 0 0 12px rgba(245, 158, 11, 0.5); }
.dir-progress-bar.emerald { background: linear-gradient(90deg, #059669, #10b981); box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }

/* Анімований бігучий відблиск (Shimmer) */
.dir-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: dirGlint 3s infinite ease-in-out;
}

@keyframes dirGlint {
    0% { left: -100%; }
    60%, 100% { left: 100%; }
}

/* ====================================================
   📐 КОНЦЕПЦІЯ 2: TECH BLUEPRINT DOT MATRIX (ТОЧЕЧНА СІТКА)
==================================================== */

.direction-card {
    position: relative;
    overflow: hidden;
    background-color: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;

    /* ⚡ Плавна анімація трансформацій та фону */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
                border-color 0.35s ease, 
                box-shadow 0.35s ease,
                background-image 0.35s ease;
}

/* 🎨 Тонкий градієнтний верхній край */
.direction-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3.5px;
    opacity: 0.85;
    z-index: 2;
}

.direction-card.theme-cyan::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.direction-card.theme-indigo::before { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.direction-card.theme-amber::before { background: linear-gradient(90deg, #d97706, #f59e0b); }
.direction-card.theme-emerald::before { background: linear-gradient(90deg, #059669, #10b981); }

/* 📐 1. ІМПЛАНТОЛОГІЯ: Ціанова мікро-точечна сітка */
.direction-card.theme-cyan {
    background-image: 
        radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
        radial-gradient(rgba(56, 189, 248, 0.18) 1.2px, transparent 1.2px);
    background-size: 100% 100%, 12px 12px;
}

/* 📐 2. ОПТИКА: Індиго-фіолетова мікро-точечна сітка */
.direction-card.theme-indigo {
    background-image: 
        radial-gradient(circle at 85% 20%, rgba(129, 140, 248, 0.12) 0%, transparent 55%),
        radial-gradient(rgba(129, 140, 248, 0.18) 1.2px, transparent 1.2px);
    background-size: 100% 100%, 12px 12px;
}

/* 📐 3. АКАДЕМІЯ: Бурштинова мікро-точечна сітка */
.direction-card.theme-amber {
    background-image: 
        radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.12) 0%, transparent 55%),
        radial-gradient(rgba(245, 158, 11, 0.18) 1.2px, transparent 1.2px);
    background-size: 100% 100%, 12px 12px;
}

/* 📐 4. ГАММА: Смарагдова мікро-точечна сітка */
.direction-card.theme-emerald {
    background-image: 
        radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
        radial-gradient(rgba(16, 185, 129, 0.18) 1.2px, transparent 1.2px);
    background-size: 100% 100%, 12px 12px;
}

/* ⚡ ІНТЕРАКТИВНИЙ HOVER: Підйом картки + підвищення чіткості крапок */
.direction-card:hover {
    transform: translateY(-5px);
}

.direction-card.theme-cyan:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background-image: 
        radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.25) 0%, transparent 65%),
        radial-gradient(rgba(56, 189, 248, 0.35) 1.3px, transparent 1.3px);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.2);
}

.direction-card.theme-indigo:hover {
    border-color: rgba(129, 140, 248, 0.5);
    background-image: 
        radial-gradient(circle at 85% 20%, rgba(129, 140, 248, 0.25) 0%, transparent 65%),
        radial-gradient(rgba(129, 140, 248, 0.35) 1.3px, transparent 1.3px);
    box-shadow: 0 12px 30px rgba(129, 140, 248, 0.2);
}

.direction-card.theme-amber:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background-image: 
        radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.25) 0%, transparent 65%),
        radial-gradient(rgba(245, 158, 11, 0.35) 1.3px, transparent 1.3px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.2);
}

.direction-card.theme-emerald:hover {
    border-color: rgba(16, 185, 129, 0.5);
    background-image: 
        radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.25) 0%, transparent 65%),
        radial-gradient(rgba(16, 185, 129, 0.35) 1.3px, transparent 1.3px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.2);
}

/* ====================================================
   🎯 ТОЧНИЙ ДИЗАЙН ТА СИНХРОННА FLUID-АНІМАЦІЯ ХВИЛЬ
==================================================== */

.exact-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    width: 100%;
}

.exact-cat-card {
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 108px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.exact-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px var(--shadow);
}

.exact-cat-card.theme-amber:hover { border-color: rgba(245, 158, 11, 0.6); }
.exact-cat-card.theme-rose:hover { border-color: rgba(244, 63, 94, 0.6); }
.exact-cat-card.theme-indigo:hover { border-color: rgba(129, 140, 248, 0.6); }
.exact-cat-card.theme-cyan:hover { border-color: rgba(56, 189, 248, 0.6); }
.exact-cat-card.theme-emerald:hover { border-color: rgba(16, 185, 129, 0.6); }

/* ВЕРХНІЙ РЯДОК: Заголовок ВЕРХНІМ РЕГІСТРОМ + Бейдж */
.exact-cat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.exact-cat-title {
    font-size: 11.5px;
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.2;
    white-space: nowrap;
}

.exact-curr-pill {
    padding: 2.5px 7px;
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.exact-curr-pill.usd {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.exact-curr-pill.eur {
    background: rgba(129, 140, 248, 0.18);
    color: #818cf8;
    border: 1px solid rgba(129, 140, 248, 0.35);
}

/* НИЖНІЙ РЯДОК: Векторна Хвиля + Велика сума */
.exact-cat-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

/* ====================================================
   ⚡ ДИНАМІЧНА ТА ПОМІТНА FLUID-АНІМАЦІЯ ХВИЛЬ
==================================================== */

.exact-fluid-canvas {
    width: 110px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.fluid-svg-element {
    width: 100%;
    height: 100%;
    display: block;
}

/* 🌊 ШАРЫ ХВИЛЬ З ПРИСКОРЕНИМ ДИНАМІЧНИМ РУХОМ */
.wave-layer.layer-front {
    animation: dynamicWaveFront 1.8s ease-in-out infinite alternate;
    transform-origin: center bottom;
}

.wave-layer.layer-back {
    animation: dynamicWaveBack 2.2s ease-in-out infinite alternate;
    transform-origin: center bottom;
}

/* 🚀 ПРИСКОРЕНІ АМПЛІТУДНІ КОЛИВАННЯ (ПЕРЕДНІЙ ШАР) */
@keyframes dynamicWaveFront {
    0% {
        transform: translateY(1px) scaleY(0.9) skewX(0deg);
    }
    50% {
        transform: translateY(-6px) scaleY(1.35) skewX(-4deg);
    }
    100% {
        transform: translateY(3px) scaleY(0.8) skewX(4deg);
    }
}

/* 🚀 ПРИСКОРЕНІ АМПЛІТУДНІ КОЛИВАННЯ (ЗАДНІЙ ШАР) */
@keyframes dynamicWaveBack {
    0% {
        transform: translateY(-4px) scaleY(1.25) skewX(3deg);
    }
    50% {
        transform: translateY(2px) scaleY(0.85) skewX(-3deg);
    }
    100% {
        transform: translateY(-5px) scaleY(1.3) skewX(1deg);
    }
}

/* ВЕЛИКИЙ ТА ВИРАЗНИЙ ШРИФТ СУМИ (ЗБІЛЬШЕНО) */
.exact-cat-amount {
    font-size: 26px; /* Збільшено з 21px до 26px */
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.6px;
    line-height: 1;
    white-space: nowrap;
}

/* ====================================================
   💎 ЗБІЛЬШЕНІ СУМИ ДЛЯ ЗАПОВНЕННЯ ПРОСТОРУ КАРТКИ
==================================================== */

.exact-cat-card {
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 16px;
    padding: 16px 18px; /* Трохи збільшено внутрішній відступ */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    min-height: 112px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* НИЖНІЙ РЯДОК: Анімація + Збільшена сума */
.exact-cat-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

/* 🚀 ВЕЛИКИЙ ТА ВИРАЗНИЙ ШРИФТ СУМИ (34px) */
.exact-cat-amount {
    font-size: 34px; /* Збільшено з 26px до 34px */
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.8px;
    line-height: 1;
    white-space: nowrap;
}

/* Канвас хвилі підлаштований за висотою до нових цифр */
.exact-fluid-canvas {
    width: 95px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

/* ====================================================
   📈 СТИЛІ БЕЙДЖА ПОРІВНЯННЯ З МИНУЛИМ МІСЯЦЕМ
==================================================== */

.exact-trend-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.exact-trend-pill i {
    font-size: 9.5px;
}

/* 🟢 РІСТ ПРИХОДІВ (Зелений) */
.exact-trend-pill.up {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* 🔴 ПАДІННЯ ПРИХОДІВ (Червоний) */
.exact-trend-pill.down {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.35);
}

/* ⚪ БЕЗ ЗМІН (Нейтральний) */
.exact-trend-pill.neutral {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* ====================================================
   🌈 1. АНІМОВАНА РАМКА ПО ПЕРИМЕТРУ
==================================================== */

.border-glow-wrapper {
    position: relative;
    padding: 2.5px;
    border-radius: 22px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc, #f43f5e, #38bdf8);
    background-size: 300% 300%;
    animation: perimeterGlowAnim 6s linear infinite;
    box-shadow: 0 8px 25px var(--shadow);
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

@keyframes perimeterGlowAnim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.manager-top-nav-banner {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 10px 20px;
    position: relative;
    overflow: visible !important;
    width: 100%;
}

.top-nav-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px;
    width: 100%;
    flex-wrap: nowrap !important;
}

.nav-left-aligned-group {
    display: flex !important;
    align-items: center !important;
    gap: 20px;
    flex-wrap: nowrap !important;
    min-width: 0;
}

/* 🖼️ Аватарка */
.nav-user-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.nav-user-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

.nav-user-greeting {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-greeting-text h3 {
    font-size: 14px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.15;
    white-space: nowrap;
}

.nav-user-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ====================================================
   🎨 2. ВИДІЛЕНИЙ КОНТРАСТНИЙ БЛОК УСПІХУ
==================================================== */

.nav-center-metrics.custom-highlight-box {
    display: flex !important;
    align-items: center !important;
    gap: 18px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
    border: 1.5px solid rgba(129, 140, 248, 0.4) !important;
    padding: 8px 18px !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.12), 0 6px 20px rgba(0, 0, 0, 0.3) !important;
    flex-shrink: 0;
    white-space: nowrap;
}

:root[data-theme="light"] .nav-center-metrics.custom-highlight-box {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
    box-shadow: inset 0 1px 1px #ffffff, 0 6px 18px rgba(15, 23, 42, 0.08) !important;
}

.text-vibrant {
    color: #c084fc !important; /* Яскравий акцентний відтінок */
}

:root[data-theme="light"] .text-vibrant {
    color: #9333ea !important;
}

.nav-success-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 320px;
}

.metric-top-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.m-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.m-plan-fact {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.pf-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.pf-label strong {
    color: var(--text-primary);
}

.pf-divider {
    color: var(--input-border);
    font-size: 9px;
}

/* ====================================================
   🌊 3. НОВИЙ 3D НЕОНОВИЙ ПРОГРЕС-БАР
==================================================== */

.top-banner-progress-track {
    width: 100%;
    height: 9px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
}

.top-banner-progress-bar.vibrant-3d {
    height: 100%;
    border-radius: 10px;
    position: relative;
    background: linear-gradient(90deg, #ec4899 0%, #818cf8 50%, #38bdf8 100%);
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-gloss-shine {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 10px 10px 0 0;
}

.bar-pulse-head {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 10px;
    background: #ffffff;
    filter: blur(1.5px);
    box-shadow: 0 0 8px #ffffff;
    border-radius: 50%;
    animation: topBarPulse 1.6s infinite ease-in-out;
}

@keyframes topBarPulse {
    0%, 100% { opacity: 0.6; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.4); }
}

.nav-meetings-metric {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-archive-selector {
    margin-left: auto;
    flex-shrink: 0;
}

/* ====================================================
   🕒 ЕЛЕМЕНТИ ПРАВОЇ ЧАСТИНИ ШАПКИ БЛОКУ ПЛАНУ
==================================================== */

.header-right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.last-update-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    box-shadow: 0 2px 6px var(--shadow);
    white-space: nowrap;
    transition: all 0.25s ease;
}

.last-update-time-pill:hover {
    border-color: var(--azure);
}

.last-update-time-pill strong {
    color: var(--text-primary);
    font-weight: 800;
}

.last-update-time-pill i {
    font-size: 11px;
}

/* ====================================================
   🔧 ВИПРАВЛЕННЯ ОБРІЗАННЯ СУМ ТА ДРОПДАУНУ МІСЯЦЯ
==================================================== */

/* 1. Дозволяємо випадаючому меню виходити за межі картки (усуває обрізання вибору місяця) */
.category-breakdown-custom-card,
.category-breakdown-custom-card .card-inner-content,
.company-plan-section-wrapper {
    overflow: visible !important;
}

#custom-cat-month-dropdown {
    position: relative;
    z-index: 1000 !important;
}

#custom-cat-month-menu {
    z-index: 1001 !important;
    max-height: 220px;
    overflow-y: auto;
}

/* 2. Адаптивна сітка для 6 карток */
.exact-cat-grid.grid-6-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    width: 100%;
}

.exact-cat-card {
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 14px;
    padding: 10px 10px; /* Зменшено внутрішні відступи */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 100px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

/* Верхній рядок заголовка */
.exact-cat-title {
    font-size: 10px; /* Зменшено для довгих назв типу "ХІРУРГІЧНЕ ОБЛАДНАННЯ" */
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exact-trend-pill {
    padding: 2px 5px;
    font-size: 9px;
    border-radius: 6px;
}

/* Нижній рядок: Компактна хвиля + Точна сума */
.exact-cat-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
}

/* ====================================================
   📦 5 КАТЕГОРІЙ ЗІ ЗБІЛЬШЕНИМИ СУМАМИ (28px)
==================================================== */

.category-breakdown-custom-card,
.category-breakdown-custom-card .card-inner-content,
.company-plan-section-wrapper {
    overflow: visible !important;
}

.exact-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    width: 100%;
}

.exact-cat-card {
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-height: 108px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.exact-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px var(--shadow);
}

/* Верхній рядок: Назва + Відсоток */
.exact-cat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.exact-cat-title {
    font-size: 11px;
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Нижній рядок: Хвиля + Збільшена сума */
.exact-cat-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

/* 🚀 ЗБІЛЬШЕНИЙ ВИРАЗНИЙ ШРИФТ СУМИ (28px) */
.exact-cat-amount {
    font-size: 28px; /* Збільшено для 5-карткової сітки */
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.6px;
    line-height: 1;
    white-space: nowrap;
}

.exact-fluid-canvas {
    width: 75px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}