:root {
    color-scheme: light;
    --ink: #151614;
    --muted: #4a6265;
    --paper: #f1f7f7;
    --canvas: #f7fbfb;
    --accent: #0f9aa6;
    --accent-2: #0a6f76;
    --accent-3: #0b7d83;
    --shadow: 0 20px 45px rgba(9, 33, 36, 0.12);
    --soft-shadow: 0 12px 30px rgba(9, 33, 36, 0.08);
    --radius: 18px;
    --border: 1px solid rgba(7, 31, 34, 0.12);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

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

body {
    min-height: 100vh;
    font-family: "Trebuchet MS", "Gill Sans", "Century Gothic", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

h1,
h2,
h3 {
    font-family: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
    letter-spacing: 0.3px;
}

h1 {
    font-size: clamp(1.8rem, 2.2vw, 2.6rem);
}

h2 {
    font-size: 1.6rem;
}

h3 {
    font-size: 1.3rem;
}

p {
    line-height: 1.5;
}

.bg-wrap {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(0px);
    opacity: 0.35;
    animation: float 16s ease-in-out infinite;
}

.orb-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle at 30% 30%, #a9eef0, #0f9aa6);
    top: -200px;
    left: -120px;
}

.orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 70% 30%, #8fd7db, #0a6f76);
    bottom: -160px;
    right: -90px;
    animation-delay: 2s;
}

.grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(20, 13, 6, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 13, 6, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.18;
}

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

.app {
    position: relative;
    z-index: 1;
    padding: 32px clamp(16px, 4vw, 56px) 160px;
}

.screen {
    display: grid;
    gap: 32px;
}

.login-screen {
    grid-template-columns: 1fr;
    align-items: center;
    min-height: 80vh;
    justify-items: center;
}

.hidden {
    display: none;
}

.brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}

.logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0a6f76, #0f9aa6);
    box-shadow: var(--soft-shadow);
}

.brand-kicker {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    color: var(--muted);
}

.brand-sub {
    margin-top: 8px;
    color: var(--muted);
}

.card {
    background: var(--paper);
    border: var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.login-card {
    max-width: 420px;
    justify-self: end;
}

.login-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.login-card.centered {
    justify-self: center;
    width: min(420px, 100%);
}

.brand-center {
    justify-items: center;
    text-align: center;
}

.field {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.95rem;
}

.field input,
.field textarea {
    border: var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
}

.field input[type="file"] {
    padding: 10px 12px;
}

.field input[type="file"]::file-selector-button {
    border: none;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(10, 111, 118, 0.12);
    color: var(--accent-2);
    font-weight: 600;
    margin-right: 10px;
    cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #6f8689;
}

.field input[readonly],
.field textarea[readonly] {
    color: #1b2b2d;
    background: #f9fefe;
    border-color: rgba(7, 31, 34, 0.18);
}

.select {
    border: var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
}

.field.inline {
    margin-top: 0;
}

.field.inline input {
    min-width: 140px;
}

.row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.row.stack {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.row.spread {
    justify-content: space-between;
}

.checkbox {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.text-link {
    background: none;
    border: none;
    color: var(--accent-2);
    font-weight: 600;
    cursor: pointer;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.btn.primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--soft-shadow);
}

.btn.success {
    background: var(--accent-2);
    color: #fff;
    box-shadow: var(--soft-shadow);
}

.btn.secondary {
    background: var(--accent-2);
    color: #fff;
}

.btn.ghost {
    background: rgba(21, 22, 20, 0.06);
    color: var(--ink);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.full {
    width: 100%;
}

.icon-btn {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
}

.icon-btn .icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
}

.icon-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.camera-actions {
    justify-content: center;
    gap: 14px;
}

.hint {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.85rem;
}

.location-status {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--muted);
}

.photo-preview {
    width: 72px;
    height: 54px;
    border-radius: 10px;
    border: var(--border);
    object-fit: cover;
    display: none;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(26, 106, 90, 0.12);
    color: var(--accent-2);
    font-size: 0.9rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-2);
    display: inline-block;
}

.bottom-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 20px;
    z-index: 10;
    margin: 0 auto;
    max-width: 520px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    background: rgba(241, 247, 247, 0.9);
    border: var(--border);
    border-radius: 22px;
    padding: 12px;
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(8px);
}

.nav-item {
    border: none;
    background: transparent;
    display: grid;
    gap: 6px;
    justify-items: center;
    padding: 12px 8px;
    border-radius: 16px;
    font-weight: 600;
    font-family: inherit;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-item .icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(15, 154, 166, 0.12);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-2);
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-item.active {
    background: var(--accent-3);
    color: #fff;
}

.nav-item.active .icon {
    background: rgba(255, 255, 255, 0.25);
}

.nav-item.active svg {
    stroke: #fff;
}

.panel {
    margin-top: 24px;
    display: none;
    animation: rise 0.35s ease;
}

.panel.active {
    display: block;
}

.absen-panel {
    --absen-hero-start: #b63b35;
    --absen-hero-end: #7b1b1b;
    --absen-accent: #c4483f;
    --absen-accent-soft: rgba(196, 72, 63, 0.16);
    margin-top: 0;
}

.absen-panel.theme-checked {
    --absen-hero-start: #2a9a52;
    --absen-hero-end: #0f6a3a;
    --absen-accent: #1f7a4a;
    --absen-accent-soft: rgba(31, 122, 74, 0.16);
    margin-top: 15px;
}

.absen-panel.theme-complete {
    --absen-hero-start: #2b4fb3;
    --absen-hero-end: #1c2f7b;
    --absen-accent: #24459b;
    --absen-accent-soft: rgba(36, 69, 155, 0.16);
}

