/* ================================================================
   style_admin.css — Switch Squid Admin Panel Redesign
   Overrides SB Admin Pro defaults. Loaded after style_2.css.
   Brand purple: #582891
   ================================================================ */

/* ── General / Typography ── */
body.nav-fixed {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f4f2f7;
    color: #2d2d3a;
}

/* ── Sidebar ── */
.sidenav {
    background: #1e1b2e !important;
    border-right: none !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, .15) !important;
}

.sidenav .sidenav-menu-heading {
    color: rgba(255, 255, 255, .35) !important;
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 1.5rem 1.25rem .5rem;
    font-weight: 600;
}

.sidenav .nav-link {
    color: rgba(255, 255, 255, .7) !important;
    font-size: .875rem;
    font-weight: 500;
    padding: .65rem 1.25rem;
    border-radius: 8px;
    margin: 2px 10px;
    transition: all .2s ease;
}

.sidenav .nav-link:hover {
    color: #fff !important;
    background: rgba(88, 40, 145, .35);
}

.sidenav .nav-link.active,
.sidenav .nav-link[aria-expanded="true"] {
    color: #fff !important;
    background: #582891 !important;
}

.sidenav .nav-link-icon {
    min-width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidenav .nav-link-icon i {
    color: rgba(255, 255, 255, .5);
    font-size: 1rem;
    transition: color .2s ease;
}

.sidenav .nav-link:hover .nav-link-icon i,
.sidenav .nav-link.active .nav-link-icon i {
    color: #fff;
}

/* Sidebar top spacing */
.sidenav-menu {
    padding-top: .75rem;
}

/* Sidebar footer */
.sidenav-footer {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ── Top Navbar ── */
.topnav {
    background: #fff !important;
    border-bottom: 1px solid #e9e4f0 !important;
    box-shadow: none !important;
    height: 60px;
}

.topnav .navbar-brand {
    font-weight: 800;
    font-size: 1.15rem;
    color: #1e1b2e !important;
    letter-spacing: .02em;
}

.topnav .navbar-brand:hover {
    color: #582891 !important;
}

.dropdown-user-details-name {
    font-weight: 600;
    color: #1e1b2e;
}

.dropdown-menu {
    border: 1px solid #e9e4f0;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
    padding: .5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: .5rem .75rem;
    font-size: .875rem;
    transition: background .15s;
}

.dropdown-item:hover {
    background: #f4f2f7;
}

/* ── Cards & Content ── */
.card {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06) !important;
    overflow: hidden;
}

.card-header {
    background: #fff !important;
    border-bottom: 1px solid #f0ecf5 !important;
    font-weight: 700;
    font-size: 1rem;
    color: #1e1b2e;
    padding: 1rem 1.25rem !important;
}

.card-body {
    padding: 1.25rem !important;
}

/* ── Page Header ── */
.page-header {
    background: transparent !important;
    padding-bottom: 0 !important;
}

.page-header-title {
    font-weight: 800;
    font-size: 1.5rem;
    color: #1e1b2e;
}

.page-header-icon {
    color: #582891;
}

/* ── Dashboard Widgets ── */
.dashboard-welcome {
    background: #fff;
    border-radius: 14px;
    padding: 2rem 2.25rem;
    color: #1e1b2e;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border-left: 4px solid #582891;
}

.dashboard-welcome::after {
    display: none;
}

.dashboard-welcome h2 {
    font-weight: 800;
    font-size: 1.6rem;
    margin-bottom: .35rem;
    color: #1e1b2e;
}

.dashboard-welcome p {
    color: #6b7280;
    margin: 0;
    font-size: .95rem;
}

.dashboard-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .05);
    transition: transform .2s ease, box-shadow .2s ease;
    height: 100%;
    border: 1px solid #f0f0f5;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.stat-card .stat-icon.purple {
    background: rgba(88, 40, 145, .1);
    color: #582891;
}

.stat-card .stat-icon.blue {
    background: rgba(59, 130, 246, .1);
    color: #3b82f6;
}

.stat-card .stat-icon.green {
    background: rgba(16, 185, 129, .1);
    color: #10b981;
}

.stat-card .stat-icon.orange {
    background: rgba(245, 158, 11, .1);
    color: #f59e0b;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e1b2e;
    line-height: 1;
    margin-bottom: .35rem;
}

