:root {
    --bg-1: #f5ecd9;
    --bg-2: #d6eadf;
    --panel: rgba(255, 250, 241, 0.92);
    --panel-strong: #fffaf1;
    --ink: #182432;
    --muted: #546170;
    --line: rgba(24, 36, 50, 0.14);
    --accent: #0a7a48;
    --accent-deep: #095d39;
    --accent-soft: #def4e7;
    --danger: #a72f2f;
    --danger-soft: #fdeaea;
    --shadow: 0 22px 60px rgba(24, 36, 50, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 40%),
        radial-gradient(circle at bottom right, rgba(10, 122, 72, 0.16), transparent 30%),
        linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 56px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 24px;
}

.hero-panel,
.control-panel,
.results-panel,
.entry-panel,
.verify-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-panel {
    padding: 36px;
    min-height: 280px;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.company-logo {
    width: min(360px, 100%);
    height: auto;
    display: block;
    margin-bottom: 20px;
}

.hero-panel h1,
.control-panel h2,
.results-panel h2 {
    margin: 0;
    font-family: "Sora", "Segoe UI", sans-serif;
    letter-spacing: -0.03em;
}

.hero-panel h1 {
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    max-width: 12ch;
    line-height: 0.95;
}

.hero-copy {
    max-width: 56ch;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-deep);
}

.hero-notes,
.status-strip,
.action-row,
.panel-heading,
.panel-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-notes {
    margin-top: 28px;
    flex-wrap: wrap;
}

.employee-page .page-shell {
    width: min(920px, calc(100% - 32px));
    grid-template-columns: 1fr;
    gap: 20px;
}

.employee-page .hero-panel {
    min-height: auto;
    padding: 40px;
    gap: 20px;
    background:
        linear-gradient(135deg, rgba(255, 250, 241, 0.96), rgba(222, 244, 231, 0.88)),
        var(--panel);
}

.employee-page .hero-panel h1 {
    max-width: 10ch;
    font-size: clamp(2.5rem, 6vw, 4.2rem);
}

.employee-page .hero-copy {
    max-width: 34ch;
    margin: 0;
    font-size: 1.08rem;
}

.step-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.step-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(24, 36, 50, 0.08);
    font-weight: 700;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #f8fff9;
    font-size: 0.95rem;
    flex: 0 0 32px;
}

.hero-notes div,
.status-strip div {
    min-width: 170px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(24, 36, 50, 0.08);
}

.note-label,
.status-label,
.field-hint,
.empty-state span,
.assignment-meta {
    display: block;
    color: var(--muted);
}

.control-panel,
.results-panel,
.entry-panel,
.verify-panel {
    padding: 28px;
}

.panel-heading {
    margin-bottom: 18px;
}

.panel-subcopy {
    margin: 8px 0 0;
    color: var(--muted);
}

.panel-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.input-label {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 700;
}

textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid rgba(24, 36, 50, 0.16);
    border-radius: 22px;
    padding: 18px 20px;
    background: var(--panel-strong);
    color: var(--ink);
    font: inherit;
    line-height: 1.5;
    min-height: 240px;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

