/* =====================================================================
   Chahal Computer Co — Reception & Service Desk
   Design system: calm, refined, professional. Built for all-day use.
   ===================================================================== */

:root {
    /* Palette — a deep slate-teal primary with warm neutral surfaces */
    --brand:        #0f766e;   /* teal-700, anchors the brand */
    --brand-dark:   #115e59;
    --brand-soft:   #ccfbf1;   /* light teal wash */
    --ink:          #1f2933;   /* near-black text */
    --ink-soft:     #52606d;   /* secondary text */
    --line:         #e4e7eb;   /* hairline borders */
    --surface:      #ffffff;   /* cards */
    --canvas:       #f4f6f8;   /* page background */

    /* Status colors — muted, not loud */
    --ok:      #15803d;
    --ok-soft: #dcfce7;
    --warn:    #b45309;
    --warn-soft:#fef3c7;
    --danger:  #b91c1c;
    --danger-soft:#fee2e2;
    --info:    #1d4ed8;
    --info-soft:#dbeafe;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
    --shadow-md: 0 4px 12px rgba(16,24,40,.06), 0 2px 4px rgba(16,24,40,.04);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.94rem;
    color: var(--ink);
    background-color: var(--canvas) !important;
    letter-spacing: -0.005em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', system-ui, sans-serif;
    color: var(--ink);
    letter-spacing: -0.02em;
    font-weight: 600;
}

/* ---------- Navbar ---------- */
.navbar {
    background-color: var(--surface) !important;
    border-bottom: 1px solid var(--line) !important;
    box-shadow: var(--shadow-sm) !important;
    margin-bottom: 1.75rem !important;
}
.navbar .nav-link {
    color: var(--ink-soft) !important;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.45rem 0.8rem !important;
    transition: all .15s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.navbar .nav-link:hover {
    color: var(--brand) !important;
    background: var(--brand-soft);
}
.navbar .nav-link.active {
    color: var(--brand) !important;
    background: var(--brand-soft);
}
.navbar-text { color: var(--ink-soft) !important; font-weight: 500; }
.dropdown-menu {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 0.4rem;
}
.dropdown-item { border-radius: 7px; padding: 0.5rem 0.7rem; font-weight: 500; display:flex; align-items:center; gap:.5rem; }
.dropdown-item:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}
.card-body { padding: 1.25rem 1.4rem; }
.card h2 { margin-bottom: 0; font-size: 2rem; }

/* ---------- Stat tiles (dashboard) ---------- */
.stat-tile {
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    color: #fff;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    height: 100%;
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,24,40,.10); }
.stat-tile .stat-label { font-size: .82rem; font-weight: 600; opacity: .92; letter-spacing: .01em; display:flex; align-items:center; gap:.45rem; }
.stat-tile .stat-value { font-family: 'Sora', sans-serif; font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin-top: .35rem; }
.stat-tile .stat-link { color: #fff; opacity: .9; font-size: .82rem; text-decoration: none; font-weight: 500; }
.stat-tile .stat-link:hover { opacity: 1; text-decoration: underline; }
.stat-tile .stat-icon { position: absolute; right: 1rem; top: 1rem; font-size: 1.5rem; opacity: .35; }

/* tile colour variants — gradients give subtle depth */
.tile-primary { background: linear-gradient(135deg, #0f766e, #0d9488); }
.tile-info    { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.tile-dark    { background: linear-gradient(135deg, #1f2933, #3e4c59); }
.tile-slate   { background: linear-gradient(135deg, #475569, #64748b); }
.tile-warn    { background: linear-gradient(135deg, #b45309, #d97706); }
.tile-ok      { background: linear-gradient(135deg, #15803d, #22c55e); }
.tile-danger  { background: linear-gradient(135deg, #b91c1c, #ef4444); }

.section-label {
    font-size: .78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--ink-soft); margin-bottom: .6rem;
}

/* ---------- Buttons ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 500; padding: .5rem 1rem; transition: all .15s ease; display:inline-flex; align-items:center; gap:.4rem; }
.btn-sm { padding: .3rem .65rem; border-radius: 8px; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); }
.btn-link { color: var(--brand); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; color: var(--ink); margin-bottom: 0; }
.table > thead th {
    background: #f9fafb;
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--line);
    padding: .7rem .9rem;
    white-space: nowrap;
}
.table > tbody td { padding: .7rem .9rem; vertical-align: middle; border-color: var(--line); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: #fbfcfd; }
.table-hover > tbody > tr:hover > * { background: var(--brand-soft); }
/* wrap tables in a card-like container */
.table-responsive {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: auto;
}
.table-responsive > .table { margin: 0; }
.table-bordered, .table-bordered td, .table-bordered th { border: none; border-bottom: 1px solid var(--line); }

/* ---------- Badges ---------- */
.badge { font-weight: 600; padding: .35em .6em; border-radius: 7px; font-size: .74rem; letter-spacing: .01em; }
.bg-success { background: var(--ok) !important; }
.bg-danger  { background: var(--danger) !important; }
.bg-warning { background: var(--warn) !important; color: #fff !important; }
.bg-secondary { background: #64748b !important; }
.bg-info { background: var(--info) !important; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; color: var(--ink); font-size: .85rem; margin-bottom: .3rem; }
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    padding: .55rem .75rem;
    font-size: .92rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15,118,110,.12);
}
.form-text { color: var(--ink-soft); font-size: .8rem; }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 500; }
.alert-success { background: var(--ok-soft); color: #065f46; border-color: #a7f3d0; }
.alert-danger  { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-info    { background: var(--info-soft); color: #1e40af; border-color: #bfdbfe; }

/* ---------- Engineer cards (mobile) ---------- */
.card .card-title { font-family: 'Sora', sans-serif; }

/* ---------- Login page ---------- */
.login-wrap { min-height: 88vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 410px; }

/* small helpers */
.text-muted { color: var(--ink-soft) !important; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
hr { border-color: var(--line); opacity: 1; }

/* Clickable dashboard tiles (tiles rendered as <a>) */
a.stat-tile, a.stat-tile-link { text-decoration: none; cursor: pointer; display: block; color: #fff; }
a.stat-tile:hover, a.stat-tile-link:hover { text-decoration: none; color: #fff; }
a.stat-tile .stat-value, a.stat-tile .stat-label { color: #fff; }

/* Calls list: compact, structured layout */
.calls-table { font-size: .92rem; }
.calls-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; color: #667085; }
.calls-table td { vertical-align: middle; }
.calls-table .small { font-size: .8rem; }

/* Contracts list: compact, structured layout */
.contracts-table { font-size: .92rem; }
.contracts-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; color: #667085; }
.contracts-table td { vertical-align: middle; }
.contracts-table .small { font-size: .8rem; }
