/* Color Variables based on the image */
:root {
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --primary-blue: #4f46e5;
    --primary-blue-light: #e0e7ff;
    --primary-blue-bg: #eef2ff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --sidebar-width: 250px;
    --bg-page: #fafbfc;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --danger-red: #ef4444;
    --border-color: #f1f5f9;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-page);
}

.bg-light-custom {
    background-color: var(--bg-page) !important;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.05);
    /* very subtle right border box shadow */
    z-index: 10;
}

.brand-logo {
    width: 32px;
    height: 32px;
    background-color: var(--primary-blue) !important;
}

/* Sidebar nav area scrollable and collapse fixes */
.sidebar .nav-pills {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    flex-wrap: nowrap;
}

/* Nav Link styles matches image */
.nav-pills .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1.2rem;
    color: #475569 !important;
    transition: all 0.2s;
}

.nav-pills .nav-link i {
    font-size: 1.15rem;
}

.nav-pills .nav-link:hover {
    background-color: #f1f5f9;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-blue-light) !important;
    color: var(--primary-blue) !important;
    font-weight: 600;
}

.nav-pills .nav-link.active i {
    color: var(--primary-blue) !important;
}

.user-avatar-initials {
    width: 38px;
    height: 38px;
    background-color: #fce4ec;
    /* light pinkish as seen in the image */
    color: #e11d48;
    /* darker red/pink text */
    font-size: 1rem;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.9rem !important;
}

/* Dashboard Header & Main Content */
.header-title {
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.bg-search {
    background-color: #f1f5f9;
    color: #475569;
}

.bg-search:focus {
    box-shadow: 0 0 0 0.25rem rgba(29, 78, 216, 0.1);
    border-color: #cbd5e1 !important;
}

/* Typography Helpers */
.sm-text {
    font-size: 0.85rem;
}

/* Card Styles */
.card {
    border: 1px solid var(--border-color) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .05) !important;
}

/* Status dots & legends */
.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
}

/* Icon box backgrounds */
.bg-blue-light {
    background-color: var(--primary-blue-light) !important;
    color: var(--primary-blue) !important;
}

.bg-warning-light {
    background-color: #fffbeb !important;
    color: var(--warning-yellow) !important;
}

.bg-danger-light {
    background-color: #fef2f2 !important;
    color: var(--danger-red) !important;
}

.bg-success-light {
    background-color: #ecfdf5 !important;
    color: var(--success-green) !important;
}

/* Table Styles */
.custom-table th {
    color: #94a3b8;
    font-weight: 600;
    border-bottom: 0 !important;
}

.status-active {
    background-color: #ecfdf5;
    color: #059669;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 12px;
}

.status-dot {
    width: 6px;
    height: 6px;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .025) !important;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Specific Login Styles */
body.login-page {
    background-color: #f1f5f9;
    /* Match image light blueish-gray background */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* top padding via mt-5 */
    min-height: 100vh;
    flex-direction: column;
}

.login-logo-box {
    width: 56px;
    height: 56px;
    background-color: var(--primary-blue);
    /* Match exact blue */
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.2);
}

.login-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 440px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    /* For the bottom footer radius */
}

.login-card-body {
    padding: 2.5rem 3rem;
}

.login-card-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.login-card-text {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-control {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: #475569;
    border-color: #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}

.password-toggle {
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #475569;
}

.form-check-label {
    font-size: 0.825rem;
    color: #475569;
    font-weight: 500;
}

.form-check-input {
    border-color: #cbd5e1;
    cursor: pointer;
    width: 1.1em;
    height: 1.1em;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary-custom {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
    background-color: #1e40af;
    border-color: #1e40af;
    color: white;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}

.login-card-footer {
    background-color: #f8fafc;
    padding: 1.25rem 2.5rem;
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

.login-card-footer p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.login-card-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.login-card-footer a:hover {
    text-decoration: underline;
}

.forgot-password-link {
    font-size: 0.8rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.page-footer-links {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
}

.page-footer-links a {
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.page-footer-links a:hover {
    color: #64748b;
}

/* New Colorful Gradients for Dashboard Cards */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
}