/* ==========================================
   FILE: kasir/static/kasir/css/pos.css
   ========================================== */

:root {
    --pos-bg: #f4f6f9;
    --pos-dark: #111827;
    --pos-muted: #6b7280;
    --pos-line: #e5e7eb;
    --pos-primary: #0f766e;
    --pos-primary-dark: #115e59;
    --pos-success: #16a34a;
    --pos-warning: #f59e0b;
    --pos-danger: #dc2626;
    --pos-soft-green: #ecfdf5;
    --pos-soft-blue: #eff6ff;
    --pos-soft-yellow: #fffbeb;
}

.content-wrapper {
    background: var(--pos-bg) !important;
}

.pos-shell {
    margin-top: -4px;
}

.pos-hero {
    border-radius: 18px;
    background: linear-gradient(135deg, var(--pos-primary) 0%, var(--pos-primary-dark) 55%, var(--pos-dark) 100%);
    color: #fff;
    padding: 18px 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
}

/* Tambahkan class CSS bentukan Anda yang lain di bawah sini... */

.pos-hero-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    letter-spacing: .2px;
}

.pos-hero-subtitle {
    margin: 2px 0 0;
    opacity: .85;
    font-size: 13px;
}

.pos-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.pos-card {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.pos-card-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--pos-line);
    background: #fff;
}

.pos-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--pos-dark);
    margin: 0;
}

.pos-card-note {
    font-size: 12px;
    color: var(--pos-muted);
    margin-top: 2px;
}

.pos-scan-box {
    padding: 16px;
    border-radius: 16px;
    background: var(--pos-soft-blue);
    border: 1px solid #dbeafe;
    margin-bottom: 16px;
}

.pos-scan-box .input-group-text {
    border: 0;
    background: var(--pos-primary);
    color: #fff;
    font-weight: 800;
    border-radius: 13px 0 0 13px;
}

.pos-scan-box .form-control {
    border: 0;
    min-height: 56px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: none;
}

.pos-scan-box .btn {
    border: 0;
    border-radius: 0 13px 13px 0;
    font-weight: 800;
    padding-left: 18px;
    padding-right: 18px;
}

.pos-table-wrap {
    border: 1px solid var(--pos-line);
    border-radius: 16px;
    overflow: hidden;
    min-height: 430px;
    background: #fff;
}

.pos-table {
    margin-bottom: 0;
}

.pos-table thead th {
    border: 0;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    letter-spacing: .45px;
    text-transform: uppercase;
    padding: 13px 14px;
    white-space: nowrap;
}

.pos-table tbody td {
    vertical-align: middle;
    padding: 14px;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
}

.pos-table tbody tr.pos-row-new {
    animation: posHighlight 1.35s ease-out;
}

@keyframes posHighlight {
    0% {
        background: #dcfce7;
        box-shadow: inset 5px 0 0 var(--pos-success);
    }

    100% {
        background: #fff;
        box-shadow: inset 0 0 0 transparent;
    }
}

.pos-table .form-control-sm {
    min-height: 40px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 15px;
}

.pos-empty-cart {
    padding: 85px 15px !important;
    color: #94a3b8;
    font-weight: 700;
}

.pos-side-card {
    position: sticky;
    top: 72px;
}

.pos-customer-box {
    position: relative;
    padding: 14px;
    border: 1px solid var(--pos-line);
    border-radius: 16px;
    background: #f8fafc;
    margin-bottom: 14px;
}

.pos-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--pos-muted);
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.pos-customer-box .form-control {
    min-height: 48px;
    border-radius: 12px 0 0 12px;
    border: 1px solid #e5e7eb;
    font-weight: 700;
}

.pos-customer-box .btn {
    border-radius: 0 12px 12px 0;
}

#dropdown_pelanggan {
    left: 14px;
    right: 14px;
    width: calc(100% - 28px) !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    z-index: 3000 !important;
}

.pos-total-panel {
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    padding: 18px;
    margin-bottom: 14px;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.8), 0 4px 6px rgba(16, 185, 129, 0.1);
}

.pos-total-caption {
    color: #047857;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .7px;
    text-transform: uppercase;
}

#label_total {
    font-size: clamp(34px, 4vw, 46px);
    color: #065f46 !important;
    font-weight: 900 !important;
    line-height: 1.05;
    margin-top: 6px;
    margin-bottom: 0;
    letter-spacing: -1px;
}

.pos-money-grid {
    display: grid;
    gap: 12px;
}

.pos-money-box {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--pos-line);
    background: #fff;
}

.pos-money-box .form-control {
    min-height: 54px;
    border-radius: 13px;
    font-size: 22px;
    font-weight: 900;
    border: 1px solid #e5e7eb;
}

#uang_kembalian {
    background: #fff7ed;
    color: #b91c1c !important;
}

.pos-action-primary {
    min-height: 64px;
    border: 0;
    border-radius: 16px;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(22, 163, 74, .3);
    transition: all 0.2s ease;
}

.pos-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(22, 163, 74, .4);
}

.pos-action-primary:active {
    transform: translateY(1px);
}

.blink-icon {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.pos-action-secondary .btn {
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    font-weight: 900;
}

.pos-touch-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.pos-touch-btn {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-weight: 900;
    color: #334155;
}

.pos-touch-btn:active {
    transform: scale(.98);
}

.modal-pos .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.modal-pos .modal-header {
    border: 0;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #111827;
}

.pos-success-modal .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    text-align: center;
}

.pos-checkmark {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    margin-bottom: 14px;
    animation: successPop .45s ease-out;
}

/* Memastikan dropdown pelanggan posisinya pas dan melayang di atas elemen lain */
#dropdown_pelanggan {
    z-index: 1050;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

/* Mempercantik input readonly ketika pelanggan dipilih */
input[readonly].bg-success {
    background-color: #28a745 !important;
    color: white !important;
    font-weight: bold;
}

/* Memperbesar ukuran teks label total belanja */
#label_total {
    font-size: 2.5rem;
}

@keyframes successPop {
    0% {
        transform: scale(.65);
        opacity: .2;
    }

    70% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 991.98px) {
    .pos-side-card {
        position: static;
        margin-top: 16px;
    }

    .pos-table-wrap {
        min-height: auto;
        overflow-x: auto;
    }

    .pos-hero {
        border-radius: 14px;
    }

    .pos-hero .d-flex {
        align-items: flex-start !important;
    }
}

@media (max-width: 575.98px) {
    .pos-scan-box .input-group {
        display: block;
    }

    .pos-scan-box .input-group-prepend,
    .pos-scan-box .input-group-append {
        display: block;
        width: 100%;
    }

    .pos-scan-box .input-group-text,
    .pos-scan-box .form-control,
    .pos-scan-box .btn {
        width: 100%;
        border-radius: 12px !important;
        margin-bottom: 8px;
    }

    .pos-touch-panel {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop POS Adjustments */
.pos-desktop-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: #f8f9fa; border-top: 2px solid #dee2e6; box-shadow: 0 -4px 10px rgba(0,0,0,0.1); padding: 15px; }
.pos-desktop-main { padding-bottom: 250px; }
.layout-top-nav .content-wrapper { margin-left: 0 !important; }
.layout-top-nav .main-header { display: none; }
