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

#login-root {
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: #111827;
}

.login-form {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    padding: 8px 0 0 0;
}

.pin-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 8px 0 0;
    min-width: 0;
}

.keypad-col {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.pin-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 16px;
}

.operator-info {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    margin-top: 1rem;
    text-align: center;
}

.pin-title {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 4px;
}

.operator-name {
    color: #9CA3AF;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.change-btn {
    background: #374151;
    border-radius: 5px;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
}

.pin-dots {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    width: 100%;
}

.pin-dot {
    width: 45px;
    height: 40px;
    margin: 0 4px;
    border: 2px solid #4B5563;
    border-radius: 8px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7em;
    color: #fff;
}

.pin-error {
    color: #DC2626;
    min-height: 24px;
    font-size: 1em;
    margin-bottom: 6px;
    text-align: center;
    width: 100%;
}

.keypad-wrap {
    width: 100%;
    max-width: 220px;
}

.keypad-row {
    display: flex;
    width: 100%;
}

.key-btn {
    flex: 1 1 0;
    margin: 6px;
    height: 60px;
    font-size: 1.6em;
    border-radius: 10px;
    border: none;
    background: #374151;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    min-width: 0;
}
.key-btn:active {
    background: #4B5563;
}
.key-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.key-btn:focus {
    outline: none;
    box-shadow: none;
}
.key-btn.red {
    background: #DC2626;
    font-size: 1em;
}
.key-btn.red:active {
    background: #EF4444;
}
.key-btn.green {
    background: #059669;
    font-size: 1em;
}
.key-btn.green:active {
    background: #10B981;
}

@media (max-width: 400px) {
  #login-root { padding: 0; }
  .key-btn { font-size: 0.95em; height: 26px; }
  .pin-dot { width: 14px; height: 14px; }
}

/* Dashboard page */
.dashboard {
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-content: center;
    align-content: center;
    background: #111827;
    padding: 16px;
    box-sizing: border-box;
}

.dash-btn {
    width: 38vw;
    height: 28vh;
    margin: 8px;
    border: 0;
    border-radius: 12px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    text-align: center;
}
.dash-btn:active {
    -webkit-transform: scale(0.98);
    transform: scale(0.98);
}

.dash-add {
    background: #2563eb;
}
.dash-add:active {
    background: #1d4ed8;
}

.dash-process {
    background: #059669;
}
.dash-process:active {
    background: #047857;
}

.dash-return {
    background: #dc2626;
}
.dash-return:active {
    background: #b91c1c;
}

.dash-revision {
    background: #f59e42;
    color: #222;
}
.dash-revision:active {
    background: #d97706;
}

.dash-logout {
    background: #6b7280;
    width: calc(76vw + 16px);
    height: 12vh;
    font-size: 16px;
    margin: 8px;
}
.dash-logout:active {
    background: #4b5563;
}

/* Scan page */
.scan-root {
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    background: #111827;
    padding: 24px;
    box-sizing: border-box;
}

.scan-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.scan-title {
    color: #fff;
    font-size: 32px;
    margin-bottom: 5px;
}

.scan-input {
    width: 100%;
    height: 60px;
    background: #1f2937;
    border: 2px solid #374151;
    border-radius: 12px;
    color: #fff;
    font-size: 24px;
    text-align: center;
    padding: 0 16px;
    margin-bottom: 16px;
    margin-top: 10px;
}

.scan-error {
    color: #dc2626;
    min-height: 24px;
    font-size: 20px;
    text-align: center;
}
