/* Modern Premium Dashboard - Dark Theme & Glassmorphism */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --bg-dark: #0b0e14;
    --card-bg: #161a23;
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-hover: rgba(255, 255, 255, 0.06);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Typography Overrides */
h1,
h2,
h3,
.h1,
.h2,
.h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Bootstrap Overrides - IMPORTANT: Prevent white backgrounds */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    --bs-table-hover-bg: var(--glass-hover);
    margin-bottom: 0;
}

.table> :not(caption)>*>* {
    background-color: transparent !important;
    padding: 1.25rem 1rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--card-border);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

/* Inputs & Forms */
.form-control,
.form-select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    color: var(--text-main) !important;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Switches Fix */
.switch-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.switch-container:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    background: #4f46e5;
}

/* Custom Badges */
.badge-custom {
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-adm {
    background: rgba(14, 165, 233, 0.15);
    color: #7dd3fc;
}

.badge-client {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

/* Navbar */
.navbar {
    background: rgba(22, 26, 35, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}

/* Login */
.login-container {
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    background: rgba(22, 26, 35, 0.7);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-glow);
    color: var(--primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
}

/* Explicit Contrast Helpers */
.text-muted {
    color: var(--text-muted) !important;
}

.form-check-label {
    color: var(--text-main) !important;
    opacity: 1 !important;
}

.switch-container .text-muted {
    color: #94a3b8 !important;
    /* Slightly dimmer for secondary info but still readable */
}

/* Premium Pagination */
.pagination-premium {
    gap: 8px;
}

.pagination-premium .page-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    border-radius: 12px !important;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    margin: 0 !important;
}

.pagination-premium .page-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.pagination-premium .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.1);
}

.pagination-premium .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.02);
    border-color: transparent;
    color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}

.pagination-premium .page-item:first-child .page-link,
.pagination-premium .page-item:last-child .page-link {
    width: auto;
    padding: 0 16px;
}