input {
    width: 100%;
    border: 1px solid rgba(24, 36, 50, 0.16);
    border-radius: 18px;
    padding: 14px 16px;
    background: var(--panel-strong);
    color: var(--ink);
    font: inherit;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

textarea:focus {
    outline: none;
    border-color: rgba(10, 122, 72, 0.4);
    box-shadow: 0 0 0 4px rgba(10, 122, 72, 0.12);
    transform: translateY(-1px);
}

input:focus {
    outline: none;
    border-color: rgba(10, 122, 72, 0.4);
    box-shadow: 0 0 0 4px rgba(10, 122, 72, 0.12);
    transform: translateY(-1px);
}

.field-hint {
    margin: 10px 0 18px;
    font-size: 0.92rem;
}

.status-strip {
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.message {
    margin: 0 0 18px;
    padding: 13px 15px;
    border-radius: 16px;
}

.error-message {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(167, 47, 47, 0.16);
}

.info-message {
    background: var(--accent-soft);
    color: var(--accent-deep);
    border: 1px solid rgba(10, 122, 72, 0.14);
}

button {
    border: 0;
    border-radius: 999px;
    padding: 14px 20px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.primary-button {
    background: var(--accent);
    color: #f8fff9;
    box-shadow: 0 14px 30px rgba(10, 122, 72, 0.2);
}

.ghost-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 14px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--ink);
    border: 1px solid rgba(24, 36, 50, 0.1);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, background 160ms ease;
}

.ghost-link-button:hover {
    transform: translateY(-1px);
}

.secondary-button,
.ghost-button {
    background: rgba(255, 255, 255, 0.65);
    color: var(--ink);
    border: 1px solid rgba(24, 36, 50, 0.1);
}

.action-row {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.results-panel {
    display: flex;
    flex-direction: column;
}

.entry-panel {
    grid-column: 1 / -1;
    display: grid;
    gap: 18px;
}

.employee-page .entry-panel {
    gap: 20px;
    padding: 32px;
    background: rgba(255, 250, 241, 0.94);
}

.employee-page .entry-panel h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -0.03em;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.entry-grid-wide {
    grid-column: 1 / -1;
}

.input-stack {
    display: grid;
    gap: 8px;
}

.account-summary,
.assignment-card {
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(24, 36, 50, 0.1);
    background: rgba(255, 255, 255, 0.55);
    display: grid;
    gap: 8px;
}

.employee-page .account-summary,
.employee-page .assignment-card,
.employee-page .empty-state {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(222, 244, 231, 0.56));
    border-color: rgba(10, 122, 72, 0.14);
}

.employee-page .account-summary {
    gap: 6px;
}

.employee-page .action-row {
    gap: 12px;
}

.employee-page button {
    min-height: 52px;
}

.verification-link {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: none;
}

.verification-link:hover {
    text-decoration: underline;
}

.verify-shell {
    grid-template-columns: 1fr;
    max-width: 760px;
}

.empty-state {
    border: 1px dashed rgba(24, 36, 50, 0.18);
    border-radius: 22px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.45);
}

.empty-state p {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
}

.results-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.export-hint {
    margin-top: 16px;
}

.results-list li {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(222, 244, 231, 0.82));
    border: 1px solid rgba(10, 122, 72, 0.12);
}

.assignment-name {
    font-size: 1.15rem;
    font-weight: 800;
}

.assignment-team {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    color: var(--accent-deep);
}

@media (max-width: 900px) {
    .page-shell {
        grid-template-columns: 1fr;
        padding-top: 24px;
    }

    .hero-panel,
    .control-panel,
    .results-panel,
    .entry-panel,
    .verify-panel {
        padding: 24px;
    }

    .hero-panel h1 {
        max-width: 14ch;
    }

    .employee-page .hero-panel,
    .employee-page .entry-panel {
        padding: 28px;
    }
}

@media (max-width: 520px) {
    .page-shell {
        width: min(100% - 20px, 100%);
    }

    .hero-notes,
    .status-strip,
    .panel-heading,
    .action-row,
    .panel-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .entry-grid {
        grid-template-columns: 1fr;
    }

    .entry-grid-wide {
        grid-column: auto;
    }

    button {
        width: 100%;
    }
}

.admin-link-row {
    margin-top: 16px;
}

.employee-page .admin-link-row {
    margin: 0;
}

body.employee-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

body.admin-page {
    display: block;
    padding: 28px 24px 40px;
}

.admin-page-shell {
    width: min(1680px, calc(100vw - 48px));
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.admin-page-shell [hidden] {
    display: none !important;
}

.employee-flow {
    width: min(460px, 100%);
    display: grid;
    gap: 16px;
}

.employee-flow [hidden] {
    display: none !important;
}

.employee-card {
    border: 1px solid rgba(24, 36, 50, 0.1);
    border-radius: 30px;
    background: rgba(255, 250, 241, 0.94);
    box-shadow: 0 24px 60px rgba(24, 36, 50, 0.14);
    backdrop-filter: blur(12px);
}

.auth-card,
.draw-card {
    padding: 26px;
}

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 14px;
}

