:root {
    --admin-accent: #bb1e10;
    --tablet-bg: #08111c;
    --tablet-card: rgba(12, 26, 40, 0.72);
    --tablet-card-strong: rgba(15, 31, 48, 0.9);
    --tablet-accent: #f4b400;
    --tablet-accent-strong: #ff6b35;
    --tablet-text-soft: rgba(255, 255, 255, 0.72);
    --tablet-border: rgba(255, 255, 255, 0.12);
    --tablet-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

body {
    min-height: 100vh;
}

.admin-shell {
    background: linear-gradient(180deg, #f8f5f1 0%, #ece8e1 100%);
}

.tablet-shell {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(244, 180, 0, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 107, 53, 0.18), transparent 24%),
        linear-gradient(135deg, #07111c 0%, var(--tablet-bg) 48%, #121d2c 100%);
    color: #fff;
    font-family: 'Manrope', system-ui, sans-serif;
}

.brand-bar {
    background: var(--admin-accent);
}

.tablet-app {
    position: relative;
    z-index: 1;
    width: calc(100vw - 32px);
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

.tablet-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(14px);
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

.tablet-orb-one {
    width: 24rem;
    height: 24rem;
    top: -7rem;
    right: -6rem;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.55) 0%, rgba(255, 107, 53, 0) 70%);
    animation: tabletFloat 10s ease-in-out infinite;
}

.tablet-orb-two {
    width: 28rem;
    height: 28rem;
    left: -10rem;
    bottom: -12rem;
    background: radial-gradient(circle, rgba(244, 180, 0, 0.35) 0%, rgba(244, 180, 0, 0) 70%);
    animation: tabletFloat 14s ease-in-out infinite reverse;
}

.tablet-display,
.tablet-stat-value,
.tablet-tab-title {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.tablet-hero {
    position: relative;
    overflow: hidden;
    box-shadow: var(--tablet-shadow);
}

.tablet-hero::after {
    content: '';
    position: absolute;
    inset: auto -10% -40% auto;
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(244, 180, 0, 0.18) 0%, rgba(244, 180, 0, 0) 72%);
    pointer-events: none;
}

.tablet-hero-copy {
    max-width: none;
}

.tablet-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tablet-pill {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(244, 180, 0, 0.16);
    border: 1px solid rgba(244, 180, 0, 0.3);
}

.tablet-pill-muted {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--tablet-text-soft);
}

.tablet-pill-status {
    background: rgba(255, 107, 53, 0.14);
    border-color: rgba(255, 107, 53, 0.28);
}

.tablet-eyebrow {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(244, 180, 0, 0.94);
}

.tablet-display {
    font-size: 4rem;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.tablet-lead,
.tablet-muted-copy {
    color: var(--tablet-text-soft);
    font-size: 1.1rem;
    max-width: 48rem;
}

.tablet-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
}

.tablet-hero-stats > * {
    flex: 1 1 calc(50% - 1rem);
    min-width: 180px;
}

.tablet-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 6.5rem;
    padding: 1rem 1.15rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tablet-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tablet-text-soft);
}

.tablet-stat-value {
    font-size: 2rem;
    line-height: 1;
}