.stat-card .stat-label {
    font-size: .8rem;
    color: #8b8b9e;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Quick Actions */
.quick-action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 10px;
    text-decoration: none !important;
    color: #1e1b2e !important;
    font-weight: 600;
    font-size: .9rem;
    transition: all .2s ease;
    border: 1px solid #e5e7eb;
}

.quick-action-card:hover {
    background: #582891;
    border-color: #582891;
    color: #fff !important;
    transform: translateX(4px);
}

.quick-action-card:hover .qa-icon {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.quick-action-card .qa-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 40, 145, .08);
    color: #582891;
    flex-shrink: 0;
}

/* ── Tables ── */
.datatable {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

.table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table thead th {
    background: #f8f6fb !important;
    border: none !important;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    color: #6b6b7e;
    padding: .85rem 1rem !important;
    white-space: nowrap;
}

.table thead th:first-child {
    border-radius: 8px 0 0 8px;
}

.table thead th:last-child {
    border-radius: 0 8px 8px 0;
}

.table tbody td {
    padding: .75rem 1rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f0ecf5 !important;
    border-top: none !important;
    font-size: .85rem;
    color: #3d3d4e;
}

.table tbody tr:hover td {
    background: #faf8fd;
}

.table tfoot th {
    display: none;
}

/* DataTables overrides */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: .75rem 0 !important;
    font-size: .85rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e0dbe8;
    border-radius: 8px;
    padding: .4rem .75rem;
    outline: none;
    transition: border-color .2s;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #582891;
    box-shadow: 0 0 0 3px rgba(88, 40, 145, .1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    border: none !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #582891 !important;
    color: #fff !important;
    border: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f4f2f7 !important;
    color: #582891 !important;
    border: none !important;
}

/* ── Login Page ── */
.login-modern {
    min-height: 100vh;
    display: flex;
}

.login-brand-panel {
    background: linear-gradient(135deg, #1e1b2e 0%, #582891 100%);
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    top: -100px;
    right: -100px;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .03);
    bottom: -80px;
    left: -80px;
}

.login-brand-panel h1 {
    font-weight: 900;
    font-size: 2.5rem;
    letter-spacing: .04em;
    position: relative;
    z-index: 1;
    color: #fff;
}

.login-brand-panel p {
    opacity: .7;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    margin-top: .5rem;
}

.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
}

.login-form-box {
    width: 100%;
    max-width: 400px;
}

.login-form-box h2 {
    font-weight: 800;
    font-size: 1.75rem;
    color: #1e1b2e;
    margin-bottom: .25rem;
}

.login-form-box .subtitle {
    color: #8b8b9e;
    font-size: .95rem;
    margin-bottom: 2rem;
}

.login-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.login-input-group input {
    width: 100%;
    padding: .85rem 1rem .85rem 2.75rem;
    border: 1.5px solid #e0dbe8;
    border-radius: 10px;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    background: #faf8fd;
}

.login-input-group input:focus {
    border-color: #582891;
    box-shadow: 0 0 0 4px rgba(88, 40, 145, .08);
    background: #fff;
}

.login-input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0b4;
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    padding: .85rem;
    background: linear-gradient(135deg, #582891, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    letter-spacing: .02em;
}

.login-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-link {
    color: #582891;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
}

.login-link:hover {
    text-decoration: underline;
}

/* ── Modal overrides ── */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
}

.modal-header {
    border-bottom: 1px solid #f0ecf5;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-footer {
    border-top: 1px solid #f0ecf5;
    padding: 1rem 1.5rem;
}

/* ── Buttons ── */
.btn-primary {
    background: #582891 !important;
    border-color: #582891 !important;
    border-radius: 8px;
    font-weight: 600;
    padding: .5rem 1.25rem;
    transition: opacity .2s;
}

.btn-primary:hover {
    opacity: .88;
    background: #582891 !important;
    border-color: #582891 !important;
}

.btn-warning {
    border-radius: 8px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d0c8dc;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8afc8;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .login-brand-panel {
        display: none;
    }

    .stat-card .stat-value {
        font-size: 1.35rem;
    }

    .dashboard-welcome {
        padding: 1.5rem;
    }

    .dashboard-welcome h2 {
        font-size: 1.25rem;
    }

    .dashboard-logo {
        height: 30px;
    }
}
