:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --dark: #111827;
    --gold: #d4af37;
    --danger: #b91c1c;
    --success: #166534;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; }

.topbar {
    background: #000;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    color: var(--gold);
    font-weight: 800;
    text-decoration: none;
}

nav { display: flex; gap: 12px; flex-wrap: wrap; }

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(15,23,42,.04);
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: block;
    font-weight: 650;
    margin: 12px 0 6px;
}

input, textarea, select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

textarea { min-height: 110px; }

button, .btn {
    border: 0;
    background: var(--dark);
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

.btn.secondary, button.secondary {
    background: #fff;
    color: var(--dark);
    border: 1px solid var(--dark);
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.alert.success { background: #dcfce7; color: var(--success); border: 1px solid #bbf7d0; }
.alert.error { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; }

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th, .table td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    font-size: 12px;
    font-weight: 700;
}

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

.signature-pad {
    width: 100%;
    height: 180px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.footer {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

@media (max-width: 760px) {
    .grid { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; flex-direction: column; }
}
