/* Base stylesheet: reset + theme tokens + common primitives */

/* 1) Reset & base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { font-size: 16px; }
body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #1f2933;
    background-image: url('../images/72hour.jpg');
    background-position: left top;
    background-repeat: repeat;
    background-size: auto;
    background-attachment: fixed;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

/* 2) Theme tokens */
:root {
    --color-bg: #f7f9fb;
    --color-surface: #ffffff;
    --color-border: #e1e7ee;
    --color-text: #1f2933;
    --color-muted: #62707f;
    --color-primary: #2563eb;
    --color-primary-strong: #1d4ed8;
    --color-success: #16a34a;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --radius-sm: 6px;
    --radius-md: 10px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* 3) Layout helpers */
.container {
    width: min(1200px, 94%);
    margin: 0 auto;
}
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 16px 20px;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.center { display: flex; align-items: center; justify-content: center; }
.space-between { display: flex; justify-content: space-between; align-items: center; }

/* 4) Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--color-text); line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
p { color: var(--color-muted); }
small { color: var(--color-muted); }

/* 5) Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    transition: transform 120ms ease, box-shadow 160ms ease, background 120ms ease;
}
.btn:hover { background: var(--color-primary-strong); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn.secondary {
    background: #fff;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn.ghost {
    background: transparent;
    color: var(--color-text);
    border-color: transparent;
}
.btn.danger { background: var(--color-danger); }
.btn.success { background: var(--color-success); }
.btn.warning { background: var(--color-warning); }

/* 6) Forms */
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; color: var(--color-text); }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: #fff;
    transition: border 120ms ease, box-shadow 120ms ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-hint { color: var(--color-muted); font-size: 0.9rem; }
.form-error { color: var(--color-danger); font-size: 0.9rem; }

/* 7) Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--color-border);
    color: var(--color-text);
}
.badge.success { background: rgba(22, 163, 74, 0.12); color: var(--color-success); }
.badge.warning { background: rgba(217, 119, 6, 0.12); color: var(--color-warning); }
.badge.danger { background: rgba(220, 38, 38, 0.12); color: var(--color-danger); }
.badge.info { background: rgba(37, 99, 235, 0.12); color: var(--color-primary); }

/* 8) Tables (for admin data/exports) */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.table th, .table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
.table th { background: #f0f4f8; font-weight: 700; }
.table tr:hover { background: #f9fbfd; }

/* 9) Utilities */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-muted { color: var(--color-muted); }
.text-center { text-align: center; }
.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8eef5;
    color: var(--color-text);
    font-weight: 600;
}
