/* ============================================================
   WCS Base Theme — Navy / Blue / Teal
   Matches webcarsolutions.be visual identity
   ============================================================ */

:root {
    --bg:        #FFFFFF;
    --bg-soft:   #F6F9FF;
    --bg-card:   #FFFFFF;
    --text:      #0B1E3A;
    --muted:     #38557A;
    --line:      #E6EEF9;
    --primary:   #1E88FF;
    --primary-h: #1570D8;
    --primary-2: #14B8A6;
    --navy:      #0B1E3A;
    --navy-mid:  #152B52;
    --navy-soft: #1E3A64;
    --red:       #E53E3E;
    --red-soft:  #FFF5F5;
    --orange:    #DD6B20;
    --orange-soft:#FFFAF0;
    --green:     #38A169;
    --green-soft:#F0FFF4;
    --purple:    #805AD5;
    --radius:    10px;
    --radius-sm: 6px;
    --shadow:    0 2px 12px rgba(11,30,58,.08);
    --shadow-md: 0 4px 24px rgba(11,30,58,.12);
    --transition: 0.18s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background: var(--bg-soft);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--primary-h); }

code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.85em;
    background: var(--bg-soft);
    color: var(--navy);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    border: 1px solid var(--line);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.2rem;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-h);
    border-color: var(--primary-h);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30,136,255,.35);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
}

.btn-dark {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.btn-dark:hover:not(:disabled) {
    background: var(--navy-soft);
    border-color: var(--navy-soft);
    color: #fff;
}

.btn-danger {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.btn-danger:hover:not(:disabled) {
    background: #C53030;
    border-color: #C53030;
    box-shadow: 0 4px 12px rgba(229,62,62,.35);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
}
.btn-full { width: 100%; justify-content: center; }

/* ── Card ────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}
.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
}
.card-body { padding: 1.25rem; }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 99px;
    line-height: 1;
}
.badge-primary  { background: rgba(30,136,255,.12); color: var(--primary); }
.badge-teal     { background: rgba(20,184,166,.12); color: var(--primary-2); }
.badge-success  { background: rgba(56,161,105,.12); color: #2F855A; }
.badge-warn     { background: rgba(221,107,32,.12); color: var(--orange); }
.badge-danger   { background: rgba(229,62,62,.12);  color: var(--red); }
.badge-muted    { background: rgba(56,85,122,.1);   color: var(--muted); }

/* ── Table ───────────────────────────────────────────────── */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table thead tr {
    background: var(--bg-soft);
    border-bottom: 2px solid var(--line);
}
.table th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
}
.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-soft); }
.text-right { text-align: right; }

/* ── Status ──────────────────────────────────────────────── */
.status { display: inline-flex; align-items: center; gap: 0.35rem; }
.status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status.ok::before     { background: var(--green); box-shadow: 0 0 0 2px rgba(56,161,105,.2); }
.status.warn::before   { background: var(--orange); box-shadow: 0 0 0 2px rgba(221,107,32,.2); }
.status.error::before,
.status.offline::before { background: var(--red); box-shadow: 0 0 0 2px rgba(229,62,62,.2); }
.status.unknown::before { background: var(--muted); }

/* ── Form controls ───────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}
.form-group:last-of-type { margin-bottom: 0; }

label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: var(--font);
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,136,255,.15);
}
.form-control::placeholder { color: #A0AABB; }

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2338557A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.input-icon-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.input-icon-wrap .form-control { padding-left: 2.5rem; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-error   { background: var(--red-soft);    color: #C53030; border-color: rgba(229,62,62,.2); }
.alert-success { background: var(--green-soft);  color: #276749; border-color: rgba(56,161,105,.2); }
.alert-warn    { background: var(--orange-soft); color: #C05621; border-color: rgba(221,107,32,.2); }

/* ── Utility ─────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--muted); font-size: 0.875rem; }
