/* ════════════════════════════════════════
   SVH Admin — admin.css
   ════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Serif+Display&display=swap');

:root {
    --blue:       #1b2a4a;
    --blue-mid:   #253660;
    --blue-light: #e8ecf4;
    --red:        #7d1f2e;
    --red-hover:  #9c2638;
    --white:      #ffffff;
    --grey-bg:    #f5f6f9;
    --grey-line:  #dde1ea;
    --grey-text:  #6b7280;
    --text:       #1a1f2e;
    --radius:     6px;
    --shadow:     0 2px 8px rgba(27,42,74,.10);
    --shadow-lg:  0 4px 20px rgba(27,42,74,.13);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--grey-bg);
    color: var(--text);
    min-height: 100vh;
}

/* ── Nav ── */
nav {
    background: var(--blue);
    box-shadow: 0 2px 12px rgba(27,42,74,.18);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    height: 56px;
    padding: 0 20px;
}

.nav-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 1.1rem;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding-right: 20px;
    margin-right: 16px;
    border-right: 1px solid rgba(255,255,255,.12);
    white-space: nowrap;
    letter-spacing: .01em;
    flex-shrink: 0;
}
.nav-brand span { color: #c9869a; }

.nav-links {
    display: flex;
    align-items: stretch;
    list-style: none;
    flex: 1;
    overflow-x: auto;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 0 16px;
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    color: rgba(255,255,255,.65);
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav-links a.active { color: var(--white); border-bottom-color: #c9869a; background: rgba(255,255,255,.07); }

.nav-admin {
    display: flex;
    align-items: center;
    margin-left: auto;
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    padding: 0 12px;
    border-left: 1px solid rgba(255,255,255,.12);
    white-space: nowrap;
    transition: color .15s;
    flex-shrink: 0;
}
.nav-admin:hover { color: var(--white); }

/* ── Page wrapper ── */
.page {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 20px 60px;
}

/* ── Page header ── */
.page-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--grey-line);
}
.page-header h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--blue);
    line-height: 1.2;
}
.page-header p { margin-top: 6px; font-size: .9rem; color: var(--grey-text); }

/* ── Card ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 28px;
    margin-bottom: 20px;
}
.card h3 {
    font-size: .95rem;
    font-weight: 600;
    color: var(--blue);
}

/* ── Buttons ── */
button, .btn {
    font-family: 'DM Sans', sans-serif;
    font-size: .875rem;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background .15s;
}

button, .btn-primary {
    background: var(--blue);
    color: var(--white);
}
button:hover, .btn-primary:hover { background: var(--blue-mid); }

.btn-danger {
    background: var(--red);
    color: var(--white);
}
.btn-danger:hover { background: var(--red-hover); }

.btn-secondary {
    background: var(--blue-light);
    color: var(--blue);
}
.btn-secondary:hover { background: #d4dbed; }

/* ── Form elements ── */
label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--blue);
}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="password"],
select {
    font-family: 'DM Sans', sans-serif;
    font-size: .875rem;
    border: 1px solid var(--grey-line);
    border-radius: var(--radius);
    padding: 8px 10px;
    background: var(--white);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px var(--blue-light);
}

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
    background: var(--blue); color: var(--white);
    text-align: left; padding: 10px 12px;
    font-weight: 500; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .04em;
}
tbody tr:nth-child(even) { background: var(--grey-bg); }
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--grey-line); vertical-align: middle; }
tbody tr:hover { background: var(--blue-light); }
table td:last-child { text-align: right; }

/* ── Alerts ── */
.alert {
    padding: 12px 16px; border-radius: var(--radius);
    font-size: .875rem; margin-bottom: 16px; border-left: 4px solid;
}
.alert-success { background: #edf7f2; border-color: #2e7d52; color: #1e5438; }
.alert-danger  { background: #fdf0f2; border-color: var(--red); color: var(--red); }
.alert-info    { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .nav-inner { padding: 0 12px; }
    .nav-brand { font-size: .95rem; padding-right: 12px; margin-right: 8px; }
    .page { padding: 0 12px 40px; margin-top: 20px; }
    .card { padding: 16px; }
    .page-header h1 { font-size: 1.4rem; }
}