/* SIAC - Administrare patrimoniu - Ultra Modern Theme */
/* Font loaded via <link> in base.html — no duplicate @import needed */

:root {
    --primary-glow: rgba(124, 58, 237, 0.4);
    --secondary-glow: rgba(56, 189, 248, 0.4);
    --bg-dark: #0f172a; /* Slate 900 - Slightly lighter than Slate 950 */
}

body {
    background-color: var(--bg-dark);
    background-image: 
        linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 1) 100%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    background-position: center center;
    background-attachment: fixed;
    color: #e2e8f0;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

table {
    width: 100%;
    border-collapse: collapse;
}

/* GLOBAL OVERRIDES to kill white backgrounds from Bootstrap remnants */
.bg-white, .bg-light, .table-light, .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(30, 41, 59, 0.7) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.text-dark, .text-black, .text-muted {
    color: #94a3b8 !important;
}

.card, .modal-content {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f1f5f9 !important;
}

.table {
    color: #e2e8f0 !important;
    --bs-table-color: #e2e8f0;
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(255,255,255,0.05);
    --bs-table-hover-color: #fff;
    --bs-table-hover-bg: rgba(255,255,255,0.05);
}

.form-control, .form-select {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(15, 23, 42, 1) !important;
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 0.25rem rgba(124, 58, 237, 0.25) !important;
}

/* Glassmorphism Effects */
.glass-panel {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-dock {
    background-color: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
    100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes fade-out-up {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); pointer-events: none; }
}

.flash-auto-dismiss {
    animation: fade-out-up 0.5s ease forwards;
}

.hover-glow:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05); /* Extremely subtle white glow */
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Softer table row hover */
tr.group:hover td {
    background-color: rgba(30, 41, 59, 0.4) !important; /* Slate 800 very transparent */
}

/* Subtle link hover */
a:hover {
    transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background-color: rgba(2, 6, 23, 0.5);
}
::-webkit-scrollbar-thumb {
    background-color: rgba(124, 58, 237, 0.5);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(124, 58, 237, 0.8);
}

/* Enable touch scrolling */
.custom-scrollbar {
    -webkit-overflow-scrolling: touch;
}

/* Administrare patrimoniu Typography */
.font-mono-numbers {
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', monospace;
}

/* Extravagant UI Elements */
.neon-border {
    position: relative;
}
.neon-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(45deg, #7c3aed, #0ea5e9, #7c3aed);
    z-index: -1;
    border-radius: inherit;
    background-size: 200% 200%;
    animation: gradient-move 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}
.neon-border:hover::after {
    opacity: 1;
}

@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hide scrollbar for dock but keep functionality */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.safe-bottom-offset {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
}

.safe-x-padding {
    padding-left: calc(env(safe-area-inset-left, 0px) + 1rem);
    padding-right: calc(env(safe-area-inset-right, 0px) + 1rem);
}

.mobile-tabbar {
    align-items: stretch;
    background-color: rgba(2, 6, 23, 0.94);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.42);
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(env(safe-area-inset-bottom, 0px) + 68px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-top: 6px;
}

.mobile-tab,
.mobile-more > summary {
    align-items: center;
    border-radius: 10px;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    font-size: 10px;
    font-weight: 700;
    gap: 2px;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1;
    list-style: none;
    min-height: 56px;
    text-transform: uppercase;
}

.mobile-tab i {
    font-size: 21px;
    line-height: 1;
}

.mobile-tab.is-active {
    background-color: rgba(124, 58, 237, 0.18);
    color: #e2e8f0;
}

.mobile-tab.is-active i {
    color: #60a5fa;
}

.mobile-more {
    min-width: 0;
    position: relative;
}

.mobile-more > summary::-webkit-details-marker {
    display: none;
}

.mobile-more-panel {
    background-color: rgba(2, 6, 23, 0.98);
    border: 1px solid rgba(167, 139, 250, 0.28);
    border-radius: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    display: grid;
    max-height: min(62vh, 540px);
    min-width: min(82vw, 320px);
    overflow-y: auto;
    padding: 8px;
    position: absolute;
    right: 0;
}

.mobile-more:not([open]) .mobile-more-panel {
    display: none;
}

.mobile-more-panel a {
    align-items: center;
    border-radius: 10px;
    color: #e2e8f0;
    display: flex;
    font-size: 14px;
    gap: 12px;
    letter-spacing: 0;
    min-height: 42px;
    padding: 10px 12px;
}

