* {
    box-sizing: border-box;
}

:root {
    --bg: #07111e;
    --bg2: #0a2030;
    --panel: rgba(10, 18, 35, 0.92);
    --panel2: rgba(15, 28, 50, 0.9);
    --line: rgba(142, 171, 210, 0.2);
    --text: #eef6ff;
    --muted: #9fb0c8;
    --cyan: #36d2e5;
    --green: #39d39f;
    --yellow: #e4c75a;
    --red: #ff6b6b;
    --white: #ffffff;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, "Noto Sans KR", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(30, 125, 150, 0.35), transparent 34%),
        radial-gradient(circle at 90% 15%, rgba(40, 160, 170, 0.25), transparent 28%),
        linear-gradient(135deg, #050914, #0c2030 55%, #0a141c);
}

a {
    color: inherit;
    text-decoration: none;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
}

.brand-panel,
.login-panel,
.scan-panel,
.expected-panel,
.info-panel,
.table-panel,
.action-card,
.metric-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 25, 46, 0.95), rgba(4, 10, 24, 0.95));
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.brand-panel,
.login-panel {
    min-height: 620px;
    padding: 34px;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #101b30;
    color: #fff;
    font-weight: 900;
    font-size: 22px;
}

.brand-title {
    font-weight: 900;
    letter-spacing: 1px;
    font-size: 22px;
}

.brand-sub {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 4px;
}

.brand-kicker,
.access-label {
    margin-top: 52px;
    color: var(--cyan);
    font-size: 12px;
    letter-spacing: 3px;
    font-weight: 800;
}

.hero-card {
    margin-top: 34px;
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 35%, rgba(54, 210, 229, 0.18), transparent 60%), #061426;
}

.hero-hand {
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -2px;
    color: #f4fbff;
    text-shadow: 0 0 24px rgba(54, 210, 229, 0.3);
}

.brand-desc,
.muted {
    color: var(--muted);
    line-height: 1.8;
}

.brand-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}

.btn {
    border: 0;
    border-radius: 18px;
    padding: 14px 20px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn.primary {
    background: linear-gradient(135deg, var(--cyan), var(--green));
    color: #06111c;
}

.btn.secondary {
    background: #17243a;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--line);
}

.btn.wide {
    width: 100%;
    margin-top: 22px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255,255,255,0.03);
}

.feature-card b {
    display: block;
    margin-bottom: 8px;
}

.feature-card span {
    color: var(--muted);
    font-size: 13px;
}

.login-panel h1,
.page h1,
.mobile-page h1 {
    margin: 16px 0 8px;
    font-size: 28px;
}

.form-box {
    margin-top: 22px;
}

label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 800;
    color: #dbe9ff;
    font-size: 13px;
}

input,
select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(4, 9, 20, 0.9);
    color: var(--text);
    border-radius: 14px;
    padding: 15px 16px;
    outline: none;
    font-size: 15px;
}

input:focus,
select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(54, 210, 229, 0.16);
}

.alert {
    margin-top: 16px;
    padding: 13px 14px;
    border-radius: 14px;
    font-weight: 800;
}

.alert.error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.35);
}

.alert.ok {
    background: rgba(57, 211, 159, 0.12);
    border: 1px solid rgba(57, 211, 159, 0.35);
}

.register-box {
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}

.register-box summary {
    cursor: pointer;
    font-weight: 900;
}

.status-row {
    display: flex;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.status-row span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 10px;
    color: #bdefff;
    font-size: 11px;
    font-weight: 900;
}

.topbar {
    min-height: 76px;
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 12, 24, 0.82);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.topbar nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar nav a {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #dbe9ff;
    font-size: 13px;
    font-weight: 800;
}

.page,
.mobile-page {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 80px;
}