.employee-logo {
    width: min(230px, 100%);
    margin: 0 auto 4px;
}

.employee-copy {
    margin: 0;
    text-align: center;
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--ink);
}

.employee-availability-strip {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.employee-availability-strip div {
    min-width: 132px;
    text-align: center;
}

.employee-form-shell h1,
.draw-card h1 {
    margin: 0;
    font-family: "Sora", "Segoe UI", sans-serif;
    letter-spacing: -0.04em;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
}

.simple-steps {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.simple-step {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    font-weight: 600;
    font-size: 0.96rem;
    color: var(--ink);
    text-align: left;
}

.employee-page .simple-step .step-number {
    width: auto;
    height: auto;
    border-radius: 0;
    display: inline;
    place-items: unset;
    background: transparent;
    color: var(--ink);
    font-size: 0.96rem;
    font-weight: 800;
    flex: none;
}

.employee-page .simple-step .step-number::after {
    content: ".";
    margin-right: 6px;
}

.employee-form-shell {
    display: grid;
    gap: 14px;
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
    justify-items: stretch;
}

.employee-form {
    display: grid;
    gap: 12px;
}

.auth-grid {
    grid-template-columns: 1fr;
    gap: 14px;
}

.employee-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.admin-portal-link,
.admin-auth-actions .ghost-link-button {
    grid-column: 1 / -1;
}

.employee-actions button[hidden] {
    display: none;
}

.employee-actions .secondary-button {
    grid-column: 1 / -1;
}

.verification-note,
.team-copy,
.team-detail {
    margin: 0;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
}

.team-detail {
    font-size: 1.08rem;
    font-weight: 700;
}

.team-stat-row {
    display: flex;
    justify-content: center;
}

.team-stat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(10, 122, 72, 0.1);
    color: var(--accent-deep);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.team-fact-card {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(24, 36, 50, 0.08);
}

.team-fact-label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent-deep);
}

.draw-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.draw-logo {
    width: 128px;
    margin: 0;
}

.draw-card {
    text-align: center;
    gap: 18px;
}

.draw-card h1 {
    font-size: clamp(2.1rem, 5vw, 3rem);
    font-weight: 700;
}

.input-label {
    font-size: 0.92rem;
}

.employee-page input {
    min-height: 54px;
    border-radius: 16px;
}

.employee-page button {
    min-height: 50px;
    font-size: 0.98rem;
}

.draw-card .eyebrow {
    margin-bottom: 6px;
}

.team-stage {
    display: grid;
}

.draw-button {
    min-height: 84px;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}

.team-result {
    display: grid;
    gap: 14px;
    padding: 32px 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(222, 244, 231, 0.72));
    border: 1px solid rgba(10, 122, 72, 0.16);
}

.result-label,
.team-label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-deep);
}

.result-team,
.team-name {
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: clamp(3.2rem, 10vw, 5.2rem);
    line-height: 0.9;
    font-weight: 700;
    color: var(--accent-deep);
}

.team-copy {
    font-size: 0.98rem;
}

.admin-auth-card {
    max-width: 460px;
    width: min(460px, 100%);
    margin: 0 auto;
}

.admin-form-shell {
    max-width: 380px;
}

.admin-dashboard-card {
    padding: 38px 40px 42px;
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: none;
    justify-self: stretch;
}

.admin-dashboard-card h1 {
    margin: 0;
    font-family: "Sora", "Segoe UI", sans-serif;
    letter-spacing: -0.04em;
    font-size: clamp(2rem, 5vw, 3rem);
}

.admin-copy {
    text-align: left;
    color: var(--muted);
    max-width: none;
    font-size: 1.02rem;
}

.admin-summary {
    margin: 0;
    gap: 22px;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: wrap;
}

.admin-summary div {
    min-width: 280px;
    flex: 1 1 320px;
}

