/**
 * E-Koperasi POS System - Custom Styles
 * Mobile-First Responsive Design
 * Optimized for Smartphones & Tablets (Residents, Relatives, Wardens)
 * Desktop support for Cashiers & Admins
 */

/* ==========================================================================
   MOBILE FIRST BASE STYLES (320px+)
   ========================================================================== */

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                    0 0 15px rgba(255, 215, 0, 0.15),
                    0 0 25px rgba(255, 215, 0, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    50% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                    0 0 20px rgba(255, 215, 0, 0.25),
                    0 0 35px rgba(255, 215, 0, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
}

/* ==========================================================================
   LOGIN PAGE STYLES
   ========================================================================== */

/* Login page body background */
body.login-page,
.login-container {
    background: linear-gradient(135deg, var(--navy-blue, #001f3f) 0%, var(--dark-navy, #001529) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 520px;
    padding: 1.25rem;
    margin: 0 auto;
}

.login-card {
    background: white;
    border-radius: 15px;
    border: 3px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 15px rgba(255, 215, 0, 0.15),
                0 0 25px rgba(255, 215, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    animation: fadeIn 0.5s ease, pulse-glow 3s ease-in-out infinite;
    position: relative;
}

.login-header {
    background: linear-gradient(135deg, var(--navy-blue, #001f3f) 0%, var(--dark-navy, #001529) 100%);
    color: white;
    padding: 2.5rem 1.875rem;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold, #FFD700), var(--light-gold, #FFA500));
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.login-body {
    padding: 2.5rem 1.875rem;
}

.login-body .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.login-body .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 0.9375rem;
    font-size: 0.9375rem;
    transition: all 0.3s;
    min-height: 48px;
}

.login-body .form-control:focus {
    border-color: var(--navy-blue, #001f3f);
    box-shadow: 0 0 0 0.2rem rgba(0, 31, 63, 0.15);
}

.btn-login {
    background: linear-gradient(135deg, var(--navy-blue, #001f3f) 0%, var(--dark-navy, #001529) 100%);
    border: none;
    color: white;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 48px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 31, 63, 0.3);
    background: linear-gradient(135deg, var(--dark-navy, #001529) 0%, var(--navy-blue, #001f3f) 100%);
    color: white;
}

.btn-login:active {
    transform: translateY(0);
}

.login-body .alert {
    border-radius: 8px;
    border: none;
    padding: 0.75rem 0.9375rem;
}

.login-body .alert-danger {
    background: #fee;
    color: #c33;
}

.login-body .alert-success {
    background: #efe;
    color: #3c3;
}

.login-footer {
    text-align: center;
    padding: 1.25rem;
    background: #f8f9fa;
    color: #666;
    font-size: 0.8125rem;
}

.badge-gold {
    background: var(--gold, #FFD700);
    color: var(--navy-blue, #001f3f);
    padding: 0.3125rem 0.75rem;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.625rem;
}

.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

.input-group:focus-within .input-group-text {
    border-color: var(--navy-blue, #001f3f);
}

/* Mobile adjustments for login */
@media (max-width: 576px) {
    body.login-page,
    .login-container {
        min-height: 100vh;
        height: auto;
        padding: 0.75rem;
        padding-top: 1.5rem;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .login-card {
        margin: 0;
        margin-top: 0.5rem;
        width: 100%;
        max-width: 100%;
    }

    .login-header {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .badge-gold {
        font-size: 0.7rem;
        padding: 0.35rem 0.75rem;
        margin-top: 0.75rem;
    }

    .login-body {
        padding: 2rem 1.5rem;
    }

    .login-body .form-control {
        min-height: 48px;
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.875rem;
    }

    .login-footer {
        padding: 1rem;
        font-size: 0.75rem;
    }

    .btn-login {
        min-height: 48px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   ORDER MANAGEMENT STYLES
   ========================================================================== */

/* Order Cards - Mobile First */
.order-card {
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.order-card:active {
    transform: scale(0.98);
}

/* Nav Tabs */
.nav-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link.active {
    color: var(--navy-blue);
    border-bottom: 3px solid var(--gold);
    background: transparent;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(255, 193, 7, 0.15);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.order-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #001f3f;
    margin-bottom: 0.5rem;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Table Responsive for Mobile */
.table-responsive-mobile {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive-mobile table {
    min-width: 600px;
}

/* Mobile Statistics Cards - Compact Grid */
@media (max-width: 768px) {
    .stats-row .col-md-3 {
        margin-bottom: 0.75rem;
    }

    .stats-row .card {
        margin-bottom: 0;
    }

    .stats-row .card-body {
        padding: 1rem;
    }

    .stats-row .card-body h5 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .stats-row .card-body h1,
    .stats-row .card-body h2 {
        font-size: 1.5rem;
        margin: 0;
    }
}

/* Mobile Order Table - Hide on Small Screens */
@media (max-width: 768px) {
    .desktop-order-table {
        display: none;
    }

    .mobile-order-list {
        display: block;
        padding: 12px;
    }
}

@media (min-width: 769px) {
    .mobile-order-list {
        display: none;
    }
}

/* Mobile Order Card */
.mobile-order-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    cursor: pointer;
}

.mobile-order-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.mobile-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-order-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #001f3f;
    line-height: 1.2;
}

.mobile-order-time {
    font-size: 0.75rem;
    color: #888;
    text-align: right;
}

.mobile-order-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.mobile-order-detail-item {
    display: flex;
    flex-direction: column;
}

.mobile-order-detail-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.mobile-order-detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.mobile-order-detail-value.resident-name {
    font-weight: 600;
    color: #001f3f;
}

.mobile-order-detail-value small {
    display: block;
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
}

.mobile-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.mobile-order-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #27ae60;
}

.mobile-order-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mobile-order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.mobile-order-status.completed {
    background: #d4edda;
    color: #155724;
}

.mobile-order-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.mobile-order-items {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 6px;
}

/* Mobile Filter Form */
@media (max-width: 768px) {
    .filter-form .row {
        margin: 0;
    }

    .filter-form .col-md-5,
    .filter-form .col-md-3,
    .filter-form .col-md-2 {
        padding: 0 0.5rem;
        margin-bottom: 0.5rem;
    }

    .filter-form .form-control,
    .filter-form .form-select,
    .filter-form .btn {
        font-size: 0.9rem;
    }
}

/* Mobile Page Header */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-header h2 {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .page-header > div:last-child {
        width: 100%;
    }

    .page-header .btn {
        width: 100%;
        margin-bottom: 6px;
    }
}

/* Mobile Tabs */
@media (max-width: 576px) {
    .nav-tabs {
        border-bottom: 2px solid #dee2e6;
    }

    .nav-tabs .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Pagination */
@media (max-width: 576px) {
    .pagination {
        font-size: 0.85rem;
    }

    .pagination .page-link {
        padding: 0.4rem 0.6rem;
    }

    .pagination .page-item:not(.active):not(:first-child):not(:last-child):not(.disabled) {
        display: none;
    }

    .pagination .page-item.active {
        display: inline-block;
    }
}

/* Card-based table for very small screens */
@media (max-width: 576px) {
    .mobile-card-view .table thead {
        display: none;
    }

    .mobile-card-view .table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 1rem;
        background: white;
    }

    .mobile-card-view .table td {
        display: block;
        text-align: right;
        padding: 0.5rem 0;
        border: none;
    }

    .mobile-card-view .table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #666;
    }
}

/* ==========================================================================
   UNIVERSAL MOBILE-FIRST DATA TABLE STYLES
   Standardized for all pages: Products, Categories, Inventory, Users, etc.
   ========================================================================== */

/* Desktop/Mobile Table Switcher */
@media (max-width: 768px) {
    .desktop-data-table {
        display: none !important;
    }

    .mobile-data-list {
        display: block !important;
        padding: 12px;
    }
}

@media (min-width: 769px) {
    .mobile-data-list {
        display: none !important;
    }

    .desktop-data-table {
        display: block !important;
    }
}

/* Universal Mobile Data Card */
.mobile-data-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    cursor: pointer;
}

.mobile-data-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.mobile-data-card.no-click {
    cursor: default;
}

.mobile-data-card.no-click:active {
    transform: none;
}

/* Mobile Card Header */
.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #001f3f;
    line-height: 1.3;
    flex: 1;
}

.mobile-card-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.mobile-card-badge.active {
    background: #d4edda;
    color: #155724;
}

.mobile-card-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.mobile-card-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.mobile-card-badge.low-stock {
    background: #f8d7da;
    color: #721c24;
}

.mobile-card-badge.in-stock {
    background: #d4edda;
    color: #155724;
}

/* Mobile Card Details Grid */
.mobile-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.mobile-card-detail-item {
    display: flex;
    flex-direction: column;
}

.mobile-card-detail-item.full-width {
    grid-column: 1 / -1;
}

.mobile-card-detail-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
}

.mobile-card-detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

.mobile-card-detail-value.highlight {
    font-weight: 600;
    color: #001f3f;
    font-size: 1rem;
}

.mobile-card-detail-value.price {
    font-weight: 700;
    color: #27ae60;
    font-size: 1.1rem;
}

.mobile-card-detail-value small {
    display: block;
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
    margin-top: 2px;
}

/* Mobile Card Footer */
.mobile-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    gap: 8px;
}

.mobile-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-card-actions .btn {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Mobile Card Image */
.mobile-card-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.mobile-card-image-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    color: #999;
    font-size: 1.5rem;
}

/* Mobile Card with Image Layout */
.mobile-card-with-image {
    display: flex;
    gap: 12px;
}

.mobile-card-image-container {
    flex-shrink: 0;
}

.mobile-card-content {
    flex: 1;
    min-width: 0;
}

/* Mobile Statistics Row */
@media (max-width: 768px) {
    .stats-row .col-md-3,
    .stats-row .col-md-4,
    .stats-row .col-lg-3 {
        margin-bottom: 1rem;
    }

    .stats-row .col-6 {
        margin-bottom: 1rem;
    }

    .stats-row .col-12 {
        margin-bottom: 1rem;
    }

    .stats-row .card {
        margin-bottom: 0;
    }

    .stats-row .card-body {
        padding: 1rem;
    }

    .stats-row .card-body h5,
    .stats-row .card-body h6 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .stats-row .card-body h1,
    .stats-row .card-body h2,
    .stats-row .card-body h3 {
        font-size: 1.5rem;
        margin: 0;
    }
}

/* Mobile Filter/Search Form */
@media (max-width: 768px) {
    .filter-form .row,
    .search-form .row {
        margin: 0;
    }

    .filter-form .col-md-3,
    .filter-form .col-md-4,
    .filter-form .col-md-5,
    .filter-form .col-md-6,
    .filter-form .col-md-2,
    .search-form .col-md-3,
    .search-form .col-md-4,
    .search-form .col-md-5,
    .search-form .col-md-6,
    .search-form .col-md-2 {
        padding: 0 0.5rem;
        margin-bottom: 0.5rem;
    }

    .filter-form .form-control,
    .filter-form .form-select,
    .filter-form .btn,
    .search-form .form-control,
    .search-form .form-select,
    .search-form .btn {
        font-size: 0.9rem;
    }
}

/* Mobile Page Header */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .page-header h1,
    .page-header h2 {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .page-header h3 {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    .page-header > div:last-child {
        width: 100%;
    }

    .page-header .btn {
        width: 100%;
        margin-bottom: 6px;
    }

    .page-header .btn-group {
        width: 100%;
        display: flex;
    }

    .page-header .btn-group .btn {
        flex: 1;
        margin-bottom: 0;
    }
}

/* Mobile Action Buttons Row */
@media (max-width: 576px) {
    .action-buttons-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .action-buttons-row .btn {
        width: 100%;
    }
}

/* Mobile Tabs */
@media (max-width: 576px) {
    .nav-tabs {
        border-bottom: 2px solid #dee2e6;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tabs .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* Mobile Pagination */
@media (max-width: 576px) {
    .pagination {
        font-size: 0.85rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination .page-link {
        padding: 0.4rem 0.6rem;
        margin: 2px;
    }

    /* Hide middle page numbers on mobile, show only important ones */
    .pagination .page-item:not(.active):not(:first-child):not(:last-child):not(.disabled) {
        display: none;
    }

    .pagination .page-item.active,
    .pagination .page-item:first-child,
    .pagination .page-item:last-child {
        display: inline-block;
    }
}

/* Mobile Card Empty State */
.mobile-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #999;
}

.mobile-empty-state svg,
.mobile-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.mobile-empty-state h4 {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.mobile-empty-state p {
    font-size: 0.9rem;
    color: #999;
}

/* Mobile Info Badge/Pill */
.mobile-info-pill {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mobile-info-pill.success {
    background: #d4edda;
    color: #155724;
}

.mobile-info-pill.warning {
    background: #fff3cd;
    color: #856404;
}

.mobile-info-pill.danger {
    background: #f8d7da;
    color: #721c24;
}

/* Mobile Sticky Action Bar */
@media (max-width: 768px) {
    .mobile-sticky-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 12px;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .mobile-sticky-actions .btn {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
        font-weight: 600;
    }
}

/* Mobile Table Alternative - Simple List */
.mobile-simple-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-simple-list-item {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.mobile-simple-list-item:active {
    background: #f8f9fa;
}

.mobile-simple-list-item:last-child {
    border-bottom: none;
}

.mobile-list-item-main {
    flex: 1;
    min-width: 0;
}

.mobile-list-item-title {
    font-weight: 600;
    color: #001f3f;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.mobile-list-item-subtitle {
    font-size: 0.8rem;
    color: #666;
}

.mobile-list-item-action {
    margin-left: 12px;
}

/* Mobile Modal Fixes */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }

    .modal-dialog-centered {
        min-height: calc(100% - 1rem) !important;
        display: flex !important;
        align-items: center !important;
    }

    .modal-content {
        width: 100% !important;
        max-height: calc(100vh - 2rem) !important;
        overflow-y: auto !important;
    }

    .modal-body {
        max-height: calc(100vh - 200px) !important;
        overflow-y: auto !important;
    }

    .modal-header .modal-title {
        font-size: 1rem !important;
    }

    .modal-footer .btn,
    .modal-body .btn {
        font-size: 0.9rem !important;
        padding: 0.5rem 1rem !important;
    }
}

/* ==========================================================================
   CREATE ORDER / SHOPPING INTERFACE STYLES
   ========================================================================== */

/* Product Card - Ultra Compact Mobile First */
.product-card {
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card:active {
    transform: scale(0.98);
}

.product-card .card-body {
    padding: 0.75rem;
}

.product-image-container {
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.5rem;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-image-placeholder {
    width: 100%;
    height: 180px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.875rem;
}

.product-card h6 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.product-card .product-description {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 0 0.5rem 0;
    font-size: 0.8rem;
    color: #888;
    line-height: 1.2;
    min-height: 1rem;
}

.product-card .price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.product-card .price-section h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #28a745;
}

.product-card .price-section small {
    margin: 0;
    font-size: 0.75rem;
    color: #666;
}

.product-card .btn {
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    width: 100%;
}

/* Cart Styles */
.cart-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

#cartSidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1050;
    overflow-y: auto;
    padding: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#cartSidebar.show {
    transform: translateX(0);
}

#cartCount {
    transition: all 0.3s ease;
    display: inline-block;
}

/* ==========================================================================
   TOUCH-FRIENDLY MOBILE COMPONENTS
   ========================================================================== */

/* Minimum 44px touch targets for mobile */
.btn-mobile {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
}

/* Large, easy-to-tap form controls */
.form-control-mobile {
    min-height: 48px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 8px;
}

.form-select-mobile {
    min-height: 48px;
    font-size: 16px;
    border-radius: 8px;
}

/* Mobile-friendly spacing */
.mb-mobile {
    margin-bottom: 1rem;
}

.p-mobile {
    padding: 1rem;
}

/* ==========================================================================
   STATISTICS CARDS - MOBILE FIRST
   ========================================================================== */

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-card h5 {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card h1 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

/* ==========================================================================
   TABLET STYLES (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    /* Product Cards - Hover effects for tablets/desktop */
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

    .product-card:active {
        transform: translateY(-2px);
    }

    .product-image-container {
        height: 200px;
    }

    .product-image-placeholder {
        height: 200px;
    }

    /* Order Cards */
    .order-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    /* Cart Sidebar for tablet */
    #cartSidebar {
        width: 380px;
    }

    /* Stat Cards */
    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    .stat-card:active {
        transform: translateY(-1px);
    }

    /* Better spacing for tablets */
    .product-card .card-body {
        padding: 1rem;
    }

    .product-card h6 {
        font-size: 1rem;
    }

    .product-card .product-description {
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   DESKTOP STYLES (992px+) - For Cashiers & Admins
   ========================================================================== */

@media (min-width: 992px) {
    /* Login Card - Larger on desktop */
    .login-card {
        max-width: 520px;
    }

    .login-header h3 {
        font-size: 1.75rem;
    }

    .login-body {
        padding: 2rem;
    }

    /* Product Grid - More columns */
    .product-card {
        margin-bottom: 1.5rem;
    }

    .product-image-container {
        height: 220px;
    }

    .product-image-placeholder {
        height: 220px;
    }

    /* Cart Sidebar */
    #cartSidebar {
        width: 420px;
    }

    /* Order Cards */
    .order-number {
        font-size: 1.75rem;
    }

    /* Stat Cards - Larger text */
    .stat-card h1 {
        font-size: 2.5rem;
    }

    .stat-card h5 {
        font-size: 1rem;
    }
}

/* ==========================================================================
   LARGE DESKTOP (1200px+)
   ========================================================================== */

@media (min-width: 1200px) {
    .product-image-container {
        height: 240px;
    }

    .product-image-placeholder {
        height: 240px;
    }

    .product-card .price-section h5 {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   UTILITY CLASSES FOR MOBILE/TABLET
   ========================================================================== */

/* Hide on mobile */
.hide-mobile {
    display: none !important;
}

/* Show only on mobile */
.show-mobile {
    display: block !important;
}

/* Center content on mobile */
.mobile-center {
    text-align: center;
}

/* Full width on mobile */
.mobile-full {
    width: 100% !important;
}

/* Stack columns on mobile */
.mobile-stack > * {
    width: 100% !important;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block !important;
    }

    .show-mobile {
        display: none !important;
    }

    .mobile-center {
        text-align: left;
    }

    .mobile-full {
        width: auto !important;
    }

    .mobile-stack > * {
        width: auto !important;
        margin-bottom: 0;
    }
}

/* ==========================================================================
   ACCESSIBILITY & MOBILE UX IMPROVEMENTS
   ========================================================================== */

/* Better tap targets */
a, button, .btn {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus states for accessibility */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* Card hover states - subtle on mobile, pronounced on desktop */
.card-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-clickable:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .card-clickable:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

/* ==========================================================================
   FILTERS & SEARCH - MOBILE OPTIMIZED
   ========================================================================== */

.filter-container {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-input-mobile {
    width: 100%;
    padding: 0.75rem;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-buttons .btn {
    flex: 1 1 auto;
    min-width: 100px;
}

@media (max-width: 576px) {
    .filter-buttons .btn {
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .no-print,
    .sidebar,
    .page-header .btn,
    .filter-container,
    #cartSidebar {
        display: none !important;
    }

    .content-wrapper {
        margin: 0;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
