:root {
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-light: #ccfbf1;
    --ink: #0f172a;
    --muted: #64748b;
    --bg: #f1f5f9;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

/* ---- Area pubblica (paziente) ---- */
.hero-paziente {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
    display: flex;
    align-items: center;
    padding: 2rem 0;
}
.card-referto {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(15, 118, 110, 0.25);
    overflow: hidden;
}
.card-referto .card-body { padding: 2.5rem; }
.brand-logo { height: 72px; width: auto; }

/* ---- Login admin ---- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top left, #134e4a, #0f172a);
}
.login-card {
    border: none;
    border-radius: 18px;
    box-shadow: 0 25px 50px rgba(0,0,0,.4);
}

/* ---- Dashboard ---- */
.sidebar {
    background: var(--brand-dark);
    min-height: 100vh;
    color: #d1fae5;
}
.sidebar .nav-link {
    color: #d1fae5;
    border-radius: 10px;
    margin: 3px 8px;
    padding: 10px 14px;
    transition: background-color .2s ease, color .2s ease;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.12); color:#fff; }
.sidebar .nav-link.active { background: #fff; color: var(--brand-dark); font-weight: 600; }
.sidebar .brand { padding: 20px 16px; font-weight: 700; color:#fff; }

.stat-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
    transition: transform .2s ease;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items:center; justify-content:center;
    font-size: 1.5rem;
}

/* ---- Drag & drop ---- */
.dropzone {
    border: 2px dashed #94a3b8;
    border-radius: 16px;
    padding: 3rem 1.5rem;
    text-align: center;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
}
.dropzone.dragover {
    border-color: var(--brand);
    background: var(--brand-light);
}
.dropzone i { font-size: 3rem; color: var(--brand); }

.badge-attivo { background: #dcfce7; color:#166534; }
.badge-scaduto { background: #fee2e2; color:#991b1b; }

.table thead th { color: var(--muted); font-size:.8rem; text-transform: uppercase; letter-spacing:.4px; }

.btn-brand { background: var(--brand); border-color: var(--brand); color:#fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color:#fff; }
