:root {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #c8102e;
    --primary-hover: #9f0d24;
    --primary-soft: #fdecee;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
}

a { color: var(--primary); }

/* --- AUTH --- */
.auth-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 420px 1fr;
}

.auth-side {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-side h1 {
    font-size: 1.6rem;
    line-height: 1.3;
    margin: 16px 0 12px;
}

.auth-side p { color: var(--sidebar-text); line-height: 1.6; font-size: 0.95rem; }
.auth-brand {
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.auth-brand img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}
.auth-brand span { color: var(--primary); }
.auth-foot { font-size: 0.8rem; color: #64748b; }

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card { width: 100%; max-width: 440px; }
.auth-card:has(.rp-desk) { max-width: 520px; }
.auth-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.auth-card .lead { color: var(--text-muted); margin-bottom: 24px; font-size: 0.95rem; }

.rp-desk {
    display: grid;
    gap: 14px;
    margin-bottom: 8px;
}
.rp-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    background: var(--bg-card);
}
.rp-card.is-disabled { opacity: 0.45; pointer-events: none; }
.rp-card-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 6px;
}
.rp-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.rp-card-data {
    margin: 14px 0 0;
    display: grid;
    gap: 8px;
}
.rp-card-data div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
}
.rp-card-data dt { color: var(--text-muted); }
.rp-card-data dd { font-weight: 600; margin: 0; text-align: right; }

.rp-username {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    text-align: center;
}

/* --- APP SHELL --- */
.app-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

aside {
    width: 260px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    flex-shrink: 0;
}

.brand {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    text-decoration: none;
}
.brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.brand span { color: var(--primary); }

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item a {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.nav-item.active a,
.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-foot { display: flex; flex-direction: column; gap: 10px; }
.sidebar-foot form { margin: 0; }

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-bar { flex: 1; }
.search-bar input {
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 8px;
    width: min(320px, 100%);
    font-size: 0.9rem;
    outline: none;
}
.search-bar input:focus { border-color: var(--primary); }

.user-panel {
    display: flex;
    align-items: center;
    gap: 16px;
}

.duty-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-main);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
}
.duty-toggle.off .status-dot { background-color: var(--text-muted); }
.duty-toggle.off { color: var(--text-muted); }

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success);
}

.user-info { text-align: right; font-size: 0.85rem; }
.user-info .name { font-weight: 700; color: var(--text-main); }
.user-info .role { color: var(--text-muted); }

.content-wrap > .alert {
    margin: 24px 32px 0;
}

