:root {
    --ht-navy: #303f9f;
    --ht-navy-dark: #283593;
    --ht-ink: #1a237e;
    --ht-text: #1f2937;
    --ht-muted: #6b7280;
    --ht-line: #e5e7eb;
    --ht-input: #f3f4f6;
    --ht-icon: #3d5afe;
    --ht-red: #dc2626;
    --ht-red-bg: #fef2f2;
    --white: #ffffff;
    --page: #eef0f4;
    --radius: 14px;
    --shadow: 0 12px 40px rgba(30, 41, 80, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    min-height: 100%;
    font-family: "Noto Sans KR", system-ui, -apple-system, sans-serif;
    color: var(--ht-text);
    background: var(--page);
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

.login-body {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 24px;
    padding: 1.25rem 1.5rem 2rem;
    box-shadow: var(--shadow);
}

.login-header {
    text-align: center;
    padding: 0.35rem 0 1.25rem;
}

.login-header h1 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.login-hero {
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--ht-ink);
    letter-spacing: -0.03em;
}

.login-sub {
    margin-top: 0.45rem;
    font-size: 0.92rem;
    color: var(--ht-muted);
    font-weight: 500;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius);
    background: #ecfdf5;
    color: #047857;
    font-size: 0.88rem;
    font-weight: 600;
}

.message.error {
    background: var(--ht-red-bg);
    color: var(--ht-red);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.label {
    font-size: 0.86rem;
    font-weight: 700;
}

.input-wrap {
    position: relative;
    display: block;
}

.field-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    width: 1.15rem;
    height: 1.15rem;
    transform: translateY(-50%);
    color: var(--ht-icon);
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    min-height: 52px;
    padding: 0.7rem 1rem 0.7rem 2.7rem;
    border: none;
    border-radius: var(--radius);
    background: var(--ht-input);
    font-size: 0.95rem;
    outline: none;
}

.input-wrap input:focus {
    box-shadow: 0 0 0 2px rgba(48, 63, 159, 0.28);
}

.primary-btn {
    margin-top: 0.35rem;
    width: 100%;
    min-height: 54px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, #3f51b5 0%, var(--ht-navy) 100%);
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
}

.primary-btn:hover { background: var(--ht-navy-dark); }
.primary-btn:active { transform: scale(0.99); }

.login-note {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
}

.admin-shell {
    min-height: 100dvh;
    background: var(--white);
}

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--ht-line);
    flex-wrap: wrap;
}

.brand {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--ht-navy);
    letter-spacing: -0.03em;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
}

.nav-link {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ht-muted);
}

.nav-link:hover,
.nav-link.active {
    background: #e8eaf6;
    color: var(--ht-navy);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.days-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    background: #e8eaf6;
    color: var(--ht-navy);
    font-size: 0.78rem;
    font-weight: 800;
}

.user-name { font-size: 0.9rem; font-weight: 700; }

.logout-link {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ht-muted);
}

.logout-link:hover { color: var(--ht-navy); }

.admin-main {
    width: 100%;
    padding: 2rem 1.5rem 3rem;
}

.admin-main h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.muted { color: var(--ht-muted); font-weight: 500; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.primary-btn.page-btn,
.ghost-btn {
    width: auto;
    min-height: 42px;
    padding: 0.55rem 1.1rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 12px;
    cursor: pointer;
}

.ghost-btn {
    border: 1px solid var(--ht-line);
    background: var(--white);
    color: var(--ht-text);
    font-weight: 700;
}

.ghost-btn:hover { background: var(--ht-input); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    margin: 1.25rem 0 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.2rem;
    border-radius: 16px;
    background: #f5f6fb;
    border: 1px solid #eceef7;
}

.stat-label { font-size: 0.82rem; font-weight: 700; color: var(--ht-muted); }
.stat-value { font-size: 1.7rem; font-weight: 900; color: var(--ht-navy); }

.menu-list { display: flex; flex-direction: column; gap: 0.75rem; }

.menu-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--ht-line);
    background: var(--white);
}

.menu-text h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.2rem; }
.menu-text p { font-size: 0.86rem; color: var(--ht-muted); }

.go-btn {
    min-width: 3.2rem;
    text-align: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: var(--ht-navy);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 800;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.filter-bar input[type="search"],
.filter-bar select,
.edit-form input,
.edit-form select {
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    border: none;
    border-radius: 12px;
    background: var(--ht-input);
    font-size: 0.92rem;
    outline: none;
}

.filter-bar input[type="search"] { flex: 1; min-width: 220px; }
.filter-bar select { min-width: 130px; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ht-line);
    border-radius: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.8rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--ht-line);
    white-space: nowrap;
}

.data-table th {
    background: #f8f9fc;
    font-size: 0.78rem;
    color: var(--ht-muted);
}

.data-table tr:last-child td { border-bottom: none; }

.empty-cell {
    text-align: center;
    color: var(--ht-muted);
    padding: 2rem 1rem !important;
}

.row-link { font-weight: 800; color: var(--ht-ink); }
.row-link:hover { color: var(--ht-navy); }

.tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #fff8e1;
    color: #b45309;
    font-size: 0.7rem;
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 800;
}

.status-pill.on {
    background: #e8eaf6;
    color: var(--ht-navy);
}

.actions { display: flex; align-items: center; gap: 0.45rem; }
.inline-form { display: inline; margin: 0; }

.link-btn {
    border: none;
    background: none;
    padding: 0;
    color: var(--ht-navy);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.link-btn.danger { color: var(--ht-red); }

.pager {
    display: flex;
    gap: 0.35rem;
    margin-top: 1rem;
}

.pager-link {
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--ht-input);
    font-size: 0.82rem;
    font-weight: 700;
}

.pager-link.active {
    background: var(--ht-navy);
    color: var(--white);
}

.edit-form {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.edit-form .field input,
.edit-form .field select { width: 100%; }

.check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.form-meta { font-size: 0.8rem; color: var(--ht-muted); }
.form-actions { display: flex; gap: 0.6rem; margin-top: 0.4rem; }
