@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --border-color: #e2e8f0;
    --border-color-focus: #818cf8;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    
    --accent: #2563eb;
    
    --status-online: #10b981;
    --status-offline: #94a3b8;
    --status-busy: #f59e0b;
    --status-emergency: #ef4444;

    --text-heading: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-border: #1e293b;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: var(--font-heading);
    color: var(--text-heading);
}

/* Crisp Clean Panels */
.glass-panel, .panel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.glass-card, .metric-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

.glass-card:hover, .metric-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Light Theme Table */
.table-dark-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-main);
}

.table-dark-custom th {
    background: #f1f5f9;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 12px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.table-dark-custom td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--text-main);
}

.table-dark-custom tr:hover td {
    background: #f8fafc;
}

/* Badges */
.badge-role {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-admin {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.badge-dispatcher {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.badge-subscriber {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-supervisor {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.badge-active {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-inactive {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    color: #ffffff;
}

.btn-secondary-custom {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-secondary-custom:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-danger-custom {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-custom:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Modal Overlay */
.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.modal-content-custom {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Form Controls */
.form-control-custom, .form-select-custom {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    padding: 9px 13px;
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: all 0.2s;
}

.form-control-custom:focus, .form-select-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.input-group > .form-control-custom {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}


/* Sidebar */
.sidebar {
    width: 260px;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 28px 36px;
    background: #f8fafc;
    min-height: 100vh;
}

/* Nav links */
.nav-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    margin: 4px 12px;
    transition: all 0.2s ease;
}

.nav-item-custom:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #f8fafc;
}

.nav-item-custom.active {
    background: #4f46e5;
    color: #ffffff;
}

/* Captcha styling */
.captcha-box {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 8px 14px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 4px;
    color: #1e293b;
    user-select: none;
}

/* Modal backdrop & content */
.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.modal-content-custom {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 28px;
    color: var(--text-main);
}
