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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    min-height: 100vh;
    letter-spacing: 0.3px;
}

/* === HEADER === */
.cust-header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
    padding: 16px 20px;
}
.header-inner {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.header-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}
.header-text {
    flex: 1;
}
.header-title {
    font-size: 1.3em;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
}
.header-sub {
    font-size: 0.85em;
    color: rgba(255,255,255,0.85);
    margin-top: 2px;
}
.header-instagram {
    color: #fff;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.header-instagram:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* === MAIN === */
.cust-main {
    max-width: 500px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

/* === INFO CARDS === */
.info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.info-box {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #3a3a3a;
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.info-box:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.3);
    border-color: #c41e3a;
}
.info-box-icon {
    color: #c41e3a;
    margin-bottom: 8px;
}
.info-box-label {
    display: block;
    font-size: 0.7em;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}
.info-box-value {
    display: block;
    font-size: 1.8em;
    font-weight: 800;
    color: #c41e3a;
    line-height: 1;
}
.info-box-sub {
    display: block;
    font-size: 0.65em;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    font-weight: 500;
}

/* === FORM CARD === */
.form-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4), 0 0 0 1px #3a3a3a;
    overflow: hidden;
}
.form-card-header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: #fff;
    padding: 18px 24px;
    font-size: 1.05em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-body {
    padding: 24px;
}

/* === FIELD === */
.field-group {
    margin-bottom: 18px;
}
.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 8px;
}
.field-label svg { color: #c41e3a; flex-shrink: 0; }
.field-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1em;
    font-family: inherit;
    color: #2d2d2d;
    background: #f7fafc;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field-input::placeholder { color: #a0aec0; }
.field-input:focus {
    border-color: #c41e3a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196,30,58,0.15);
}
.field-input.field-error {
    border-color: #e53e3e;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(229,62,62,0.12);
}

/* === SUBMIT BUTTON === */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.05em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 4px 15px rgba(196,30,58,0.4);
    margin-top: 4px;
    letter-spacing: 0.3px;
}
.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(196,30,58,0.5);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === FORM NOTE === */
.form-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 24px;
    background: #f7fafc;
    border-top: 1px solid #edf2f7;
    color: #718096;
    font-size: 0.8em;
}
.form-note svg { flex-shrink: 0; color: #a0aec0; }

/* === MODAL === */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-box {
    background: #fff;
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}
.modal-box.modal-exit {
    animation: modalOut 0.25s ease forwards;
}
@keyframes modalIn {
    from { transform: scale(0.85) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes modalOut {
    from { transform: scale(1) translateY(0); opacity: 1; }
    to { transform: scale(0.85) translateY(20px); opacity: 0; }
}

.modal-icon-success {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 25px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(196,30,58,0.4);
}
.modal-logo {
    display: block;
    max-width: 280px;
    height: auto;
    margin: 0 auto 20px;
}
.modal-resto-name {
    font-size: 0.95em;
    font-weight: 700;
    color: #c41e3a;
    text-transform: uppercase;
    letter-spacing: 2px;
    word-spacing: 5px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.modal-title {
    font-size: 1.1em;
    color: #627594;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    word-spacing: 4px;
    line-height: 1.5;
}
.modal-nomor {
    font-size: 4.5em;
    font-weight: 800;
    color: #c41e3a;
    line-height: 1.1;
    margin: 20px 0 20px;
    letter-spacing: 8px;
}
.modal-customer-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    letter-spacing: 0.3px;
    word-spacing: 4px;
    line-height: 1.5;
}
#screenshotArea {
    padding: 40px 35px 35px;
    background: #fff;
    border-radius: 16px;
}
.modal-info {
    margin-bottom: 25px;
}
.modal-info-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f7fafc;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 0.95em;
    color: #4a5568;
    letter-spacing: 0.3px;
    word-spacing: 3px;
}
.modal-info-row svg { color: #c41e3a; }
.modal-hint {
    font-size: 0.95em;
    color: #a0aec0;
    margin-bottom: 0;
    margin-top: 15px;
    line-height: 1.7;
    letter-spacing: 0.3px;
    word-spacing: 4px;
}
.btn-modal-close {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: #fff;
    border: none;
    padding: 14px 48px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 15px rgba(196,30,58,0.35);
}
.btn-modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(196,30,58,0.45);
}
.btn-modal-close:active { transform: translateY(0); }

/* === TOAST === */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 420px;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    animation: toastIn 0.3s ease;
    width: 100%;
}
.toast svg { flex-shrink: 0; }
.toast-error { background: linear-gradient(135deg, #e53e3e, #c53030); }
.toast-success { background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%); }
.toast-warning { background: linear-gradient(135deg, #ed8936, #dd6b20); }
.toast-exit { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-20px); opacity: 0; }
}

/* === STATUS CARD (Locked State) === */
.status-card-customer {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 0 1px #3a3a3a;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}
.status-card-header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: #fff;
    padding: 18px 24px;
    font-size: 1.05em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.status-body {
    padding: 28px 24px;
    text-align: center;
}

/* Nomor besar */
.status-nomor-wrap { margin-bottom: 20px; }
.status-nomor-label {
    display: block;
    font-size: 0.8em;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 4px;
}
.status-nomor {
    font-size: 4em;
    font-weight: 800;
    color: #c41e3a;
    line-height: 1;
    letter-spacing: 3px;
}
.status-nama {
    display: block;
    font-size: 1em;
    color: #4a5568;
    margin-top: 6px;
    font-weight: 600;
}

/* Badge status */
.status-badge-wrap {
    margin-bottom: 20px;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.status-badge-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.status-badge-waiting {
    background: #fefcbf;
    color: #975a16;
}
.status-badge-waiting .status-badge-dot {
    background: #ed8936;
    animation: pulse-dot 1.5s ease infinite;
}
.status-badge-called {
    background: #fed7d7;
    color: #9b2c2c;
    animation: glow-red 1.5s ease infinite;
}
.status-badge-called .status-badge-dot {
    background: #c41e3a;
    animation: pulse-dot 0.8s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}
@keyframes glow-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(72,187,120,0); }
    50% { box-shadow: 0 0 0 8px rgba(72,187,120,0.2); }
}

/* Info grid */
.status-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.status-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7fafc;
    padding: 12px 14px;
    border-radius: 12px;
    text-align: left;
}
.status-info-item svg {
    color: #c41e3a;
    flex-shrink: 0;
}
.status-info-label {
    display: block;
    font-size: 0.7em;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}