.content {
    padding: 32px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
.content-single { grid-template-columns: 1fr; }
.content-stack { display: flex; flex-direction: column; }

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.card-title { font-size: 1.1rem; font-weight: 700; }
.muted { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
}
.stat .label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.stat .value { font-size: 1.6rem; font-weight: 700; margin-top: 6px; }

.patient-profile {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}
.patient-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #475569;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.patient-details h2 { font-size: 1.3rem; margin-bottom: 4px; }
.patient-details p { font-size: 0.85rem; color: var(--text-muted); }

.tags { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tag-danger { background-color: #fee2e2; color: var(--danger); }
.tag-info { background-color: var(--primary-soft); color: var(--primary); }
.tag-success { background-color: #dcfce7; color: #15803d; }

table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.85rem; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; }
tr:last-child td { border-bottom: none; }
.table-link { color: var(--text-main); font-weight: 600; text-decoration: none; }
.table-link:hover { color: var(--primary); }

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}
.badge-pending { background-color: #fef3c7; color: var(--warning); }
.badge-paid, .badge-done, .badge-confirmed, .badge-apt { background-color: #dcfce7; color: #15803d; }
.badge-cancelled, .badge-inapt { background-color: #fee2e2; color: var(--danger); }
.badge-taken, .badge-info { background-color: var(--primary-soft); color: var(--primary); }
.badge-urgent { background-color: #fee2e2; color: var(--danger); }

.btn {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn:hover { background-color: var(--primary-hover); }
.btn-outline {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-main); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #16a34a; }
.btn-sm { padding: 6px 10px; font-size: 0.78rem; }
.btn-ghost {
    background: transparent;
    color: var(--sidebar-text);
    border: 1px solid rgba(255,255,255,0.08);
    width: 100%;
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.queue-item:last-child { border-bottom: none; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }

.form-group { margin-bottom: 16px; }
.form-group label,
.form-grid label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
input[type="search"],
input[type="tel"],
select,
textarea {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    color: var(--text-main);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters a {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    background: #fff;
}
.filters a.active { background: var(--primary-soft); color: var(--primary); border-color: #f5c2c7; }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    font-weight: 500;
}
.alert-success { background: #dcfce7; color: #15803d; }
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-info { background: var(--primary-soft); color: #9f0d24; }

.empty {
    text-align: center;
    padding: 28px 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.note {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
}
.note:last-child { border-bottom: none; }
.note strong { color: var(--text-main); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.mobile-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 1.3rem;
    cursor: pointer;
}

.home-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.icon {
    display: block;
    flex-shrink: 0;
}

.home-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.home-nav .brand {
    margin-bottom: 0;
    color: #111;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    max-width: 260px;
    line-height: 1.2;
}

.home-nav .brand .brand-text {
    display: flex;
    flex-direction: column;
    color: #111;
    text-transform: uppercase;
}

.home-nav .brand .brand-text span {
    color: var(--primary);
    font-size: 1rem;
    letter-spacing: 0.14em;
}

.home-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.home-links a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.home-links a:hover,
.home-links a.active { color: var(--primary); }
.home-links a.btn,
.home-links a.btn.active { color: #fff; }

.home-pagehead {
    background: #14080a;
    color: #fff;
    padding: 56px 40px;
}

.home-pagehead .home-kicker { margin-bottom: 10px; }
.home-pagehead h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}
.home-pagehead p {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.home-hero {
    position: relative;
    min-height: 42vh;
    display: flex;
    align-items: center;
    color: #fff;
    padding: 56px 40px;
    overflow: hidden;
    background:
        linear-gradient(105deg, rgba(20, 8, 10, 0.88) 0%, rgba(200, 16, 46, 0.42) 55%, rgba(20, 8, 10, 0.75) 100%),
        radial-gradient(circle at 80% 20%, rgba(200, 16, 46, 0.35), transparent 42%),
        #14080a;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/public/assets/Image/pillbul.webp');
    background-size: 380px;
    background-repeat: no-repeat;
    background-position: 108% 55%;
    opacity: 0.18;
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.home-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fecaca;
    margin-bottom: 16px;
}

.home-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.08;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.03em;
}

.home-hero p {
    font-size: 1.08rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 560px;
    margin-bottom: 28px;
}

.home-er {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(200, 16, 46, 0.35);
}

.home-er:hover { background: var(--primary-hover); color: #fff; }

.home-section { padding: 80px 40px; }
.home-section.alt {
    background: linear-gradient(180deg, #fff8f8 0%, #f4f4f5 100%);
    padding: 64px 40px 80px;
}
.home-section h2 {
    font-size: 2rem;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}
.home-lead {
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 36px;
    line-height: 1.6;
}

.home-wrap { max-width: 1180px; margin: 0 auto; }

.home-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.home-plan {
    background: #fff;
    border: 1px solid var(--border);
    padding: 28px 26px 30px;
}

.home-plan.featured {
    border: 2px solid var(--primary);
    background: #fff;
}

.home-plan h3 { margin: 8px 0 14px; font-size: 1.25rem; }
.home-plan ul {
    margin-top: 18px;
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.home-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.home-price small {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.home-tile {
    background: #fff;
    border-top: 3px solid var(--primary);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    padding: 24px;
}

.home-tile h3 { margin-bottom: 8px; }
.home-tile p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

.home-partners {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    align-items: center;
}

.home-partner-card {
    background: #111;
    color: #fff;
    padding: 32px;
    display: flex;
    gap: 18px;
    align-items: center;
}

.home-partner-card img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
}

.home-partner-card p { color: #d1d5db; font-size: 0.92rem; line-height: 1.55; margin-top: 8px; }

.home-wrap.tarif-page {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.tarif-block {
    background: #fff;
    border: 1px solid #f0d4d8;
    overflow: hidden;
    margin: 0;
}

.tarif-cat {
    background: var(--primary);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.tarif-code {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.tarif-cat strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
}

.tarif-cat p {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

.tarif-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.tarif-table th {
    background: #fff5f5;
    color: var(--primary);
    font-weight: 700;
    padding: 10px 18px;
    border: 0;
    text-align: left;
}

.tarif-table td {
    padding: 12px 18px;
    border-bottom: 1px solid #f3e8ea;
    color: #1e293b;
}

.tarif-table tbody tr:last-child td { border-bottom: none; }
.tarif-table tbody tr:nth-child(even) { background: #fffafb; }
.tarif-table td:first-child { font-weight: 700; color: var(--primary); width: 22%; }
.tarif-table td:last-child,
.tarif-table th:last-child { text-align: right; width: 18%; font-weight: 700; }

.tarif-table-plain td:last-child,
.tarif-table-plain th:last-child {
    text-align: left;
    width: auto;
    font-weight: 500;
    color: #1e293b;
}

.tarif-note {
    grid-column: 1 / -1;
    background: #fff;
    border-left: 4px solid var(--primary);
    padding: 18px 22px;
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.55;
}

.tarif-note strong {
    display: block;
    color: var(--primary);
    margin-bottom: 6px;
}

.home-table-card {
    background: #fff;
    border: 1px solid var(--border);
    overflow: hidden;
}

.home-table-card table { margin: 0; }
.home-table-card th { background: #fff5f5; }

.home-footer {
    margin-top: auto;
    background: #111;
    color: #d1d5db;
    padding: 48px 40px 24px;
    font-size: 0.85rem;
}

.home-footer-grid {
    max-width: 1180px;
    margin: 0 auto 28px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.home-footer strong { color: #fff; display: block; margin-bottom: 10px; }
.home-footer a { color: #fecaca; text-decoration: none; }
.home-footer a:hover { text-decoration: underline; }
.home-copy {
    border-top: 1px solid #2a2a2a;
    padding-top: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.78rem;
}

.invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}
.invoice-actions form { margin: 0; }

.invoice-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.invoice-line {
    display: grid;
    grid-template-columns: 1fr 88px 64px 34px;
    gap: 8px;
    align-items: end;
}

.invoice-line-head {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.invoice-line input {
    width: 100%;
}

.invoice-line-remove {
    height: 38px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.invoice-line-remove:hover {
    border-color: var(--danger);
    color: var(--danger);
}

@media (max-width: 1100px) {
    .content { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .auth-body { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    aside {
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        z-index: 30;
        transition: transform 0.2s;
    }
    aside.open { transform: translateX(0); }
    .mobile-toggle { display: inline-block; }
    header { padding: 16px; }
    .content { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .user-info { display: none; }
    .stats { grid-template-columns: 1fr; }
    .home-plans,
    .home-grid,
    .home-partners,
    .home-footer-grid { grid-template-columns: 1fr; }
    .home-nav,
    .home-hero,
    .home-pagehead,
    .home-section { padding-left: 20px; padding-right: 20px; }
    .home-nav { flex-direction: column; align-items: flex-start; }
    .home-links { flex-wrap: wrap; gap: 14px; }
    .home-hero { min-height: auto; padding-top: 40px; padding-bottom: 40px; }
    .home-wrap.tarif-page { grid-template-columns: 1fr; }
    .tarif-table td:first-child,
    .tarif-table td:last-child { width: auto; }
}

.sig-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.72);
}
.sig-modal-card {
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 16px;
    padding: 28px 28px 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.sig-modal-card h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}
.sig-modal-card > p {
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}
.sig-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.sig-tab {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
}
.sig-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.sig-panel canvas {
    display: block;
    width: 100%;
    height: 180px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    cursor: crosshair;
    touch-action: none;
    margin-bottom: 10px;
}
.sig-file {
    display: block;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted);
    background: #f8fafc;
}
.sig-file input {
    display: block;
    margin: 0 auto 8px;
}
.sig-actions {
    margin-top: 16px;
}
.sig-logout {
    margin-top: 12px;
    text-align: center;
}
.sig-logout .btn-ghost {
    color: var(--text-muted);
    width: auto;
}

body.tablet-embed #sidebar {
    width: 200px;
}
body.tablet-embed .mobile-toggle { display: none; }
