/* ============================================================
   Recycle or Recycling — application stylesheet (hand-written)
   No frameworks. Styles every class used by the Blade views.
   ============================================================ */

:root {
    --emerald:#10B981; --emerald-d:#059669;
    --blue:#2563EB;    --blue-d:#1D4ED8;
    --amber:#F59E0B;   --rose:#F43F5E;   --violet:#8B5CF6;

    --bg:#F8FAFC; --surface:#ffffff; --surface-2:#F1F5F9;
    --text:#0F172A; --muted:#64748B;
    --border:#E2E8F0; --line:#E2E8F0;

    --shadow:0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-lg:0 10px 30px rgba(15,23,42,.12);
    --r:14px; --sidebar-w:250px;
}
[data-theme="dark"] {
    --bg:#0F172A; --surface:#1E293B; --surface-2:#0F1B30;
    --text:#F1F5F9; --muted:#94A3B8; --border:#334155; --line:#334155;
    --shadow:0 1px 3px rgba(0,0,0,.4); --shadow-lg:0 12px 34px rgba(0,0,0,.5);
}

* { box-sizing:border-box; }
html, body { margin:0; padding:0; }
body {
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    background:var(--bg); color:var(--text);
    font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased;
}
a { color:inherit; }
h1,h2,h3 { margin:0; }

/* ---------- utilities ---------- */
.sb    { font-weight:600; }
.small { font-size:12px; }
.muted { color:var(--muted); }

/* ============================================================
   App shell: sidebar + main
   ============================================================ */
.app { display:flex; min-height:100vh; }

