/* Vuvaa UI reference skin for the legacy demo application. */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f9fafb;
    --lighter: #f3f4f6;
    --dark: #111827;
    --gray-100: #f8fafc;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 35px rgba(15, 23, 42, 0.12);
    --radius: 12px;
}

html,
body {
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0;
}

body {
    background: #f5f7fb;
    color: var(--dark);
}

body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #eef2ff;
}

body.auth-page .main {
    width: 100%;
    margin-left: 0;
}

.login-wrapper {
    width: 100%;
    max-width: 1000px;
}

.login-card {
    overflow: hidden;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
}

.left-side {
    min-height: 580px; /* Reduced from 680px */
    height: 100%;       /* Allows it to match the right side naturally */
    padding: 40px;
    display: flex;
    align-items: center;
    color: #fff;
    background:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.65)),
        url("../assets/images/background.jpg") center center / cover no-repeat;
}

.hero-content {
    max-width: 420px;
}

.hero-title {
    font-size: 36px; /* Reduced slightly from 42px */
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-title span {
    color: #fff;
}

.hero-text {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}

.compliance-box {
    display: inline-block;
    margin-top: 30px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.compliance-box img {
    width: 100%;
    max-width: 350px;
}

.right-side {
    min-height: 580px; /* Reduced from 680px */
    padding: 40px 45px; /* Tighter padding to save vertical space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    width: 160px; /* Reduced from 180px */
    max-width: 100%;
    margin-bottom: 20px; /* Reduced from 25px */
}

.auth-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

.auth-subtitle {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 20px; /* Reduced from 30px */
}

.form-label,
label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px; /* Reduced from 22px to save massive vertical space */
}

.form-control,
.form-select,
select.form-control {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid #dbe3f0;
    background: #f8faff;
    padding: 10px 14px;
    color: var(--dark);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control-lg {
    min-height: 54px;
    font-size: 15px;
}

.form-control:focus,
.form-select:focus,
select.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    background: #fff;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-500);
}

.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px; /* Reduced from 28px */
    font-size: 14px;
}

.forgot-link,
a {
    color: var(--primary-dark);
}

.btn {
    border: 0;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.btn-info,
.btn-warning.btn-block,
.btn-login {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.btn-warning {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-secondary {
    color: var(--dark);
    background: var(--lighter);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.22);
}

.btn-block,
.btn-login {
    width: 100%;
}

.btn-login {
    min-height: 56px;
    font-size: 17px;
}

#server_mssg,
#loginAlert {
    margin: 12px 0;
    color: var(--danger);
    font-weight: 600;
}

.compliance-note {
    margin-top: 20px; /* Reduced from 35px */
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
}

.footer-text {
    margin-top: 16px;
    text-align: center;
    color: var(--gray-400);
    font-size: 12px;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    border-right: 1px solid var(--gray-200);
    transition: transform 0.2s ease, width 0.2s ease;
}

.sidebar-content {
    display: flex;
    min-height: 100%;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-brand img {
    width: 150px;
    max-width: 100%;
}

.sidebar-nav,
.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    margin: 0;
    list-style: none;
}

.sidebar-item {
    margin: 0;
}

.sidebar-link,
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--gray-500);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link-active:hover,
.sidebar-item.active > .sidebar-link,
.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.sidebar-link[data-bs-toggle="collapse"]::after {
    margin-left: auto;
}

.sidebar-dropdown {
    padding-left: 12px;
}

.sidebar-dropdown .sidebar-link {
    padding: 9px 14px 9px 38px;
    font-size: 13px;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    color: var(--dark);
}

.sidebar-bottom h6 {
    color: var(--dark) !important;
}

.main {
    flex: 1;
    min-width: 0;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease;
}

#sidebar.collapsed + .main,
.wrapper.sidebar-collapsed .main {
    margin-left: 0;
}

.navbar-bg,
.topbar {
    min-height: 92px;
    padding: 22px 30px;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.sidebar-toggle {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    border-radius: 8px;
    color: var(--gray-500);
    background: transparent;
}

.sidebar-toggle:hover {
    color: var(--primary);
    background: var(--lighter);
}

.sidebar-toggle .bi {
    font-size: 18px;
    line-height: 1;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.hamburger::before {
    transform: translateY(-6px);
}

.hamburger::after {
    transform: translateY(4px);
}

.navbar .avatar,
.sidebar-bottom img {
    object-fit: cover;
    border: 2px solid var(--gray-200);
}

.content {
    flex: 1;
    padding: 30px;
    overflow-x: hidden;
}

.content > .container-fluid {
    padding: 0 !important;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h2,
.content h1,
.card-title {
    color: var(--dark);
    font-weight: 700;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card,
.card {
    border: 0;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-md);
}

.card {
    margin-bottom: 24px;
}

.card-header {
    padding: 20px;
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: 20px;
}

.media {
    display: flex;
    align-items: center;
    gap: 14px;
}

.media-body h3 {
    color: var(--dark);
    font-weight: 700;
}

.table-responsive,
.dataTables_wrapper {
    width: 100%;
}

.table {
    margin: 0;
    color: var(--dark);
}

.table thead th {
    padding: 14px 15px;
    border: 0;
    background: var(--lighter);
    color: var(--dark);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 15px;
    border-color: var(--gray-200);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--gray-100);
}

.dataTables_filter input,
.dataTables_length select {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 6px 10px;
}

.modal-content {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--light);
    border-bottom: 1px solid var(--gray-200);
}

.footer {
    padding: 20px 30px;
    text-align: center;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 12px;
    transition: margin-left 0.2s ease;
}

.alert {
    border: 0;
    border-left: 4px solid currentColor;
    border-radius: 10px;
}

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .left-side {
        display: none;
    }

    .right-side {
        min-height: auto;
        padding: 35px 25px;
    }

    .auth-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 220px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main,
    .footer {
        margin-left: 0;
    }

    .content {
        padding: 20px;
    }

    .navbar-bg {
        padding: 16px 20px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
