/* Blue Trust — Light Minimal Pro Theme */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/estedad-font@v5.0.1/dist/font-face.css');

:root {
    --bt-navy: #1E3A5F;
    --bt-navy-light: #2B5A8A;
    --bt-navy-dark: #15293F;
    --bt-green: #22C55E;
    --bt-green-dark: #16A34A;
    --bt-bg: #F8FAFC;
    --bt-card-bg: #FFFFFF;
    --bt-border: #E2E8F0;
    --bt-text: #1E293B;
    --bt-text-muted: #64748B;
    --bt-text-light: #94A3B8;
    --bt-sidebar-bg: #FFFFFF;
    --bt-sidebar-hover: rgba(30, 58, 95, 0.06);
    --bt-sidebar-active: rgba(30, 58, 95, 0.08);
}

* {
    font-family: 'Estedad', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(30, 58, 95, 0.15) rgba(241, 245, 249, 0.6);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.6);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.25);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}

body {
    background: #F8FAFC;
    color: var(--bt-text);
    min-height: 100%;
}

/* Clean Minimal Cards */
.card {
    background: var(--bt-card-bg);
    border: 1px solid var(--bt-border);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(30, 58, 95, 0.06), 0 1px 2px rgba(30, 58, 95, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: rgba(30, 58, 95, 0.15);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.08), 0 2px 4px rgba(30, 58, 95, 0.04);
    transform: translateY(-1px);
}

/* Custom Input Styling (Light Theme) */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], select, textarea {
    background: #FFFFFF !important;
    border: 1px solid var(--bt-border) !important;
    color: var(--bt-text) !important;
    border-radius: 0.625rem !important;
    transition: all 0.2s ease-in-out !important;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="tel"]:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--bt-navy) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08) !important;
}

select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231E3A5F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: left 0.75rem center !important;
    padding-left: 2.5rem !important;
    padding-right: 1.25rem !important;
    cursor: pointer;
}

/* RTL Form Fields Alignment */
[dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea {
    text-align: right;
}

/* Tables in Glass */
table.data-table {
    border-collapse: separate;
    border-spacing: 0;
}

table.data-table th {
    color: var(--bt-text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--bt-border);
}

table.data-table tbody tr {
    transition: background-color 0.2s ease;
}

table.data-table tbody tr:hover {
    background: rgba(30, 58, 95, 0.03) !important;
}

table.data-table td {
    border-bottom: 1px solid var(--bt-border);
    color: var(--bt-text);
}

/* HTMX Smooth swaps */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* Subtle Entrance Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.card {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.grid > .card:nth-child(1) { animation-delay: 0.03s; }
.grid > .card:nth-child(2) { animation-delay: 0.06s; }
.grid > .card:nth-child(3) { animation-delay: 0.09s; }
.grid > .card:nth-child(4) { animation-delay: 0.12s; }

/* Sidebar Styles */
.bt-sidebar {
    background: var(--bt-sidebar-bg);
    width: 260px;
    min-height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--bt-border);
    box-shadow: -1px 0 4px rgba(30, 58, 95, 0.04);
}

.bt-sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--bt-border);
}

.bt-sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
}

.bt-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 0.625rem;
    color: var(--bt-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.bt-sidebar-item:hover {
    background: var(--bt-sidebar-hover);
    color: var(--bt-navy);
}

.bt-sidebar-item.active {
    background: var(--bt-sidebar-active);
    color: var(--bt-navy);
    box-shadow: inset 3px 0 0 var(--bt-green);
    font-weight: 700;
}

.bt-sidebar-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.bt-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--bt-border);
}

.bt-main {
    margin-right: 260px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .bt-sidebar {
        width: 100%;
        min-height: auto;
        position: sticky;
        top: 0;
    }
    .bt-sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
    }
    .bt-sidebar-item {
        white-space: nowrap;
        margin-bottom: 0;
        margin-left: 0.25rem;
    }
    .bt-main {
        margin-right: 0;
    }
}

/* Lucide icon sizing */
[data-lucide] {
    stroke-width: 1.75;
}

/* Interactive Hover / Active States */
a, button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.96);
}

/* Pulse animation for active states */
@keyframes softPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.pulse-glow {
    animation: softPulse 2s infinite;
}

/* Checkbox parent card toggle effect */
label:has(input[type="checkbox"]) {
    transition: all 0.2s ease-in-out;
}

label:has(input[type="checkbox"]:checked) {
    background-color: rgba(30, 58, 95, 0.05) !important;
    border-color: rgba(30, 58, 95, 0.3) !important;
    transform: translateY(-1px) scale(1.005);
    box-shadow: 0 4px 12px -2px rgba(30, 58, 95, 0.06);
}