.mobile-more-panel a:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Fade-in animation for page content */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.4s ease-out both;
}

/* Focus ring for accessibility */
:focus-visible {
    outline: 2px solid rgba(124, 58, 237, 0.6);
    outline-offset: 2px;
}

/* Ensure legacy Bootstrap btn classes are themed */
.btn-primary { background-color: #7c3aed !important; border-color: #7c3aed !important; color: #fff !important; }
.btn-primary:hover { background-color: #6d28d9 !important; border-color: #6d28d9 !important; }
.btn-secondary { background-color: rgba(30, 41, 59, 0.8) !important; border-color: rgba(255,255,255,0.1) !important; color: #e2e8f0 !important; }
.btn-danger { background-color: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }
.btn-success { background-color: #059669 !important; border-color: #059669 !important; color: #fff !important; }
.btn-warning { background-color: #d97706 !important; border-color: #d97706 !important; color: #fff !important; }
.btn-info { background-color: #0891b2 !important; border-color: #0891b2 !important; color: #fff !important; }
.btn-outline-primary { border-color: #7c3aed !important; color: #a78bfa !important; background: transparent !important; }
.btn-outline-primary:hover { background-color: rgba(124, 58, 237, 0.15) !important; color: #c4b5fd !important; }
.btn-outline-secondary { border-color: rgba(255,255,255,0.15) !important; color: #94a3b8 !important; background: transparent !important; }
.btn-outline-danger { border-color: #dc2626 !important; color: #f87171 !important; background: transparent !important; }
.btn-outline-danger:hover { background-color: rgba(220, 38, 38, 0.15) !important; }

/* Badge / Alert dark overrides */
.badge, .alert {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.alert-success { background-color: rgba(5, 150, 105, 0.15) !important; color: #6ee7b7 !important; border-color: rgba(16, 185, 129, 0.3) !important; }
.alert-danger { background-color: rgba(220, 38, 38, 0.15) !important; color: #fca5a5 !important; border-color: rgba(239, 68, 68, 0.3) !important; }
.alert-warning { background-color: rgba(217, 119, 6, 0.15) !important; color: #fcd34d !important; border-color: rgba(245, 158, 11, 0.3) !important; }
.alert-info { background-color: rgba(8, 145, 178, 0.15) !important; color: #67e8f9 !important; border-color: rgba(6, 182, 212, 0.3) !important; }

/* Nav tabs dark overrides */
.nav-tabs { border-bottom-color: rgba(255, 255, 255, 0.1) !important; }
.nav-tabs .nav-link { color: #94a3b8 !important; border-color: transparent !important; }
.nav-tabs .nav-link:hover { border-color: rgba(255, 255, 255, 0.1) !important; color: #fff !important; }
.nav-tabs .nav-link.active { background-color: rgba(15, 23, 42, 0.8) !important; color: #fff !important; border-color: rgba(255, 255, 255, 0.1) !important; border-bottom-color: transparent !important; }

/* CHOICES.JS DARK THEME OVERRIDES */
.choices {
    margin-bottom: 0;
}

.choices__inner {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.5rem !important;
    color: #e2e8f0 !important;
    font-size: 0.875rem !important;
    min-height: 42px;
}

.choices__list--dropdown {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border-radius: 0.5rem !important;
    margin-top: 4px !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: rgba(124, 58, 237, 0.2) !important;
    color: #fff !important;
}

.choices__list--dropdown .choices__item {
    color: #cbd5e1;
}

.choices__input {
    background-color: transparent !important;
    color: #fff !important;
    margin-bottom: 0 !important;
}

.choices[data-type*="select-one"] .choices__inner {
    padding-bottom: 0px;
}

.choices[data-type*="select-one"]::after {
    border-color: #94a3b8 transparent transparent transparent;
}

.choices__list--multiple .choices__item {
    background-color: rgba(124, 58, 237, 0.3) !important;
    border: 1px solid rgba(124, 58, 237, 0.4) !important;
    color: #fff !important;
    border-radius: 4px;
}

.choices__list--multiple .choices__item.is-highlighted {
    background-color: rgba(124, 58, 237, 0.5) !important;
    border: 1px solid rgba(124, 58, 237, 0.6) !important;
}

.choices__button {
    border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
    filter: invert(1);
}
