*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:   #2563eb;
    --primary-h: #1d4ed8;
    --danger:    #dc2626;
    --danger-h:  #b91c1c;
    --secondary: #64748b;
    --bg:        #f1f5f9;
    --surface:   #ffffff;
    --border:    #e2e8f0;
    --text:      #1e293b;
    --muted:     #94a3b8;
    --radius:    8px;
    --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}

body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, monospace; font-size: .875em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }

/* NAV */
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.navbar-brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.navbar-right { display: flex; align-items: center; gap: 12px; }

/* CONTAINER */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }

/* PAGE HEADER */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h2 { font-size: 1.4rem; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .875rem; cursor: pointer; transition: background .15s; font-weight: 500; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); }
.btn-secondary { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.btn-secondary:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-h); border-color: var(--danger-h); }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-block { width: 100%; justify-content: center; }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: .9rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

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

/* FORM */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; }
.field input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; background: var(--surface); color: var(--text); }
.field input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field small { display: block; margin-top: 5px; font-size: .8rem; color: var(--muted); }
.field-actions { display: flex; gap: 10px; margin-top: 24px; }

/* LOGIN */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; width: 100%; max-width: 400px; box-shadow: var(--shadow); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 1.4rem; margin-top: 8px; }
.logo-icon { font-size: 2.5rem; }

/* SHOP GRID */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.shop-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; color: var(--text); transition: box-shadow .15s; }
.shop-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); text-decoration: none; }
.shop-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.shop-card-header h3 { font-size: 1rem; }
.shop-url { font-size: .8rem; color: var(--muted); word-break: break-all; }
.shop-meta { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); }
.shop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.shop-vuln-row { display: flex; gap: 16px; }
.vuln-block { display: flex; flex-direction: column; gap: 3px; }
.vuln-label { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.vuln-count { font-size: .78rem; color: var(--muted); }

/* BADGE */
.badge { display: inline-block; padding: 2px 8px; background: #dbeafe; color: #1e40af; border-radius: 99px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-ps { background: #fef9c3; color: #854d0e; }
.badge-group { display: flex; gap: 4px; flex-wrap: wrap; }

/* SEVERITY BADGES */
.severity-badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.sev-none     { background: #f1f5f9; color: #64748b; }
.sev-low      { background: #dcfce7; color: #166534; }
.sev-medium   { background: #fef9c3; color: #854d0e; }
.sev-high     { background: #ffedd5; color: #9a3412; }
.sev-critical { background: #fee2e2; color: #991b1b; }

/* LIST VIEW */
.view-list { display: none; }
.list-row { cursor: pointer; }
.list-row:hover td { background: var(--bg); }
.list-name { font-weight: 600; font-size: .875rem; line-height: 1.3; }
.list-url  { font-size: .78rem; color: var(--muted); word-break: break-all; margin-top: 2px; }
.list-version { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.list-actions { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; }
.list-actions .btn { white-space: nowrap; }
.table td { vertical-align: middle; }
.table th { white-space: nowrap; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty-state p { margin-bottom: 16px; }

/* INFO BAR */
.info-bar { display: flex; flex-wrap: wrap; gap: 24px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px; box-shadow: var(--shadow); }
.info-item { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.info-label { color: var(--muted); }

/* TABLE */
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; padding: 10px 14px; background: var(--bg); border-bottom: 2px solid var(--border); font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table tbody tr:hover { background: var(--bg); }
.table tbody tr:last-child td { border-bottom: none; }

/* SEARCH */
.search-input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; margin-bottom: 16px; }
.search-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.muted { color: var(--muted); }