.status-info-value {
    display: block;
    font-size: 0.95em;
    color: #2d3748;
    font-weight: 700;
    margin-top: 2px;
}

/* Message */
.status-message {
    background: #ebf4ff;
    color: #2b6cb0;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.4;
}
.status-message-called {
    background: #fed7d7;
    color: #9b2c2c;
    animation: glow-red 1.5s ease infinite;
}
.status-message-next {
    background: #fefcbf;
    color: #975a16;
}

/* Footer */
.status-footer {
    padding: 16px 24px;
    background: #f7fafc;
    border-top: 1px solid #edf2f7;
    text-align: center;
}
.btn-selesai-antrian {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    padding: 10px 24px;
    background: none;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #718096;
    font-size: 0.85em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.btn-selesai-antrian:hover {
    border-color: #a0aec0;
    color: #4a5568;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .cust-main { padding: 16px 12px 32px; }
    .info-row { gap: 8px; }
    .info-box { padding: 12px 8px; border-radius: 12px; }
    .info-box-value { font-size: 1.5em; }
    .info-box-label { font-size: 0.65em; }
    .form-card { border-radius: 16px; }
    .form-card-header { padding: 14px 20px; font-size: 0.95em; }
    .form-body { padding: 20px 16px; }
    .modal-box { padding: 32px 24px; }
    .modal-nomor { font-size: 3.5em; }
    .header-title { font-size: 1.15em; }
    .status-body { padding: 20px 16px; }
    .status-nomor { font-size: 3.2em; }
    .status-info-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .status-info-item { padding: 10px 12px; }
    .status-card-header { padding: 14px 20px; font-size: 0.95em; }
    .status-footer { padding: 14px 16px; }
}

@media (max-width: 360px) {
    .info-box-icon { display: none; }
    .info-box { padding: 10px 6px; }
    .info-box-value { font-size: 1.3em; }
}

/* === CALLING ANIMATION === */
.card-calling {
    animation: pulse-border 1.5s ease infinite;
    box-shadow: 0 0 20px rgba(72, 187, 120, 0.5);
}
@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 10px rgba(72, 187, 120, 0.3); }
    50% { box-shadow: 0 0 30px rgba(72, 187, 120, 0.7), 0 0 60px rgba(72, 187, 120, 0.3); }
}
.status-calling-pulse {
    animation: calling-bg 1s ease infinite;
}
@keyframes calling-bg {
    0%, 100% { background: #c6f6d5; }
    50% { background: #9ae6b4; }
}

/* Toolbar */
.cust-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.btn-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-refresh:hover { background: rgba(255,255,255,0.3); }
.btn-refresh:active { transform: scale(0.95); }
.btn-refresh:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-refresh-spin svg {
    animation: spin 0.8s linear;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Sound indicator */
.sound-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 8px 12px;
    color: rgba(255,255,255,0.6);
    font-size: 0.75em;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}
.sound-indicator:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}
.sound-indicator:active {
    transform: scale(0.95);
}
.sound-indicator.sound-on {
    background: rgba(72, 187, 120, 0.25);
    border-color: rgba(72, 187, 120, 0.4);
    color: #c6f6d5;
}
.sound-indicator.sound-partial {
    background: rgba(236, 201, 75, 0.25);
    border-color: rgba(236, 201, 75, 0.4);
    color: #fefcbf;
}