.page-head {
    margin-bottom: 20px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.metric-card {
    padding: 22px;
}

.metric-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.metric-card strong {
    font-size: 34px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.action-card {
    padding: 24px;
}

.action-card b {
    display: block;
    font-size: 21px;
    margin-bottom: 10px;
}

.action-card span {
    color: var(--muted);
}

.info-panel,
.table-panel {
    padding: 24px;
    margin-top: 18px;
}

.mobile-page {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 18px;
}

.scan-panel,
.expected-panel {
    padding: 24px;
}

.scan-input {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
}

.scan-help {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.check-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
}

.check-card b {
    display: block;
    margin-bottom: 10px;
}

.check-card span {
    color: var(--muted);
}

.check-card.ok {
    border-color: rgba(57, 211, 159, 0.7);
    background: rgba(57, 211, 159, 0.1);
}

.check-card.fail {
    border-color: rgba(255, 107, 107, 0.7);
    background: rgba(255, 107, 107, 0.1);
}

.result-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    font-weight: 900;
}

.result-box.ok {
    border-color: rgba(57, 211, 159, 0.7);
    color: #a8ffe2;
}

.result-box.fail {
    border-color: rgba(255, 107, 107, 0.7);
    color: #ffbbbb;
}

.expected-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.expected-row span {
    color: var(--muted);
}

.log-list {
    display: grid;
    gap: 8px;
}

.log {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
}

.log.ok {
    border-color: rgba(57, 211, 159, 0.45);
}

.log.fail {
    border-color: rgba(255, 107, 107, 0.45);
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    white-space: nowrap;
}

th {
    color: #bdefff;
    font-size: 13px;
}

td {
    color: #e6f1ff;
    font-size: 13px;
}

@media (max-width: 900px) {
    .login-shell,
    .mobile-page,
    .metric-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }

    .brand-panel,
    .login-panel {
        min-height: auto;
    }

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

@media (max-width: 520px) {
    .login-body {
        padding: 12px;
    }

    .brand-panel,
    .login-panel,
    .scan-panel,
    .expected-panel,
    .info-panel,
    .table-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .check-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .page,
    .mobile-page {
        width: min(100% - 20px, 1180px);
        margin-top: 14px;
    }
}


/* DAYA_WMS CAMERA V2 */
.camera-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0 14px;
}

.camera-box {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #030913;
    display: grid;
    place-items: center;
}

.camera-box.active {
    border-color: rgba(54, 210, 229, 0.55);
    box-shadow: 0 0 0 3px rgba(54, 210, 229, 0.08);
}

.camera-video,
.camera-reader {
    width: 100%;
    min-height: 260px;
    object-fit: cover;
    display: block;
}

.camera-reader {
    display: none;
}

.camera-reader video {
    width: 100% !important;
    max-height: 320px;
    object-fit: cover;
    border-radius: 16px;
}

.camera-reader div {
    color: var(--text);
}

.camera-frame {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 38%;
    height: 84px;
    border: 2px solid rgba(54, 210, 229, 0.9);
    border-radius: 16px;
    pointer-events: none;
    box-shadow:
        0 0 0 999px rgba(0, 0, 0, 0.26),
        0 0 28px rgba(54, 210, 229, 0.22);
}

.camera-frame span {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 50%;
    height: 2px;
    background: rgba(57, 211, 159, 0.95);
    box-shadow: 0 0 16px rgba(57, 211, 159, 0.8);
}

.camera-status {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(3, 9, 19, 0.82);
    border: 1px solid rgba(142, 171, 210, 0.25);
    color: #dbe9ff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.camera-status.ok {
    color: #a8ffe2;
    border-color: rgba(57, 211, 159, 0.5);
}

.camera-status.fail {
    color: #ffbbbb;
    border-color: rgba(255, 107, 107, 0.5);
}

@media (max-width: 520px) {
    .camera-toolbar {
        grid-template-columns: 1fr;
    }

    .camera-box,
    .camera-video,
    .camera-reader {
        min-height: 230px;
    }

    .camera-frame {
        left: 6%;
        right: 6%;
        top: 39%;
        height: 76px;
    }
}


/* DAYA_WMS CAMERA V2.2 AUTOSCAN */
.camera-status {
    min-height: 42px;
    line-height: 1.45;
}

.camera-box.active .camera-frame {
    animation: dayaWmsScanPulse 1.2s infinite ease-in-out;
}

@keyframes dayaWmsScanPulse {
    0% { border-color: rgba(54, 210, 229, 0.45); }
    50% { border-color: rgba(57, 211, 159, 0.95); }
    100% { border-color: rgba(54, 210, 229, 0.45); }
}


/* DAYA_WMS CAMERA V2.4 STEP SCAN */
.camera-toolbar-step {
    grid-template-columns: 1fr 1fr 1fr;
}

.camera-box.paused {
    border-color: rgba(57, 211, 159, 0.72);
    box-shadow: 0 0 0 3px rgba(57, 211, 159, 0.12);
}

.camera-box.paused .camera-frame {
    border-color: rgba(57, 211, 159, 0.95);
    animation: none;
}

@media (max-width: 520px) {
    .camera-toolbar-step {
        grid-template-columns: 1fr;
    }
}

