/* assets/css/style.css */
/* Modern Professional Corporate Blue & White Admin Dashboard Theme */

:root {
    --bg-primary: #f8fafc;
    --sidebar-bg: #0f172a; /* Slate 900 (Dark Slate Blue) */
    --sidebar-hover: #1e293b; /* Slate 800 */
    --text-primary: #0f172a;
    --text-secondary: #64748b; /* Slate 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    --brand-blue: #0f62fe; /* IBM Blue / Professional Primary */
    --brand-blue-hover: #0353e9;
    --brand-blue-active: #0043ce;
    --brand-blue-light: #edf5ff;
    --accent-blue: #3b82f6;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Global Ajax Loader Mask */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

/* Auth Section Styling */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #0f62fe 100%);
}
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    padding: 35px 30px;
}

/* Sidebar Styling */
#sidebar {
    min-width: 260px;
    max-width: 260px;
    min-height: 100vh;
    display: flex;
    flex-column: column;
    flex-direction: column;
    z-index: 100;
    transition: all 0.3s ease;
    background-color: #ffffff !important;
}

#sidebar.active {
    margin-left: -260px;
}

#sidebar .nav-link-btn {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#sidebar .nav-link-btn:hover {
    color: var(--brand-blue);
    background-color: var(--brand-blue-light);
}

#sidebar .nav-link-btn.active {
    color: #fff;
    background-color: var(--brand-blue);
}

#sidebar .nav-link-btn i {
    width: 20px;
    text-align: center;
}

/* Sidebar Mobile Overlay Backdrop */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1030;
    backdrop-filter: blur(1px);
    transition: all 0.3s ease;
}
.sidebar-overlay.active {
    display: block;
}

/* Page Layout Shell */
#content {
    transition: all 0.3s ease;
}

/* Modern Card Layouts */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    background-color: #ffffff;
}
.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
    font-weight: 600;
}
.card-body {
    padding: 24px;
}

/* Metrics Dashboard Cards */
.metric-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.metric-card .icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.25);
    border-color: var(--brand-blue);
}

.btn-success {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: #ffffff !important;
}
.btn-success:hover {
    background-color: var(--brand-blue-hover) !important;
    border-color: var(--brand-blue-hover) !important;
}
.btn-success:active {
    background-color: var(--brand-blue-active) !important;
    border-color: var(--brand-blue-active) !important;
}

/* Custom Table Badges */
.badge {
    padding: 6px 12px;
    border-radius: 50rem;
    font-weight: 500;
}
.badge-active { background-color: rgba(15, 98, 254, 0.1); color: var(--brand-blue); }
.badge-inactive { background-color: rgba(100, 116, 139, 0.1); color: var(--text-secondary); }
.badge-pending { background-color: rgba(245, 158, 11, 0.1); color: #b45309; }
.badge-sent { background-color: rgba(59, 130, 246, 0.1); color: #1d4ed8; }
.badge-processing { background-color: rgba(6, 182, 212, 0.1); color: #0e7490; }
.badge-failed { background-color: rgba(239, 68, 68, 0.1); color: #b91c1c; }
.badge-received { background-color: rgba(16, 185, 129, 0.1); color: #047857; }
.badge-cancelled { background-color: rgba(100, 116, 139, 0.15); color: #475569; }

/* Timeline Activity */
.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.activity-feed::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background: var(--border-color);
}
.activity-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 20px;
}
.activity-item .dot {
    position: absolute;
    left: 9px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--brand-blue);
    background-color: var(--brand-blue);
}
.activity-item.login .dot { box-shadow: 0 0 0 2px var(--brand-blue); background-color: var(--brand-blue); }
.activity-item.logout .dot { box-shadow: 0 0 0 2px #64748b; background-color: #64748b; }
.activity-item.delete .dot { box-shadow: 0 0 0 2px #ef4444; background-color: #ef4444; }
.activity-item.update .dot { box-shadow: 0 0 0 2px #f59e0b; background-color: #f59e0b; }

/* Custom Clock & Info Bar */
#realtime-clock {
    font-family: monospace;
    font-weight: bold;
}

/* Responsive Rules */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1040;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    }
    #sidebar.active {
        left: 0;
        margin-left: 0;
    }
    #content {
        width: 100%;
        min-width: 100%;
    }
}
