@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --text-primary: #2d3748;
    --hisab-receivable: #10b981;
    /* Soft Emerald */
    --hisab-payable: #ee6666;
    /* Muted Coral/Rose */
    --hisab-accent: #6366f1;
    --hisab-accent-light: #818cf8;
    --hisab-grad-rec: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --hisab-grad-pay: linear-gradient(135deg, #ee6666 0%, #d54b4b 100%);
    --hisab-grad-neutral: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f0f2f5;
    color: var(--text-primary);
    min-height: 100vh;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    /* More opaque for readability */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.glass-card-light {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.card {
    border-radius: 16px;
    overflow: hidden;
}

/* Inputs */
.slick-input {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: 12px;
}

.slick-input:focus {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    color: var(--text-primary);
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 500;
    /* Medium weight */
    letter-spacing: -0.3px;
    color: #2d3748;
}

.fs-huge {
    font-size: 2.5rem;
    font-weight: 500;
    /* Medium weight */
    letter-spacing: -1px;
}

.text-muted-custom {
    color: #718096 !important;
    font-weight: 400;
    /* Regular weight */
    letter-spacing: 0.5px;
}

/* ... */

/* Table */
.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: #a0aec0;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 1rem;
    /* More breathing room */
}

.table td {
    padding: 1rem 0.75rem;
    /* Increased padding */
    font-size: 0.95rem;
    color: #4a5568;
    vertical-align: middle;
}

/* DatePicker Override */
.ndp-container {
    z-index: 1600 !important;
}

/* Modals */
.modal-content.glass-card-light {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

/* Base Utility Overrides */
.bg-danger {
    background-color: var(--hisab-payable) !important;
    background-image: none !important;
    color: white !important;
}

.bg-success {
    background-color: var(--hisab-receivable) !important;
    background-image: none !important;
    color: white !important;
}

/* Soft Background Utilities */
.bg-soft-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--hisab-receivable) !important;
}

.bg-soft-danger {
    background-color: rgba(238, 102, 102, 0.1) !important;
    color: var(--hisab-payable) !important;
}

.text-danger {
    color: var(--hisab-payable) !important;
}

.text-success {
    color: var(--hisab-receivable) !important;
}

.secondary-bg {
    background-color: rgba(203, 213, 224, 0.2);
}


/* --- Layout Skeleton --- */
#wrapper {
    overflow-x: hidden;
    min-height: 100vh;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    -webkit-transition: margin .25s ease-out;
    -moz-transition: margin .25s ease-out;
    -o-transition: margin .25s ease-out;
    transition: margin .25s ease-out;
    background: var(--primary-gradient);
    color: white;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    /* Match header height roughly */
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

#sidebar-wrapper .list-group {
    width: 15rem;
}

#page-content-wrapper {
    min-width: 100vw;
}

body.sb-sidenav-toggled #wrapper #sidebar-wrapper {
    margin-left: 0;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    body.sb-sidenav-toggled #wrapper #sidebar-wrapper {
        margin-left: -15rem;
    }
}

/* --- Sidebar Links --- */
.sidebar-link {
    color: rgba(255, 255, 255, 0.8) !important;
    background: transparent;
    border: none;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    text-decoration: none;
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    border-left-color: #fff;
    font-weight: 500;
}

.sidebar-link i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* --- Navbar / Topbar --- */
.top-navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* --- Typography Tweaks --- */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

/* Button Hover Effects */
.slick-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: none !important;
}

.slick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.slick-btn-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slick-btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.bg-primary-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
}

/* Balanced Gradient Buttons */
.btn-balanced-coral {
    background: linear-gradient(135deg, #ff8787 0%, #ee6666 100%);
    color: white !important;
}

.btn-balanced-indigo {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    color: white !important;
}

.btn-balanced-teal {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white !important;
}

.btn-balanced-coral:hover,
.btn-balanced-indigo:hover,
.btn-balanced-teal:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

/* Hisab Folder Specific Styles */
.person-folder-card {
    transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: rgba(255, 255, 255, 0.9);
}

.person-folder-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
    background: #fff;
    border-color: rgba(102, 126, 234, 0.3) !important;
}

.person-folder-card .icon-circle {
    transition: transform 0.3s ease;
}

.person-folder-card:hover .icon-circle {
    transform: scale(1.1);
}

#hisab-detail-nav {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slick-card-hover {
    transition: all 0.2s ease;
}

.slick-card-hover:active {
    transform: scale(0.98);
}

/* Premium Stat Cards */
.premium-stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1) !important;
}

.premium-stat-card .icon-box {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-stat-card:hover .icon-box {
    transform: rotate(8deg) scale(1.15);
}

/* Soft Colors */
.bg-soft-primary {
    background-color: rgba(79, 70, 229, 0.1) !important;
    color: #4f46e5 !important;
}

.bg-soft-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

.bg-soft-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

.bg-soft-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}

.ls-1 {
    letter-spacing: 1px;
}

.bg-auth-gradient {
    background: radial-gradient(circle at top left, #f8fafc 0%, #f1f5f9 100%);
}

.auth-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.input-icon-group {
    position: relative;
}

.input-icon-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: color 0.3s ease;
}

.input-icon-group .form-control {
    padding-left: 45px !important;
}

.input-icon-group .form-control:focus+i {
    color: #6366f1;
}

.text-soft-muted {
    color: #64748b;
}

.text-indigo-premium {
    color: #6366f1 !important;
}

.icon-glow-indigo {
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.3));
}

#hisabDetailTitle {
    background: var(--hisab-grad-neutral);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.icon-circle i {
    transition: transform 0.3s ease;
}

.person-folder-card:hover .icon-circle i {
    transform: scale(1.1);
}

.modal-nav-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.modal-nav-tabs .nav-link {
    border: none !important;
    color: #94a3b8 !important;
    position: relative;
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.modal-nav-tabs .nav-link.active {
    color: #6366f1 !important;
    background: transparent !important;
}

.modal-nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: #6366f1;
    border-radius: 3px 3px 0 0;
}

/* Premium Toast Notifications */
.slick-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1060;
    pointer-events: none;
}

.slick-toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: toast-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.slick-toast.success {
    border-left: 4px solid #10b981;
}

.slick-toast.error {
    border-left: 4px solid #ee6666;
}

.slick-toast .toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.slick-toast.success .toast-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.slick-toast.error .toast-icon {
    background: rgba(238, 102, 102, 0.1);
    color: #ee6666;
}

.slick-toast .toast-content {
    flex: 1;
}

.slick-toast .toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.slick-toast .toast-message {
    font-size: 0.85rem;
    color: #64748b;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-fade-out {
    animation: toast-fade-out 0.3s ease forwards;
}

@keyframes toast-fade-out {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* ── Session Timer Badge ────────────────────────────────── */
.session-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    cursor: default;
    user-select: none;
}

.session-timer-badge i {
    font-size: 0.85rem;
}

.session-timer-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.session-timer-yellow {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.session-timer-red {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
    animation: session-pulse 1.5s ease-in-out infinite;
}

@keyframes session-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.04);
    }
}

/* Warning Modal Overrides */
.session-warning-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.session-warning-icon i {
    font-size: 2.5rem;
    color: #f59e0b;
}

.session-countdown-display {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #dc2626;
    letter-spacing: 2px;
}