.admin-panel-actions {
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-topbar {
    margin-bottom: 0;
}

.admin-topbar .ghost-button {
    min-width: 140px;
}

.admin-table-shell {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(24, 36, 50, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.admin-results-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-assignment-table {
    min-width: 0;
}

.admin-results-table thead {
    background: rgba(10, 122, 72, 0.08);
}

.admin-assignment-table th:nth-child(1),
.admin-assignment-table td:nth-child(1) {
    width: 24%;
}

.admin-assignment-table th:nth-child(2),
.admin-assignment-table td:nth-child(2) {
    width: 30%;
}

.admin-assignment-table th:nth-child(3),
.admin-assignment-table td:nth-child(3) {
    width: 20%;
}

.admin-assignment-table th:nth-child(4),
.admin-assignment-table td:nth-child(4) {
    width: 10%;
}

.admin-assignment-table th:nth-child(5),
.admin-assignment-table td:nth-child(5) {
    width: 16%;
}

.admin-results-table th,
.admin-results-table td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(24, 36, 50, 0.08);
}

.admin-results-table th {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-deep);
}

.admin-results-table tbody tr:hover {
    background: rgba(255, 250, 241, 0.72);
}

.admin-results-table tbody tr:last-child td {
    border-bottom: 0;
}

.assignment-cell {
    vertical-align: top;
    color: var(--ink);
    word-break: break-word;
}

.assignment-name-cell {
    font-weight: 700;
}

.assignment-email-cell {
    color: var(--muted);
}

.assignment-team-cell {
    font-family: "Sora", "Segoe UI", sans-serif;
    font-weight: 700;
    color: var(--accent-deep);
}

.admin-assignment-table th,
.admin-assignment-table td {
    padding: 14px 16px;
}

.admin-paid-cell {
    text-align: center;
}

.admin-paid-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-deep);
    cursor: pointer;
}

.admin-row-actions {
    text-align: right;
}

.admin-delete-button {
    min-width: 80px;
}

.danger-button {
    color: #8a1c18;
    border-color: rgba(138, 28, 24, 0.18);
    background: rgba(255, 244, 242, 0.9);
}

.danger-button:hover {
    box-shadow: 0 12px 24px rgba(138, 28, 24, 0.12);
}

.admin-live-panel {
    display: grid;
    gap: 16px;
}

.admin-live-panel h2 {
    margin: 0;
    font-family: "Sora", "Segoe UI", sans-serif;
    letter-spacing: -0.03em;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.admin-live-copy {
    margin-top: -6px;
}

.admin-live-table th:nth-child(1),
.admin-live-table td:nth-child(1) {
    width: 16%;
}

.admin-live-table th:nth-child(2),
.admin-live-table td:nth-child(2) {
    width: 22%;
}

.admin-live-table th:nth-child(3),
.admin-live-table td:nth-child(3) {
    width: 28%;
}

.admin-live-table th:nth-child(4),
.admin-live-table td:nth-child(4) {
    width: 24%;
}

.admin-live-table th:nth-child(5),
.admin-live-table td:nth-child(5) {
    width: 10%;
}

.employee-list-cell {
    display: grid;
    gap: 4px;
}

.employee-list-line {
    font-weight: 700;
    color: var(--ink);
}

.employee-list-meta {
    font-size: 0.9rem;
    color: var(--muted);
}

.live-result-cell {
    color: var(--muted);
    line-height: 1.5;
}

.live-status-cell {
    white-space: nowrap;
}

.live-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(10, 122, 72, 0.12);
    color: var(--accent-deep);
    font-size: 0.86rem;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 520px) {
    body.employee-page {
        padding: 16px 12px;
    }

    body.admin-page {
        padding: 16px 12px 28px;
    }

    .admin-page-shell {
        width: 100%;
        gap: 16px;
    }

    .auth-card,
    .draw-card {
        padding: 22px 18px;
    }

    .admin-dashboard-card {
        padding: 24px 18px 28px;
        gap: 18px;
    }

    .draw-topbar,
    .employee-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .draw-topbar {
        display: grid;
    }

    .admin-summary {
        gap: 14px;
    }

    .admin-summary div {
        min-width: 0;
        flex-basis: 100%;
    }

    .admin-results-table {
        min-width: 680px;
    }

    .admin-results-table th,
    .admin-results-table td {
        padding: 14px 16px;
    }
}