/* =============================================
   Voucher App - Mobile Optimized Styles
   ============================================= */

/* Touch-friendly inputs */
.form-control-lg,
.input-scan {
    font-size: 1.1rem !important;
    height: 52px !important;
    border-radius: 8px !important;
}

.btn-lg {
    height: 52px;
    font-size: 1.05rem;
    border-radius: 8px !important;
}

/* Scan button */
.btn-scan {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
    border-radius: 8px !important;
    flex-shrink: 0;
}

/* Scan input group */
.scan-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.scan-group .form-control {
    flex: 1;
}

/* Status cards */
.voucher-card {
    border-radius: 12px;
    border: none;
}

.voucher-card.status-available {
    border-left: 5px solid #0d6efd !important;
}

.voucher-card.status-keluar {
    border-left: 5px solid #ffc107 !important;
}

.voucher-card.status-digunakan {
    border-left: 5px solid #198754 !important;
}

/* Status badges */
.badge-available  { background-color: #0d6efd; }
.badge-keluar     { background-color: #ffc107; color: #000 !important; }
.badge-digunakan  { background-color: #198754; }

/* Stats cards */
.stat-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .15s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: .8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

/* Alert voucher result */
.voucher-result {
    border-radius: 12px;
    padding: 1.25rem;
}

/* Nominal display */
.nominal-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #198754;
}

/* Sticky scan bar on mobile */
@media (max-width: 767px) {
    .scan-sticky {
        position: sticky;
        top: 60px;
        z-index: 100;
        background: #fff;
        padding: 12px 0;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 1rem;
    }

    main {
        padding-bottom: 80px !important;
    }
}

/* Table mobile */
@media (max-width: 575px) {
    .table-responsive-card td {
        display: block;
        border: none;
        padding: 4px 8px;
    }

    .table-responsive-card tr {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 8px;
    }

    .table-responsive-card thead {
        display: none;
    }

    .table-responsive-card td::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #6c757d;
    }
}

/* QR reader */
#qr-reader {
    border-radius: 8px;
    overflow: hidden;
}

#qr-reader video {
    border-radius: 8px;
}

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

/* Print */
@media print {
    .navbar, footer, .btn, .no-print { display: none !important; }
    .card { box-shadow: none !important; border: 1px solid #dee2e6 !important; }
}
