/* App - Shared Styles */

body {
    background: #f3f4f6;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: background-color 0.3s ease;
}

.financial-number {
    font-family: 'Roboto Mono', monospace;
    letter-spacing: -0.02em;
}

/* ── Sidebar ── */
.sidebar {
    width: 240px;
    min-width: 240px;
    background: #fff;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f0f0f0;
    z-index: 100;
    transition: all 0.3s ease;
}

.main-content {
    margin-left: 240px;
    min-height: 100vh;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    padding-bottom: 80px;
}
@media (min-width: 1024px) {
    .main-content { padding-bottom: 0; }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 100px;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin: 2px 12px;
    position: relative;
}
.nav-item:hover { background: #f1f5f9; color: #19AF9C; }
.nav-item.active { background: #e6f7f5; color: #19AF9C; font-weight: 600; }

.nav-section {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 24px 32px 8px;
}

/* ── Submenu ── */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.submenu.active { max-height: 200px; margin-bottom: 8px; margin-top: 4px; }

.sub-nav-item {
    padding: 8px 16px;
    font-size: 13px;
    color: #64748b;
    border-radius: 100px;
    transition: all 0.2s;
}
.sub-nav-item:hover { color: #19AF9C; background: rgba(25, 175, 156, 0.05); }

/* ── Dropdowns ── */
.header-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    z-index: 200;
    animation: dropIn 0.2s ease-out;
    transform-origin: top right;
}

@keyframes dropIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Floating Mobile Nav ── */
.mobile-nav {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 400px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 100px;
    padding: 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 46px;
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 14px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mobile-nav-item i {
    font-size: 18px;
    line-height: 1;
}

.mobile-nav-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(8px, 2.4vw, 10px);
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.mobile-nav-item.active {
    background: #19AF9C;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(25, 175, 156, 0.3);
}

@media (min-width: 1024px) { .mobile-nav { display: none; } }

/* ── Sidebar Overlay ── */
.sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar nav { padding-bottom: 100px; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

/* -------------═
   DARK MODE OVERRIDES
   -------------═ */
html.dark body { background-color: #0a0a0a; color: #f3f4f6; }

html.dark .sidebar { background-color: #141414; border-color: #2e2e32; }
html.dark .main-content { background-color: #0a0a0a; }

html.dark header { background-color: rgba(20, 20, 20, 0.8); border-color: #2e2e32; }

html.dark .nav-item { color: #94a3b8; }
html.dark .nav-item:hover { background-color: #1f1f1f; color: #19AF9C; }
html.dark .nav-item.active { background-color: rgba(25, 175, 156, 0.1); color: #19AF9C; }
html.dark .nav-section { color: #4b5563; }

html.dark .sub-nav-item { color: #6b7280; }
html.dark .sub-nav-item:hover { color: #19AF9C; background: rgba(25, 175, 156, 0.05); }

html.dark .mobile-nav {
    background: rgba(20, 20, 20, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
html.dark .mobile-nav-item { color: #94a3b8; }

html.dark .header-dropdown {
    background-color: #141414;
    border-color: #2e2e32;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
html.dark #langMenu, html.dark #footerLangMenu { background-color: #141414; border-color: #2e2e32; }

html.dark .bg-white { background-color: #141414 !important; }
html.dark .border-gray-100 { border-color: #2e2e32 !important; }
html.dark .border-l { border-color: #2e2e32 !important; }

html.dark .text-gray-900 { color: #f3f4f6 !important; }
html.dark .text-gray-800 { color: #e5e7eb !important; }
html.dark .text-gray-700 { color: #d1d5db !important; }
html.dark .text-gray-600 { color: #9ca3af !important; }
html.dark .text-gray-500 { color: #6b7280 !important; }
html.dark .text-gray-400 { color: #4b5563 !important; }

html.dark .bg-gray-50 { background-color: #1a1a1a !important; }
html.dark .hover\:bg-gray-50:hover { background-color: #1a1a1a !important; }

html.dark ::-webkit-scrollbar-thumb { background: #2e2e32; }

/* ── Border Glow Button (full border) ── */
.btn-glow-wrap {
    display: inline-flex;
    position: relative;
    border-radius: 9999px;
    overflow: hidden;
}
.btn-glow-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 200deg, #19AF9C 230deg, #19AF9C 260deg, transparent 290deg, transparent 360deg);
    animation: spin-glow 8s linear infinite;
}
.btn-glow-wrap > * {
    position: relative;
    z-index: 1;
    margin: 2px;
    border-radius: 9999px;
}
@keyframes spin-glow {
    0% { transform: rotateZ(0deg); opacity: 1; }
    25% { transform: rotateZ(360deg); opacity: 1; }
    28% { transform: rotateZ(360deg); opacity: 0; }
    95% { transform: rotateZ(720deg); opacity: 0; }
    100% { transform: rotateZ(720deg); opacity: 1; }
}

/* ── Bottom Glow Button ── */
.btn-glow-bottom {
    display: inline-flex;
    position: relative;
    border-radius: 9999px;
    overflow: hidden;
}
.btn-glow-bottom::after {
    content: '';
    position: absolute;
    z-index: 2;
    bottom: -2px;
    left: -2px;
    right: -2px;
    height: 3px;
    border-radius: 0 0 9999px 9999px;
    background: linear-gradient(90deg, transparent 0%, #19AF9C 40%, #19AF9C 60%, transparent 100%);
    animation: bottom-glow-pulse 8s ease-in-out infinite;
}
.btn-glow-bottom > * {
    position: relative;
    z-index: 1;
    margin: 2px;
    border-radius: 9999px;
}
@keyframes bottom-glow-pulse {
    0%, 22% { opacity: 0; }
    28%, 50% { opacity: 1; }
    56%, 100% { opacity: 0; }
}