.sidebar {
    width:var(--sidebar-w); flex-shrink:0;
    background:var(--surface); border-right:1px solid var(--border);
    display:flex; flex-direction:column;
    height:100vh; position:sticky; top:0; overflow-y:auto;
}
.brand { display:flex; align-items:center; gap:10px; padding:18px 18px 14px; }
.brand .logo {
    width:36px; height:36px; border-radius:10px;
    background:var(--emerald); color:#fff;
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.brand .logo svg { width:20px; height:20px; }
.brand .sb { font-size:15px; }

.nav { display:flex; flex-direction:column; gap:2px; padding:6px 10px; flex:1; }
.nav a { text-decoration:none; }
.nav button {
    width:100%; display:flex; align-items:center; gap:11px;
    padding:10px 12px; border:0; border-radius:10px; cursor:pointer;
    background:transparent; color:var(--muted); font-size:13.5px; font-weight:500;
    text-align:left; font-family:inherit;
}
.nav button svg { width:18px; height:18px; flex-shrink:0; }
.nav button:hover { background:var(--surface-2); color:var(--text); }
.nav button.active { background:var(--emerald); color:#fff; }
.nav a.active button, .nav button.active:hover { background:var(--emerald); color:#fff; }

.side-foot { padding:12px; border-top:1px solid var(--border); }
.side-user { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.side-user .avatar {
    width:34px; height:34px; border-radius:9px; flex-shrink:0;
    background:var(--blue); color:#fff; font-weight:600; font-size:12px;
    display:flex; align-items:center; justify-content:center;
}
.signout {
    width:100%; display:flex; align-items:center; gap:8px; justify-content:center;
    padding:9px; border:1px solid var(--border); border-radius:9px;
    background:transparent; color:var(--muted); cursor:pointer; font-size:12.5px; font-family:inherit;
}
.signout svg { width:15px; height:15px; }
.signout:hover { background:var(--surface-2); color:var(--text); }

.scrim { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:40; }

/* ---------- main column ---------- */
.main { flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar {
    position:sticky; top:0; z-index:20;
    display:flex; align-items:center; gap:12px;
    padding:0 24px; height:60px;
    background:var(--surface); border-bottom:1px solid var(--border);
}
.topbar h2 { font-size:16px; font-weight:600; }
.menu-btn { display:none; background:transparent; border:0; color:var(--text); cursor:pointer; padding:6px; }
.menu-btn svg { width:22px; height:22px; }
.icon-btn {
    position:relative; background:transparent; border:1px solid var(--border);
    border-radius:9px; width:38px; height:38px; cursor:pointer; color:var(--muted);
    display:inline-flex; align-items:center; justify-content:center;
}
.icon-btn:hover { background:var(--surface-2); color:var(--text); }
.icon-btn svg { width:18px; height:18px; }

.content { flex:1; padding:24px; }
.wrap { max-width:1140px; margin:0 auto; }

/* ---------- notifications ---------- */
.notif-wrap { position:relative; }
.notif-badge {
    position:absolute; top:-4px; right:-4px; min-width:16px; height:16px; padding:0 4px;
    background:var(--rose); color:#fff; border-radius:10px; font-size:10px; font-weight:600;
    display:flex; align-items:center; justify-content:center;
}
.notif-panel {
    position:absolute; right:0; top:46px; width:320px; max-width:86vw;
    background:var(--surface); border:1px solid var(--border); border-radius:12px;
    box-shadow:var(--shadow-lg); overflow:hidden; display:none; z-index:30;
}
.notif-panel.open { display:block; }
.notif-head { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--border); font-weight:600; font-size:13px; }
.notif-list { max-height:360px; overflow-y:auto; }
.notif-item { display:flex; gap:10px; padding:11px 14px; border-bottom:1px solid var(--border); }
.notif-item:last-child { border-bottom:0; }
.notif-item.unread { background:var(--surface-2); }
.notif-ic { width:30px; height:30px; border-radius:8px; background:var(--surface-2); color:var(--muted); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.notif-ic svg { width:15px; height:15px; }
.notif-item .nt { font-size:13px; font-weight:600; }
.notif-item .nb { font-size:12px; color:var(--muted); }
.notif-item .ntime { font-size:11px; color:var(--muted); margin-top:2px; }

/* ============================================================
   Cards, sections, KPIs, grids
   ============================================================ */
.card {
    background:var(--surface); border:1px solid var(--border);
    border-radius:var(--r); padding:18px; box-shadow:var(--shadow);
}
.grid { display:grid; gap:16px; }
.grid.g2 { grid-template-columns:repeat(2,1fr); }
.grid.g3 { grid-template-columns:repeat(3,1fr); }
.grid.g4 { grid-template-columns:repeat(4,1fr); }

.kpi .kpi-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.kpi .lbl { color:var(--muted); font-size:12.5px; }
.kpi .kpi-head svg { width:18px; height:18px; color:var(--muted); }
.kpi .val { font-size:24px; font-weight:700; }

.sect { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.sect-l { display:flex; align-items:center; gap:10px; }
.sect-ic { width:34px; height:34px; border-radius:9px; background:var(--emerald); color:#fff; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.sect-ic svg { width:18px; height:18px; }

/* ============================================================
   Tables
   ============================================================ */
.tbl-wrap { overflow-x:auto; margin:0 -6px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
thead th {
    text-align:left; padding:9px 10px; font-size:11.5px; font-weight:600;
    color:var(--muted); text-transform:uppercase; letter-spacing:.03em;
    border-bottom:1px solid var(--border); white-space:nowrap;
}
tbody td { padding:11px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover { background:var(--surface-2); }
.srt { color:var(--muted); text-decoration:none; }
.srt:hover { color:var(--text); }
.empty { text-align:center; color:var(--muted); padding:26px 10px !important; }
.tbl-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:14px; margin-top:4px; }

/* ============================================================
   Badges & chips
   ============================================================ */
.badge {
    display:inline-block; padding:3px 9px; border-radius:20px;
    font-size:11px; font-weight:600; line-height:1.6; white-space:nowrap;
}
.badge.green  { background:rgba(16,185,129,.14);  color:var(--emerald-d); }
.badge.blue   { background:rgba(37,99,235,.14);   color:var(--blue-d); }
.badge.amber  { background:rgba(245,158,11,.16);  color:#B45309; }
.badge.rose   { background:rgba(244,63,94,.14);   color:#BE123C; }
.badge.violet { background:rgba(139,92,246,.16);  color:#6D28D9; }
.badge.slate  { background:var(--surface-2);      color:var(--muted); }
[data-theme="dark"] .badge.amber { color:#FCD34D; }
[data-theme="dark"] .badge.rose  { color:#FDA4AF; }

.chip { display:inline-block; padding:3px 9px; border-radius:8px; background:var(--surface-2); color:var(--muted); font-size:11px; font-weight:500; }

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary, .btn-out, .btn-ghost, .btn-danger {
    display:inline-flex; align-items:center; justify-content:center; gap:7px;
    padding:9px 15px; border-radius:10px; font-size:13px; font-weight:600;
    cursor:pointer; font-family:inherit; text-decoration:none; border:1px solid transparent;
    white-space:nowrap; line-height:1;
}
.btn-primary svg, .btn-out svg, .btn-ghost svg, .btn-danger svg { width:15px; height:15px; }
.btn-primary { background:var(--emerald); color:#fff; }
.btn-primary:hover { background:var(--emerald-d); }
.btn-out { background:transparent; border-color:var(--border); color:var(--text); }
.btn-out:hover { background:var(--surface-2); }
.btn-ghost { background:transparent; color:var(--muted); }
.btn-ghost:hover { background:var(--surface-2); color:var(--text); }
.btn-danger { background:transparent; border-color:rgba(244,63,94,.4); color:var(--rose); }
.btn-danger:hover { background:rgba(244,63,94,.1); }
.btn-sm { padding:6px 11px; font-size:12px; border-radius:8px; }
.btn-sm svg { width:13px; height:13px; }

/* ============================================================
   Forms
   ============================================================ */
.fld { display:flex; flex-direction:column; gap:6px; margin-bottom:4px; }
.lbl { font-size:12.5px; font-weight:600; color:var(--muted); }
.inp {
    width:100%; padding:9px 12px; border:1px solid var(--border); border-radius:10px;
    background:var(--surface); color:var(--text); font-size:13.5px; font-family:inherit;
}
.inp:focus { outline:none; border-color:var(--emerald); box-shadow:0 0 0 3px rgba(16,185,129,.14); }
select.inp { appearance:none; 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='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:32px; }
input[type=checkbox] { width:16px; height:16px; accent-color:var(--emerald); }

.search { display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.search svg { width:16px; height:16px; flex-shrink:0; }
.search input { flex:1; border:0; outline:none; background:transparent; color:var(--text); padding:9px 0; font-size:13.5px; font-family:inherit; }

/* ============================================================
   Lifecycle stepper (pickups)
   ============================================================ */
.stepper { display:flex; align-items:center; }
.step { display:flex; flex-direction:column; align-items:center; gap:6px; flex-shrink:0; }
.step .num {
    width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center;
    font-size:12px; font-weight:600; background:var(--surface-2); color:var(--muted); border:1px solid var(--border);
}
.step small { font-size:11px; color:var(--muted); white-space:nowrap; }
.step.cur .num { background:var(--blue); color:#fff; border-color:var(--blue); }
.step.cur small { color:var(--text); font-weight:600; }
.step.done .num { background:var(--emerald); color:#fff; border-color:var(--emerald); }
.step-line { flex:1; height:2px; background:var(--border); margin:0 8px; margin-bottom:22px; min-width:20px; }
.step-line.done { background:var(--emerald); }

/* ============================================================
   Login screen (standalone, centered)
   ============================================================ */
.login-wrap {
    min-height:100vh; width:100%;
    display:flex; align-items:center; justify-content:center; padding:24px;
    background:radial-gradient(1200px 600px at 50% -10%, rgba(16,185,129,.12), transparent), var(--bg);
}
.login-card {
    width:100%; max-width:400px;
    background:var(--surface); border:1px solid var(--border); border-radius:18px;
    padding:30px 28px; box-shadow:var(--shadow-lg);
}
.login-head { text-align:center; margin-bottom:20px; }
.login-logo {
    width:52px; height:52px; border-radius:14px; margin:0 auto 12px;
    background:var(--emerald); color:#fff; display:flex; align-items:center; justify-content:center;
}
.login-logo svg { width:28px; height:28px; }
.login-sub { margin-top:4px; }

.lf-field { margin-bottom:14px; display:flex; flex-direction:column; gap:6px; }
.lf-label { font-size:12.5px; font-weight:600; color:var(--muted); }
.lf-input {
    width:100%; padding:11px 13px; border:1px solid var(--border); border-radius:11px;
    background:var(--surface-2); color:var(--text); font-size:14px; font-family:inherit;
}
.lf-input:focus { outline:none; border-color:var(--emerald); box-shadow:0 0 0 3px rgba(16,185,129,.16); }
.lf-btn {
    width:100%; margin-top:4px; padding:12px; border:0; border-radius:11px; cursor:pointer;
    background:var(--emerald); color:#fff; font-size:14px; font-weight:600; font-family:inherit;
}
.lf-btn:hover { background:var(--emerald-d); }
.lf-err {
    background:rgba(244,63,94,.14); color:#FDA4AF; border:1px solid rgba(244,63,94,.3);
    padding:9px 12px; border-radius:10px; font-size:12.5px; margin-bottom:14px;
}

.login-foot { margin-top:6px; }
.role-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.role-card {
    width:100%; display:flex; flex-direction:column; align-items:center; gap:7px;
    padding:14px 8px; border:1px solid var(--border); border-radius:12px;
    background:var(--surface-2); color:var(--text); cursor:pointer; font-family:inherit;
}
.role-card:hover { border-color:var(--emerald); }
.role-ic { width:34px; height:34px; border-radius:9px; background:var(--surface); color:var(--emerald); display:flex; align-items:center; justify-content:center; }
.role-ic svg { width:18px; height:18px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:900px) {
    .sidebar {
        position:fixed; left:0; top:0; z-index:50; height:100vh;
        transform:translateX(-100%); transition:transform .22s ease;
        box-shadow:var(--shadow-lg);
    }
    .sidebar.open { transform:none; }
    .menu-btn { display:inline-flex; }
    .content { padding:16px; }
    .topbar { padding:0 16px; }
    .grid.g4 { grid-template-columns:repeat(2,1fr); }
    .grid.g3 { grid-template-columns:1fr; }
    .grid.g2 { grid-template-columns:1fr; }
}
@media (max-width:520px) {
    .grid.g4 { grid-template-columns:1fr; }
}
