/* ============================================================
   Deep Footprints — Customer Dashboard design system
   Brand: Red Hat Display · orange #ff9933 · green #1b6441
   Hand-written (no build step) so deploys stay simple.
   ============================================================ */

:root {
    --orange:      #ff9933;
    --orange-burnt:#f38630;
    --orange-tint: #fff2e6;
    --green:       #1b6441;
    --ink:         #212529;
    --muted:       #666;
    --line:        #e6e8eb;
    --bg:          #f6f7f9;
    --white:       #ffffff;
    --danger:      #c0392b;
    --radius:      12px;
    --shadow:      0 8px 30px rgba(16, 24, 40, 0.06);
    --sidebar-w:   248px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    font-family: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--muted);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 .5rem;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Brand mark ---------- */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--ink);
    font-size: 18px;
}
.brand .dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--orange);
    flex: none;
}

/* ============================================================
   Guest layout (login / password reset)
   ============================================================ */
.guest {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.guest-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 410px;
    padding: 38px 34px;
}
.guest-card .brand { justify-content: center; margin-bottom: 6px; }
.guest-card h1 { text-align: center; font-size: 21px; margin-bottom: 4px; }
.guest-card .sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 24px; }

/* ============================================================
   App shell (sidebar + content)
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    background: var(--white);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
}
.sidebar .brand { padding: 4px 8px 22px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
}
.sidebar nav a:hover { background: var(--bg); text-decoration: none; color: var(--ink); }
.sidebar nav a.active { background: var(--orange-tint); color: var(--ink); }
.sidebar .spacer { flex: 1; }

.sidebar .who {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 14px;
    font-size: 13px;
}
.sidebar .who .name { color: var(--ink); font-weight: 700; }
.sidebar .who .email { color: var(--muted); word-break: break-all; }

.content { flex: 1; min-width: 0; padding: 30px 36px; }
.content-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 22px;
}
.content-head h1 { margin: 0; font-size: 24px; }

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.card h2 { font-size: 17px; margin-bottom: 14px; }
.card .card-sub { color: var(--muted); font-size: 14px; margin: -8px 0 18px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-size: 15px; font-weight: 700;
    padding: 10px 18px;
    border-radius: 9px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: filter .12s ease, background .12s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
/* Brand: orange background with DARK text (per DFP brand) */
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { filter: brightness(.95); color: var(--ink); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--bg); color: var(--ink); }
.btn-danger { background: var(--white); color: var(--danger); border-color: #ecc9c5; }
.btn-danger:hover { background: #fbeeec; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ============================================================
   Forms
   ============================================================ */
.field { margin-bottom: 16px; }
.field label {
    display: block; font-weight: 600; color: var(--ink);
    font-size: 14px; margin-bottom: 6px;
}
.field .hint { color: var(--muted); font-size: 13px; margin-top: 5px; }
.input, .select {
    width: 100%;
    font-family: inherit; font-size: 15px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    color: var(--ink);
}
.input:focus, .select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.18);
}
.field .error { color: var(--danger); font-size: 13px; margin-top: 5px; }

.checkbox { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--ink); }
.checkbox input { width: 17px; height: 17px; accent-color: var(--orange); }

.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type=color] {
    width: 46px; height: 42px; padding: 2px;
    border: 1px solid var(--line); border-radius: 9px; background: var(--white); cursor: pointer;
}

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
table.table th {
    text-align: left; color: var(--muted); font-weight: 700; font-size: 13px;
    text-transform: uppercase; letter-spacing: .03em;
    padding: 10px 12px; border-bottom: 1px solid var(--line);
}
table.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
table.table tr:last-child td { border-bottom: none; }
table.table tr:hover td { background: #fafbfc; }

/* ---------- Client name cell with logo badge ---------- */
.client-cell { display: flex; align-items: center; gap: 12px; }
.logo-badge {
    width: 38px; height: 38px; flex: none;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-weight: 700; font-size: 14px;
}
.logo-badge.lg { width: 56px; height: 56px; font-size: 20px; border-radius: 12px; }

/* ============================================================
   Badges & alerts
   ============================================================ */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700;
    padding: 3px 10px; border-radius: 999px;
}
.badge-on  { background: #e7f3ec; color: var(--green); }
.badge-off { background: #f0f1f3; color: var(--muted); }

.alert {
    border-radius: 10px; padding: 13px 16px; font-size: 14px;
    margin-bottom: 20px; border: 1px solid transparent;
}
.alert-success { background: #e7f3ec; border-color: #cde7d6; color: var(--green); }
.alert-error   { background: #fbeeec; border-color: #ecc9c5; color: var(--danger); }

/* ---------- Copyable link box (set-password links) ---------- */
.linkbox {
    background: var(--orange-tint);
    border: 1px solid #f6d9b8;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.linkbox .label { font-weight: 700; color: var(--ink); font-size: 14px; margin-bottom: 8px; }
.linkbox .row { display: flex; gap: 8px; }
.linkbox input {
    flex: 1; font-family: inherit; font-size: 13px;
    padding: 9px 11px; border: 1px solid #f0c89a; border-radius: 8px;
    background: var(--white); color: var(--ink);
}

.empty {
    text-align: center; color: var(--muted);
    padding: 40px 20px; font-size: 15px;
}

.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 800px) {
    .shell { flex-direction: column; }
    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .sidebar .brand { padding: 0; margin-right: 8px; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .sidebar .spacer, .sidebar .who { display: none; }
    .content { padding: 22px 18px; }
    .grid-2 { grid-template-columns: 1fr; }
}
