:root {
    --bg: #f3efe6;
    --panel: rgba(255, 252, 245, 0.92);
    --ink: #1f2933;
    --muted: #5d6b79;
    --accent: #0f766e;
    --accent-2: #d97706;
    --line: rgba(31, 41, 51, 0.12);
    --danger: #b42318;
    --success: #067647;
    --shadow: 0 24px 60px rgba(31, 41, 51, 0.12);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(217, 119, 6, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.18), transparent 28%),
        linear-gradient(135deg, #f8f4eb, #efe7d8);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: #fffdf8;
}
button {
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #115e59);
    color: white;
    border: 0;
}
button.secondary, .link-btn {
    background: linear-gradient(135deg, var(--accent-2), #b45309);
}
textarea { width: 100%; resize: vertical; }
label { display: grid; gap: 0.45rem; font-size: 0.95rem; }
.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}
.sidebar {
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--line);
    background: rgba(255, 248, 235, 0.78);
    backdrop-filter: blur(8px);
    display: grid;
    align-content: space-between;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    font-size: 0.78rem;
}
.nav {
    display: grid;
    gap: 0.5rem;
    margin: 2rem 0;
}
.nav a {
    padding: 0.9rem 1rem;
    border-radius: 14px;
}
.nav a.is-active,
.nav a:hover {
    background: rgba(15, 118, 110, 0.1);
}
.user-card, .panel, .stat-card, .login-card {
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.65);
    box-shadow: var(--shadow);
}
.user-card {
    padding: 1rem;
    border-radius: 18px;
    display: grid;
    gap: 0.3rem;
}
.user-card span { color: var(--muted); font-size: 0.9rem; }
.content {
    padding: 2rem;
    display: grid;
    gap: 1.5rem;
}
.hero, .panel {
    border-radius: 24px;
    padding: 1.5rem;
}
.hero {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(180, 83, 9, 0.92));
    color: white;
}
.grid {
    display: grid;
    gap: 1rem;
}
.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat-card {
    border-radius: 22px;
    padding: 1.4rem;
    display: grid;
    gap: 0.5rem;
}
.stat-card span { color: var(--muted); }
.stat-card strong { font-size: 2rem; }
.panel-head, .actions, .two-col {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}
.two-col {
    align-items: start;
}
.two-col > * { flex: 1; }
.wide-left > :first-child { flex: 1.2; }
.stack {
    display: grid;
    gap: 1rem;
}
.table-wrap {
    width: 100%;
    overflow: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    text-align: left;
    padding: 0.85rem;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.badge {
    display: inline-flex;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    background: rgba(15, 118, 110, 0.1);
}
.badge-error { background: rgba(180, 35, 24, 0.12); }
.badge-pendiente { background: rgba(217, 119, 6, 0.14); }
.flash {
    padding: 1rem 1.2rem;
    border-radius: 16px;
}
.flash-success { background: rgba(6, 118, 71, 0.12); color: var(--success); }
.flash-error { background: rgba(180, 35, 24, 0.12); color: var(--danger); }
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
}
.login-wrap {
    width: min(540px, calc(100% - 2rem));
}
.login-card {
    padding: 2rem;
    border-radius: 28px;
}
.login-copy {
    color: var(--muted);
    line-height: 1.6;
}
@media (max-width: 960px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { gap: 1rem; }
    .grid-4, .two-col { grid-template-columns: 1fr; display: grid; }
    .content { padding: 1rem; }
}
