/* KITS IT Client Portal */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --kits-blue:   #0057b8;
  --kits-dark:   #0a1628;
  --kits-mid:    #1a2d4a;
  --good:        #1db954;
  --warn:        #f59e0b;
  --bad:         #e53e3e;
  --text:        #1a202c;
  --muted:       #718096;
  --border:      #e2e8f0;
  --bg:          #f7f9fc;
  --card-bg:     #ffffff;
  --radius:      8px;
  --shadow:      0 1px 4px rgba(0,0,0,.08);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
       font-size: 14px; color: var(--text); background: var(--bg); }

/* ── Login ───────────────────────────────────────────────── */
.login-page { min-height: 100vh; background: #f0f4f8; }

.login-split { display: flex; min-height: 100vh; align-items: stretch; }

.login-brand { flex: 1; background: #ffffff; display: flex; flex-direction: column;
               align-items: center; justify-content: center; padding: 40px;
               border-right: 1px solid var(--border); }

.brand-image  { width: 100%; max-width: 576px; height: auto; }

.brand-tagline { margin-top: 24px; font-size: 66px; font-weight: 700; color: var(--text);
                 text-align: center; line-height: 1.1; }

.login-panel { width: 460px; min-width: 460px; background: var(--kits-dark); display: flex;
               flex-direction: column; align-items: center; justify-content: flex-start;
               padding: 48px 48px 60px; }

.login-header { text-align: center; width: 100%; margin-bottom: 48px; }

.login-logo { font-size: 72px; font-weight: 900; letter-spacing: -2px; line-height: 1;
              text-align: center; display: block; }
.login-logo .logo-kits { color: rgba(255,255,255,.65); font-size: 72px; }
.login-logo .logo-it   { color: rgba(255,255,255,.65); font-size: 72px; }

.login-portal-title { font-size: 32px; font-weight: 700; letter-spacing: 3px;
                      text-transform: uppercase; color: rgba(255,255,255,.65);
                      margin-top: 8px; text-align: center; display: block; }

.login-divider { width: 60px; height: 3px; background: #4da6ff;
                 margin: 16px auto 0; border-radius: 2px; }

.login-box { width: 100%; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600;
               color: rgba(255,255,255,.5); text-transform: uppercase;
               letter-spacing: .5px; margin-bottom: 6px; }
.field input  { width: 100%; padding: 11px 14px; border: 1px solid rgba(255,255,255,.15);
                border-radius: 6px; font-size: 14px; outline: none;
                background: rgba(255,255,255,.08); color: #fff; }
.field input:focus { border-color: #4da6ff; box-shadow: 0 0 0 3px rgba(77,166,255,.2); }
.field input::placeholder { color: rgba(255,255,255,.3); }

.btn-login { width: 100%; padding: 12px; background: var(--kits-blue); color: #fff;
             border: none; border-radius: 6px; font-size: 15px; font-weight: 600;
             cursor: pointer; margin-top: 8px; }
.btn-login:hover { background: #004a9e; }

.alert-error { background: rgba(229,62,62,.15); border: 1px solid rgba(229,62,62,.4);
               color: #fc8181; border-radius: 6px; padding: 10px 12px;
               margin-bottom: 16px; font-size: 13px; }

.login-footer { text-align: center; color: rgba(255,255,255,.35);
                font-size: 12px; margin-top: 24px; }
.login-footer strong { color: rgba(255,255,255,.6); }

@media (max-width: 700px) {
  .login-split  { flex-direction: column; }
  .login-brand  { padding: 32px 24px; border-right: none;
                  border-bottom: 1px solid var(--border); }
  .brand-image  { max-width: 440px; }
  .login-panel  { width: 100%; padding: 32px 24px; }
}

/* ── Top bar ─────────────────────────────────────────────── */
.topbar { background: var(--kits-dark); color: #fff; padding: 0 24px;
          height: 56px; display: flex; align-items: center;
          justify-content: space-between; position: sticky; top: 0; z-index: 100; }

.topbar-left  { display: flex; align-items: center; gap: 16px; }
.topbar-client { font-size: 15px; font-weight: 500; opacity: .85; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-time  { font-size: 12px; opacity: .6; }

.logo-kits { font-size: 20px; font-weight: 800; color: rgba(255,255,255,.65); }
.logo-it   { font-size: 20px; font-weight: 800; color: rgba(255,255,255,.65); }

.btn-logout { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2);
              border-radius: 5px; padding: 6px 14px; font-size: 13px; text-decoration: none; }
.btn-logout:hover { background: rgba(255,255,255,.2); }

.nav-link { color: rgba(255,255,255,.7); font-size: 13px; text-decoration: none;
            padding: 6px 12px; border-radius: 5px; border: 1px solid transparent; }
.nav-link:hover  { color: #fff; background: rgba(255,255,255,.08); }
.nav-active { color: #fff; border-color: rgba(255,255,255,.25);
              background: rgba(255,255,255,.1); font-weight: 600; }

/* ── Content ─────────────────────────────────────────────── */
.content { max-width: 1100px; margin: 0 auto; padding: 24px 20px 40px; }

/* ── Cards ───────────────────────────────────────────────── */
.cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.card { background: var(--card-bg); border: 1px solid var(--border);
        border-radius: var(--radius); padding: 20px 24px; flex: 1; min-width: 140px;
        box-shadow: var(--shadow); }

.card-value { font-size: 36px; font-weight: 700; line-height: 1; }
.card-label { font-size: 12px; color: var(--muted); text-transform: uppercase;
              letter-spacing: .5px; margin-top: 6px; }

.card-good .card-value { color: var(--good); }
.card-bad  .card-value { color: var(--bad); }
.card-warn .card-value { color: var(--warn); }

/* ── Panels ──────────────────────────────────────────────── */
.panel { background: var(--card-bg); border: 1px solid var(--border);
         border-radius: var(--radius); margin-bottom: 20px;
         box-shadow: var(--shadow); overflow: hidden; }

.panel-title { padding: 14px 20px; font-size: 13px; font-weight: 700;
               text-transform: uppercase; letter-spacing: .5px;
               border-bottom: 1px solid var(--border); background: #f8fafc; }

.panel-title-bad { background: #fff5f5; color: var(--bad);
                   border-bottom-color: #fed7d7; }

/* ── Tables ──────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 20px; text-align: left; font-size: 11px;
                 font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
                 color: var(--muted); background: #f8fafc;
                 border-bottom: 1px solid var(--border); }
.data-table td { padding: 11px 20px; border-bottom: 1px solid #f0f4f8; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f7faff; }
.muted { color: var(--muted); font-size: 13px; }

/* ── Status dots ─────────────────────────────────────────── */
.status-dot { display: inline-block; width: 8px; height: 8px;
              border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-good { background: var(--good); box-shadow: 0 0 0 3px rgba(29,185,84,.15); }
.dot-bad  { background: var(--bad);  box-shadow: 0 0 0 3px rgba(229,62,62,.15); }

/* ── Severity badges ─────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px;
         font-size: 11px; font-weight: 700; text-transform: uppercase;
         letter-spacing: .3px; }
.sev-nc       { background: #edf2f7; color: #718096; }
.sev-info     { background: #ebf8ff; color: #2b6cb0; }
.sev-warn     { background: #fffbeb; color: #b7791f; }
.sev-avg      { background: #fff3e0; color: #c05621; }
.sev-high     { background: #fff5f5; color: #c53030; }
.sev-disaster { background: #9b2335; color: #fff; }

/* ── No tickets ──────────────────────────────────────────── */
.no-tickets { padding: 20px; color: var(--good); font-weight: 600; font-size: 14px; }

/* ── Form inputs in light-background panels (admin forms) ── */
.content .field input,
.content .field select,
.content .field textarea {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.content .field input:focus,
.content .field select:focus,
.content .field textarea:focus {
  border-color: var(--kits-blue);
  box-shadow: 0 0 0 3px rgba(0,87,184,.12);
}
.content .field label {
  color: var(--muted);
}

/* ── Admin preview banner ────────────────────────────────── */
.preview-banner { background: var(--kits-blue); color: #fff;
                  text-align: center; padding: 9px 20px; font-size: 13px;
                  font-weight: 600; position: sticky; top: 56px; z-index: 99;
                  display: flex; align-items: center; justify-content: center; gap: 16px; }
.preview-banner a { color: #fff; background: rgba(255,255,255,.2);
                    border: 1px solid rgba(255,255,255,.4);
                    border-radius: 4px; padding: 3px 10px;
                    text-decoration: none; font-size: 12px; }
.preview-banner a:hover { background: rgba(255,255,255,.3); }

/* ── Asset search bar ────────────────────────────────────── */
.search-bar { display:flex; gap:12px; align-items:center;
              margin-bottom:16px; flex-wrap:wrap; }
.search-wrap { position:relative; flex:1; min-width:260px; }
.search-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%);
               font-size:16px; color:var(--muted); pointer-events:none; }
.search-wrap input { width:100%; padding:11px 16px 11px 38px;
                     border:1px solid var(--border); border-radius:8px;
                     font-size:14px; background:#fff; color:var(--text); }
.search-wrap input:focus { border-color:var(--kits-blue);
                           box-shadow:0 0 0 3px rgba(0,87,184,.1); outline:none; }
.search-count { position:absolute; right:12px; top:50%; transform:translateY(-50%);
                font-size:12px; color:var(--muted); }

/* ── Admin action buttons ────────────────────────────────── */
.admin-action-btn { font-size:12px; padding:5px 12px; border-radius:5px;
                    border:1px solid var(--border); background:#fff;
                    color:var(--text); text-decoration:none; white-space:nowrap; }
.admin-action-btn:hover { background:#f0f4f8; }
.admin-action-add { background:var(--kits-blue); border-color:var(--kits-blue);
                    color:#fff; font-weight:600; }
.admin-action-add:hover { background:#004a9e; }

/* ── Portal section cards (dashboard landing) ────────────── */
.portal-sections { display: flex; gap: 20px; flex-wrap: wrap;
                   justify-content: center; padding: 40px 0; }

.section-card { flex: 1; min-width: 260px; max-width: 340px;
                background: var(--card-bg); border: 1px solid var(--border);
                border-radius: 12px; padding: 32px 28px; text-decoration: none;
                color: var(--text); box-shadow: var(--shadow);
                display: flex; flex-direction: column; align-items: center;
                text-align: center; gap: 12px;
                transition: box-shadow .15s, transform .15s; }
.section-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.12); transform: translateY(-2px); }
.section-card-warn { border-color: var(--warn); }
.section-card-bad  { border-color: var(--bad); }

.section-icon  { font-size: 48px; line-height: 1; }
.section-title { font-size: 18px; font-weight: 700; color: var(--text); }
.section-stats { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.section-stat-main  { font-size: 56px; font-weight: 800; line-height: 1; color: var(--kits-blue); }
.section-stat-main.stat-warn { color: var(--warn); }
.section-stat-main.stat-bad  { color: var(--bad); }
.section-stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.section-sub   { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.section-arrow { font-size: 13px; color: var(--kits-blue); font-weight: 600; margin-top: 4px; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { text-align: center; color: var(--muted); font-size: 12px;
          padding: 20px; border-top: 1px solid var(--border); margin-top: 20px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .cards { gap: 10px; }
  .card  { min-width: calc(50% - 10px); padding: 14px 16px; }
  .card-value { font-size: 28px; }
  .topbar { padding: 0 14px; }
  .topbar-time { display: none; }
  .content { padding: 16px 12px 32px; }
  .data-table th, .data-table td { padding: 9px 12px; }
}