.tablet-primary-action,
.tablet-secondary-action,
.tablet-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.75rem;
    padding: 0.9rem 1.6rem;
    border-radius: 1.15rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.tablet-primary-action {
    color: #11151a;
    background: linear-gradient(135deg, #f4b400 0%, #ffd86b 100%);
    box-shadow: 0 16px 34px rgba(244, 180, 0, 0.28);
}

.tablet-secondary-action {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tablet-hero-stats form {
    flex: 1 1 calc(25% - 1rem);
    min-width: 180px;
}

.tablet-hero-utilities {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tablet-hero-utilities form {
    margin: 0;
}

.tablet-utility-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--tablet-text-soft);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

button.tablet-utility-link {
    cursor: pointer;
}

.tablet-action-button {
    width: 100%;
    border: 0;
    color: #08111c;
}

.tablet-action-button-start {
    background: linear-gradient(135deg, #f4b400 0%, #ffd86b 100%);
}

.tablet-action-button-stop {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9166 100%);
}

.tablet-primary-action:hover,
.tablet-secondary-action:hover,
.tablet-action-button:hover,
.tablet-tab-button:hover {
    transform: translateY(-2px);
}

.tablet-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.tablet-grid form {
    height: 100%;
    width: 25%;
    padding: 0.5rem;
    animation: tabletReveal 520ms ease both;
    animation-delay: var(--tile-delay, 0ms);
}

.tablet-person-button {
    width: 100%;
    min-height: 192px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.1rem;
    font-size: 1.35rem;
    font-weight: 700;
    border-radius: 1.4rem;
    background: rgba(15, 31, 48, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    text-align: left;
    box-shadow: var(--tablet-shadow);
    position: relative;
    overflow: hidden;
}

.tablet-person-button::after {
    content: '';
    position: absolute;
    inset: auto -15% -18% auto;
    width: 9rem;
    height: 9rem;
    background: radial-gradient(circle, rgba(244, 180, 0, 0.1) 0%, rgba(244, 180, 0, 0) 72%);
    opacity: 0.35;
}

.tablet-person-button.is-checked-in::after {
    opacity: 0.55;
}

.tablet-person-button.is-checked-in {
    border-color: rgba(244, 180, 0, 0.56);
    background:
        linear-gradient(180deg, rgba(244, 180, 0, 0.14), rgba(255, 255, 255, 0.04)),
        rgba(16, 31, 43, 0.95);
    box-shadow: 0 0 0 0.12rem rgba(244, 180, 0, 0.18), var(--tablet-shadow);
}

.tablet-person-button:disabled {
    opacity: 0.55;
    transform: none;
}

.tablet-person-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
}

.tablet-person-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.15;
    min-height: 2.3em;
    width: 100%;
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.tablet-person-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.28rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--tablet-text-soft);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tablet-person-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tablet-person-button.is-checked-in .tablet-person-status-chip {
    background: rgba(244, 180, 0, 0.16);
    border-color: rgba(244, 180, 0, 0.2);
    color: #fff4cf;
}

.tablet-person-state {
    display: block;
    min-height: 1.5em;
    width: 100%;
    color: var(--tablet-text-soft);
    font-size: 0.94rem;
    font-weight: 700;
}

.tablet-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
        var(--tablet-card-strong);
    border: 1px solid var(--tablet-border);
    border-radius: 1.5rem;
    backdrop-filter: blur(16px);
    box-shadow: var(--tablet-shadow);
}

.tablet-note {
    border-left: 4px solid rgba(244, 180, 0, 0.72);
}

.tablet-tab-nav {
    display: flex;
    gap: 0.75rem;
}

.tablet-tab-button {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.95rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    border-radius: 1.2rem;
    min-height: 78px;
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tablet-tab-button.active {
    background: linear-gradient(135deg, rgba(244, 180, 0, 0.94), rgba(255, 107, 53, 0.92));
    color: #08111c;
    border-color: transparent;
    box-shadow: 0 16px 32px rgba(244, 180, 0, 0.22);
}

.tablet-tab-title {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.tablet-tab-subtitle {
    font-size: 0.84rem;
    font-weight: 700;
    opacity: 0.75;
}

.tablet-tab-panels {
    overflow: hidden;
}

.tablet-tab-panel {
    display: none;
    animation: tabletReveal 240ms ease both;
}

.tablet-tab-panel.active {
    display: block;
}

.tablet-manage-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.tablet-manage-grid > .tablet-panel {
    width: 50%;
    margin: 0;
}

.tablet-manage-header {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.tablet-status-list {
    display: grid;
    gap: 0.85rem;
}

.tablet-status-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    min-height: 3.3rem;
    padding: 1.05rem 1.15rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tablet-status-item span {
    color: var(--tablet-text-soft);
    font-weight: 700;
}

.tablet-action-row {
    display: grid;
    gap: 1rem;
}

.tablet-feedback {
    position: sticky;
    top: 1rem;
    z-index: 5;
    border: 0;
    border-radius: 1rem;
    padding: 1rem 1.2rem;
    box-shadow: var(--tablet-shadow);
}

.tablet-content-input {
    min-height: 18rem;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 1rem;
    padding: 1.15rem 1.25rem;
}

.tablet-content-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--tablet-accent);
    box-shadow: 0 0 0 0.25rem rgba(244, 180, 0, 0.18);
    color: #fff;
}

@keyframes tabletFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, 18px, 0);
    }
}

