/* ============================================================
   ITticketing — IT Helpdesk theme
   References: /assets (Codebase admin theme), /Content (Bootstrap, AdminLTE)
   Self-contained: restyles Bootstrap components so every view inherits it.
   ============================================================ */

:root {
    --it-bg: #eef2f7;
    --it-surface: #ffffff;
    --it-dark: #0f172a;   /* slate-900 */
    --it-dark-2: #1e293b; /* slate-800 */
    --it-primary: #2563eb;
    --it-primary-2: #1d4ed8;
    --it-accent: #06b6d4; /* cyan */
    --it-text: #1e293b;
    --it-muted: #64748b;
    --it-border: #e2e8f0;
    --it-radius: 12px;
    --it-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
}

body {
    background-color: var(--it-bg);
    color: var(--it-text);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    min-height: 100%;
}

/* thin accent bar at the very top */
body::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--it-primary), var(--it-accent));
}

/* ---------- Top navigation (IT console style) ---------- */
.navbar-it {
    background: linear-gradient(100deg, var(--it-dark), var(--it-dark-2));
    box-shadow: 0 2px 14px rgba(15, 23, 42, .25);
    padding-top: .6rem;
    padding-bottom: .6rem;
}

.navbar-it .navbar-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    letter-spacing: .3px;
    color: #fff;
}

.navbar-it .brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.navbar-it .brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.navbar-it .brand-accent { color: var(--it-accent); }

.navbar-it .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    border-radius: 8px;
    padding: .4rem .75rem !important;
    transition: background-color .15s ease, color .15s ease;
}

.navbar-it .nav-link:hover,
.navbar-it .nav-link:focus { color: #fff !important; background-color: rgba(255, 255, 255, .08); }

.navbar-it .navbar-text { color: #e2e8f0; }
.navbar-it .navbar-toggler { border-color: rgba(255, 255, 255, .25); }
.navbar-it .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Layout ---------- */
main { padding-top: 1.25rem; }

/* ---------- Cards ---------- */
.card {
    background: var(--it-surface);
    border: 1px solid var(--it-border);
    border-radius: var(--it-radius);
    box-shadow: var(--it-shadow);
}

.card-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--it-border);
    font-weight: 600;
    border-top-left-radius: var(--it-radius) !important;
    border-top-right-radius: var(--it-radius) !important;
}

/* ---------- Headings ---------- */
h1, .h1, h2, .h2, h3, .h3 { color: var(--it-dark); font-weight: 700; }

/* ---------- Tables ---------- */
.table {
    background: var(--it-surface);
    border-radius: var(--it-radius);
    overflow: hidden;
}

.table-responsive {
    border: 1px solid var(--it-border);
    border-radius: var(--it-radius);
    box-shadow: var(--it-shadow);
    background: var(--it-surface);
}

.table > thead th {
    background: #f1f5f9;
    color: var(--it-muted);
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--it-border);
    white-space: nowrap;
}

.table > tbody tr:hover { background-color: #f8fafc; }

/* ---------- Buttons ---------- */
.btn { border-radius: 9px; font-weight: 500; }

.btn-primary {
    background: linear-gradient(135deg, var(--it-primary), var(--it-primary-2));
    border: none;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--it-primary-2), #1e40af); }

.btn-success { background: linear-gradient(135deg, #16a34a, #15803d); border: none; }
.btn-dark { background: var(--it-dark); border: none; }

.btn:focus, .btn:active:focus,
.form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .25);
}

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: 9px;
    border-color: var(--it-border);
}
.form-label { font-weight: 600; color: #334155; font-size: .9rem; }

/* ---------- Badges: status + priority ---------- */
.badge { font-weight: 600; padding: .4em .65em; border-radius: 7px; letter-spacing: .2px; }

.badge.priority-urgent { background-color: #dc3545; color: #fff; }
.badge.priority-high   { background-color: #fd7e14; color: #fff; }
.badge.priority-medium { background-color: #ffc107; color: #212529; }
.badge.priority-low    { background-color: #198754; color: #fff; }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--it-radius); border: 1px solid transparent; }

/* ---------- IT hero (landing page) ---------- */
.it-hero {
    background: linear-gradient(120deg, var(--it-dark), var(--it-dark-2) 60%, #243049);
    color: #fff;
    border-radius: 18px;
    padding: 3rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
    position: relative;
    overflow: hidden;
}
.it-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, .35), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(6, 182, 212, .30), transparent 40%);
    pointer-events: none;
}
.it-hero h1, .it-hero .lead { color: #fff; position: relative; }
.it-hero .lead { color: #cbd5e1 !important; }

/* ---------- Footer ---------- */
.footer {
    background: var(--it-surface);
    border-top: 1px solid var(--it-border);
    color: var(--it-muted);
}
.footer a { color: var(--it-primary); text-decoration: none; }

/* ---------- Misc ---------- */
a { color: var(--it-primary); }
dt { color: var(--it-muted); font-weight: 600; }