.absen-hero {
    position: relative;
    padding: 36px 20px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(
        155deg,
        var(--absen-hero-start),
        var(--absen-hero-end)
    );
    overflow: hidden;
}

.absen-hero::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.28),
        transparent 70%
    );
    top: -90px;
    right: -70px;
    opacity: 0.6;
}

.absen-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            110deg,
            rgba(255, 255, 255, 0.14) 0%,
            rgba(255, 255, 255, 0) 42%
        ),
        radial-gradient(circle at 20% 70%, rgba(0, 0, 0, 0.12), transparent 60%);
    opacity: 0.8;
}

.absen-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.absen-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.absen-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.absen-clock {
    font-size: clamp(2.6rem, 9vw, 3.8rem);
    letter-spacing: 6px;
    font-weight: 300;
    font-family: "Gill Sans", "Trebuchet MS", sans-serif;
}

.absen-date {
    font-size: 0.95rem;
    text-transform: capitalize;
    opacity: 0.9;
}

.absen-quote {
    margin-top: 10px;
    font-style: italic;
    max-width: 360px;
    opacity: 0.9;
}

.absen-content {
    margin-top: -90px;
    display: grid;
    justify-items: center;
    padding: 0 16px 16px;
}

.absen-card {
    width: min(560px, 100%);
    background: #F1F7F7;
    border-radius: 24px;
    padding: 20px;
    border: var(--border);
    box-shadow: var(--shadow);
}

.absen-card-head {
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
}

.absen-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--muted);
}

.absen-status {
    font-size: 1.4rem;
    font-family: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
}

.absen-sub {
    color: var(--muted);
    font-size: 0.9rem;
}

.absen-form {
    margin-top: 95px;
    display: grid;
}
.text-center {
    text-align: center;
}

.absen-action-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-top: 12px;
}

.absen-panel .btn.primary {
    background: var(--absen-accent);
    box-shadow: 0 16px 28px rgba(18, 23, 33, 0.14);
}

.absen-panel .btn.ghost {
    background: var(--absen-accent-soft);
    color: var(--absen-accent);
}

.absen-panel .btn.primary:disabled {
    background: rgba(15, 15, 15, 0.15);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.summary-row .summary-full {
    grid-column: 1 / -1;
}

.label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 1px;
}

.value {
    font-weight: 700;
    margin-top: 6px;
}

.flow-steps {
    margin-top: 16px;
    display: grid;
    gap: 12px;
    padding-left: 18px;
    color: var(--muted);
}

.alert {
    background: linear-gradient(
        135deg,
        rgba(15, 154, 166, 0.16),
        rgba(10, 111, 118, 0.12)
    );
}

.muted {
    color: var(--muted);
    margin-top: 8px;
}

.timeline {
    margin-top: 18px;
    display: grid;
    gap: 16px;
}

.timeline-item {
    border-left: 3px solid rgba(10, 111, 118, 0.4);
    padding-left: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(10, 111, 118, 0.14);
    color: var(--accent-2);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.warn {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.badge.success {
    background: rgba(15, 154, 166, 0.2);
    color: #0a6f76;
}

.badge.info {
    background: rgba(59, 130, 246, 0.18);
    color: #1d4ed8;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.18);
    color: #b91c1c;
}

.photo-preview {
    width: 100%;
    min-height: 180px;
    aspect-ratio: 4 / 3;
    max-height: 260px;
    border-radius: 12px;
    border: var(--border);
    object-fit: cover;
    background: #f3f7f7;
}

.location-status {
    margin-top: 10px;
    line-height: 1.4;
}

.input-hidden {
    display: none;
}

.empty {
    margin-top: 16px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(21, 22, 20, 0.05);
    color: var(--muted);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(21, 22, 20, 0.08);
    font-size: 0.8rem;
}

.table {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.table-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: var(--border);
    align-items: center;
}

.table-row span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 28px;
}

.table-row.head {
    background: rgba(10, 111, 118, 0.12);
    font-weight: 700;
    border: none;
}

.info-list {
    margin-top: 16px;
    display: grid;
    gap: 14px;
}

.info-item {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: var(--border);
}

.divider {
    border: none;
    border-top: 1px solid rgba(7, 31, 34, 0.12);
    margin: 22px 0;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 20, 22, 0.55);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 10;
}

.modal.hidden {
    display: none;
}

.modal-card {
    background: var(--paper);
    border-radius: 20px;
    padding: 20px;
    width: min(720px, 100%);
    border: var(--border);
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.camera-frame {
    margin: 16px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #0c1618;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
}

.camera-frame video,
.camera-frame canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 640px) {
    .modal-card {
        width: min(92vw, 520px);
        padding: 16px;
    }

    .camera-frame {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 900px) {
    .login-screen {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-card {
        justify-self: start;
        width: 100%;
        max-width: 520px;
    }

    .brand {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .table-row {
        grid-template-columns: 1fr 1fr;
        row-gap: 6px;
    }
}

@media (max-width: 640px) {
    .app {
        padding: 24px 16px 150px;
    }

    .absen-hero {
        padding: 28px 16px;
        border-radius: 22px;
    }

    .absen-card {
        padding: 18px;
        border-radius: 20px;
    }

    .brand {
        gap: 12px;
    }

    .login-card {
        max-width: 100%;
    }

    .row.spread {
        flex-direction: column;
        align-items: stretch;
    }

    .field.inline {
        width: 100%;
    }

    .field.inline input {
        width: 100%;
        min-width: 0;
    }

    .table-row.head {
        display: none;
    }

    .table-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .table-row span {
        justify-content: space-between;
    }

    .table-row span::before {
        content: attr(data-label);
        font-size: 0.8rem;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .row.spread {
        align-items: flex-start;
    }
}