@keyframes tabletReveal {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@media (max-width: 991.98px) {
    .tablet-app {
        width: calc(100vw - 28px);
        max-width: 1120px;
    }

    .tablet-display {
        font-size: 3.2rem;
    }

    .tablet-grid form {
        width: 33.3333%;
    }
}

@media (max-width: 900px) {
    .tablet-manage-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .tablet-app {
        width: calc(100vw - 20px);
        max-width: none;
    }

    .tablet-display {
        font-size: 2.4rem;
    }

    .tablet-hero-stats > *,
    .tablet-hero-stats form {
        flex-basis: calc(50% - 1rem);
    }

    .tablet-hero-utilities {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .tablet-manage-grid {
        display: block;
    }

    .tablet-manage-grid > .tablet-panel {
        width: 100%;
        margin-bottom: 1rem;
    }

    .tablet-grid form {
        width: 50%;
    }

    .tablet-tab-button {
        min-height: 74px;
    }
}

@media (max-width: 480px) {
    .tablet-grid form {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .tablet-app {
        width: calc(100vw - 16px);
    }

    .tablet-hero,
    .tablet-panel {
        border-radius: 1rem;
    }

    .tablet-hero-meta {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .tablet-pill {
        min-height: 2.1rem;
        padding: 0.35rem 0.8rem;
        font-size: 0.78rem;
    }

    .tablet-display {
        font-size: 1.95rem;
        line-height: 1.02;
        margin-bottom: 1rem !important;
    }

    .tablet-lead,
    .tablet-muted-copy {
        font-size: 0.98rem;
    }

    .tablet-hero-stats {
        gap: 0.75rem;
    }

    .tablet-hero-stats > *,
    .tablet-hero-stats form {
        flex-basis: 100%;
        min-width: 0;
    }

    .tablet-hero-utilities {
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .tablet-utility-link {
        min-height: 2.25rem;
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }

    .tablet-stat-card,
    .tablet-secondary-action,
    .tablet-action-button {
        min-height: 3.5rem;
    }

    .tablet-tab-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tablet-tab-button {
        min-height: 64px;
        padding: 0.8rem 0.95rem;
        border-radius: 1rem;
    }

    .tablet-tab-title {
        font-size: 1rem;
    }

    .tablet-tab-subtitle {
        font-size: 0.78rem;
    }

    .tablet-grid {
        margin: -0.35rem;
    }

    .tablet-grid form {
        width: 100%;
        padding: 0.35rem;
    }

    .tablet-person-button {
        min-height: 96px;
        padding: 0.8rem 0.9rem;
        border-radius: 1rem;
        gap: 0.45rem;
    }

    .tablet-person-avatar {
        display: none;
    }

    .tablet-person-name {
        min-height: 0;
        font-size: 1.02rem;
        -webkit-line-clamp: 3;
    }

    .tablet-person-meta {
        gap: 0.35rem;
    }

    .tablet-person-status-chip {
        min-height: 1.65rem;
        padding: 0.18rem 0.55rem;
        font-size: 0.72rem;
    }

    .tablet-person-state {
        display: inline-block;
        width: auto;
        min-height: 0;
        font-size: 0.78rem;
    }

    .tablet-person-button {
        justify-content: center;
    }

    .tablet-person-name,
    .tablet-person-meta,
    .tablet-person-state {
        position: relative;
        z-index: 1;
    }

    .tablet-manage-grid {
        display: block;
        margin: 0;
    }

    .tablet-manage-grid > .tablet-panel {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .tablet-status-item {
        min-height: 3.1rem;
        padding: 0.95rem 1rem;
    }

    .tablet-content-input {
        min-height: 12rem;
        font-size: 1rem;
    }
}

@supports (display: grid) {
    .tablet-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        margin: 0;
    }

    .tablet-grid form {
        width: auto;
        padding: 0;
    }

    .tablet-tab-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tablet-manage-grid {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        gap: 1rem;
        margin: 0;
    }

    .tablet-manage-grid > .tablet-panel {
        width: auto;
        margin: 0;
    }

    @media (max-width: 700px) {
        .tablet-manage-grid {
            grid-template-columns: 1fr;
        }

        .tablet-grid {
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        }
    }

    @media (max-width: 560px) {
        .tablet-tab-nav {
            grid-template-columns: 1fr;
        }

        .tablet-grid {
            grid-template-columns: 1fr;
            gap: 0.7rem;
        }
    }
}

.tablet-legacy .tablet-shell,
.tablet-shell.tablet-legacy {
    background: #0b1622;
}

.tablet-legacy .tablet-orb {
    display: none;
}

.tablet-legacy .tablet-panel,
.tablet-legacy .tablet-person-button,
.tablet-legacy .tablet-stat-card,
.tablet-legacy .tablet-tab-button,
.tablet-legacy .tablet-secondary-action,
.tablet-legacy .tablet-primary-action,
.tablet-legacy .tablet-action-button,
.tablet-legacy .tablet-feedback {
    box-shadow: none;
    backdrop-filter: none;
}

.tablet-legacy .tablet-panel {
    background: #132130;
}

.tablet-legacy .tablet-person-button,
.tablet-legacy .tablet-tab-button {
    transition: none;
}

.tablet-legacy .tablet-grid form,
.tablet-legacy .tablet-tab-panel,
.tablet-legacy .tablet-orb {
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .tablet-orb,
    .tablet-tab-panel,
    .tablet-grid form,
    .tablet-primary-action,
    .tablet-secondary-action,
    .tablet-action-button,
    .tablet-tab-button,
    .tablet-person-button {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
