/* ============================================================
   POS KOLAM RENANG - DESIGN SYSTEM
   Modern, Premium, Responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    /* Primary Colors - Ocean Blue Theme */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Accent - Aqua */
    --accent-400: #22d3ee;
    --accent-500: #06b6d4;
    --accent-600: #0891b2;

    /* Success */
    --success-50: #ecfdf5;
    --success-400: #34d399;
    --success-500: #10b981;
    --success-600: #059669;

    /* Warning */
    --warning-50: #fffbeb;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    /* Danger */
    --danger-50: #fef2f2;
    --danger-400: #f87171;
    --danger-500: #ef4444;
    --danger-600: #dc2626;

    /* Info */
    --info-50: #f0f9ff;
    --info-500: #0ea5e9;

    /* Neutral */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gray-950: #020617;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.gap-xs {
    gap: 4px;
}

.gap-sm {
    gap: 8px;
}

.gap-md {
    gap: 16px;
}

.gap-lg {
    gap: 24px;
}

.gap-xl {
    gap: 32px;
}

.grid {
    display: grid;
}

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

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 0.857rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.143rem;
}

.text-xl {
    font-size: 1.286rem;
}

.text-2xl {
    font-size: 1.571rem;
}

.text-3xl {
    font-size: 2rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.text-muted {
    color: var(--gray-500);
}

.text-primary {
    color: var(--primary-600);
}

.text-success {
    color: var(--success-600);
}

.text-warning {
    color: var(--warning-600);
}

.text-danger {
    color: var(--danger-600);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.hidden {
    display: none !important;
}

.overflow-auto {
    overflow: auto;
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mt-sm {
    margin-top: 8px;
}

.mt-md {
    margin-top: 16px;
}

.mt-lg {
    margin-top: 24px;
}

.mb-sm {
    margin-bottom: 8px;
}

.mb-md {
    margin-bottom: 16px;
}

.mb-lg {
    margin-bottom: 24px;
}

.p-sm {
    padding: 8px;
}

.p-md {
    padding: 16px;
}

.p-lg {
    padding: 24px;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-900) 50%, var(--accent-600) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(1deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-1deg);
    }
}

.login-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.login-logo h1 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.login-logo p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 4px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.857rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.login-card input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 1rem;
    transition: var(--transition);
}

.login-card input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.login-card .btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.login-card .btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.login-card .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.login-card .btn-login:hover::after {
    left: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.857rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-400);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-400);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ============================================================
   LAYOUT - SIDEBAR + MAIN
   ============================================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--gray-900);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-slow);
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .brand-icon {
    font-size: 1.8rem;
}

.sidebar-header .brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-300), var(--accent-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header .brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    padding: 8px 12px 4px;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.nav-link .nav-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
}

.user-info .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.user-info .user-details {
    flex: 1;
    min-width: 0;
}

.user-info .user-name {
    font-size: 0.857rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.main-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

.main-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-content {
    padding: 32px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 8px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.05;
    transform: translate(30px, -30px);
}

.stat-card.blue::after {
    background: var(--primary-500);
}

.stat-card.green::after {
    background: var(--success-500);
}

.stat-card.orange::after {
    background: var(--warning-500);
}

.stat-card.red::after {
    background: var(--danger-500);
}

.stat-card.cyan::after {
    background: var(--accent-500);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-info h4 {
    font-size: 0.857rem;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-info .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.03em;
}

.stat-info .stat-sub {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.blue {
    background: var(--primary-50);
    color: var(--primary-600);
}

.stat-icon.green {
    background: var(--success-50);
    color: var(--success-600);
}

.stat-icon.orange {
    background: var(--warning-50);
    color: var(--warning-600);
}

.stat-icon.red {
    background: var(--danger-50);
    color: var(--danger-600);
}

.stat-icon.cyan {
    background: var(--info-50);
    color: var(--accent-600);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.857rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: #fff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: #fff;
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-500), var(--danger-600));
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-ghost:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.857rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    color: var(--gray-800);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-600);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.857rem;
}

thead th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: var(--gray-50);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.badge-success {
    background: var(--success-50);
    color: var(--success-600);
}

.badge-warning {
    background: var(--warning-50);
    color: var(--warning-600);
}

.badge-danger {
    background: var(--danger-50);
    color: var(--danger-600);
}

.badge-primary {
    background: var(--primary-50);
    color: var(--primary-600);
}

.badge-info {
    background: var(--info-50);
    color: var(--accent-600);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: #fff;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-lg {
    max-width: 720px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: var(--success-500);
}

.toast.error {
    border-left-color: var(--danger-500);
}

.toast.warning {
    border-left-color: var(--warning-500);
}

.toast.info {
    border-left-color: var(--primary-500);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    flex: 1;
    font-size: 0.857rem;
    color: var(--gray-700);
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.1rem;
}

/* ============================================================
   POS LAYOUT
   ============================================================ */
.pos-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--gray-100);
}

.pos-products-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-header {
    background: var(--gray-900);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pos-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.pos-header .brand span {
    background: linear-gradient(135deg, var(--primary-300), var(--accent-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pos-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.pos-search input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: #fff;
    font-size: 0.9rem;
    transition: var(--transition);
}

.pos-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.pos-search input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-400);
}

.pos-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
}

.pos-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-user-info .user-badge {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Category Tabs */
.pos-categories {
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    scrollbar-width: none;
}

.pos-categories::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-600);
}

.category-tab:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.category-tab.active {
    background: var(--primary-600);
    color: #fff;
    border-color: var(--primary-600);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.type-tab {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--gray-200);
    background: #fff;
    color: var(--gray-600);
}

.type-tab.active {
    border-color: var(--primary-500);
    color: var(--primary-700);
    background: var(--primary-50);
}

/* Product Grid */
.pos-products-grid {
    flex: 1;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-auto-rows: max-content;
    gap: 14px;
    overflow-y: auto;
    align-content: start;
    scroll-behavior: smooth;
}

/* Search results bar */
.pos-search-results {
    padding: 8px 20px;
    background: var(--primary-50);
    border-bottom: 1px solid var(--primary-100);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-700);
    display: none;
    align-items: center;
    gap: 8px;
}

.pos-search-results.visible {
    display: flex;
}

.pos-search-results .search-clear {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--primary-500);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.pos-search-results .search-clear:hover {
    background: var(--primary-100);
}

/* View toggle */
.pos-view-toggle {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.pos-view-toggle button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.85rem;
    line-height: 1;
}

.pos-view-toggle button.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.pos-view-toggle button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

/* ---- PRODUCT CARD ---- */
.product-card {
    background: #fff;
    border-radius: 12px;
    border: 1.5px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 180px;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-200);
}

.product-card:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Ripple animation on click */
.product-card.ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    animation: cardRipple 0.5s ease-out;
    pointer-events: none;
    z-index: 5;
}

@keyframes cardRipple {
    0% {
        opacity: 1;
        transform: scale(0.5);
    }

    100% {
        opacity: 0;
        transform: scale(2.5);
    }
}

/* Added feedback overlay */
.product-card.just-added {
    border-color: var(--success-400);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Product Image Area */
.product-card .product-image {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-card .product-image .product-placeholder {
    font-size: 2.5rem;
    opacity: 0.5;
    line-height: 1;
    filter: grayscale(0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.product-card:hover .product-image .product-placeholder {
    transform: scale(1.1);
    opacity: 0.7;
}

/* Category color dot */
.product-card .product-category-dot {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.category-dot-tiket {
    background: #6366F1;
}

.category-dot-retail {
    background: #10B981;
}

.category-dot-rental {
    background: #F59E0B;
}

.category-dot-resto {
    background: #EF4444;
}

/* category-specific for food/drink sub-types */
.category-dot-makanan {
    background: #F97316;
}

.category-dot-minuman {
    background: #3B82F6;
}

.category-dot-snack {
    background: #8B5CF6;
}

/* Quick-add button */
.product-card .product-quick-add {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 1.5px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-600);
    cursor: pointer;
    transition: var(--transition-fast);
    opacity: 0;
    transform: scale(0.8);
    z-index: 3;
    line-height: 1;
}

.product-card:hover .product-quick-add {
    opacity: 1;
    transform: scale(1);
}

.product-card .product-quick-add:hover {
    background: var(--primary-600);
    color: #fff;
    border-color: var(--primary-600);
}

/* Card Body */
.product-card .product-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-card .product-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.product-card .product-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.01em;
    margin-top: 2px;
}

.product-card .product-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.product-card .product-category-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--gray-400);
    line-height: 1;
}

/* Stock badges */
.product-card .product-stock {
    font-size: 0.68rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-card .stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.2;
}

.stock-badge.low {
    background: #FEF3C7;
    color: #92400E;
}

.stock-badge.out {
    background: #FEE2E2;
    color: #991B1B;
}

/* Out of stock overlay */
.product-card.out-of-stock {
    opacity: 0.55;
    pointer-events: none;
}

.product-card.out-of-stock::before {
    content: 'Habis';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--danger-600);
    z-index: 4;
    text-transform: uppercase;
    letter-spacing: 2px;
    backdrop-filter: blur(1px);
}

/* Deposit indicator */
.product-card .product-deposit {
    font-size: 0.65rem;
    color: var(--warning-600);
    font-weight: 500;
}

/* Highlight matched text in search */
.product-card .product-name mark {
    background: #FDE68A;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* Search keyboard navigation - selected card */
.product-card.search-selected {
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 4px 16px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
    z-index: 2;
}

.product-card.search-selected::after {
    content: '↵';
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--primary-500);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

/* ---- COMPACT LIST VIEW ---- */
.pos-products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 6px;
}

.pos-products-grid.list-view .product-card {
    flex-direction: row;
    border-radius: 8px;
}

.pos-products-grid.list-view .product-card .product-image {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 8px 0 0 8px;
}

.pos-products-grid.list-view .product-card .product-body {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}

.pos-products-grid.list-view .product-card .product-name {
    flex: 1;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    min-width: 0;
}

.pos-products-grid.list-view .product-card .product-price {
    font-size: 0.9rem;
    white-space: nowrap;
}

.pos-products-grid.list-view .product-card .product-meta {
    display: none;
}

.pos-products-grid.list-view .product-card .product-category-dot {
    top: 50%;
    transform: translateY(-50%);
    left: 4px;
}

.pos-products-grid.list-view .product-card .product-quick-add {
    position: static;
    opacity: 1;
    transform: none;
    flex-shrink: 0;
}

/* POS Cart Panel */
.pos-cart-panel {
    width: 380px;
    background: #fff;
    border-left: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.cart-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
}

.cart-header h3 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-header .cart-count {
    background: var(--primary-600);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--gray-50);
    transition: var(--transition-fast);
}

.cart-item:hover {
    background: var(--gray-50);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.857rem;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-meta {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 2px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-item-qty button {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--gray-100);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.cart-item-qty button:hover {
    background: var(--gray-200);
}

.cart-item-qty span {
    width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 0.857rem;
}

.cart-item-price {
    font-size: 0.857rem;
    font-weight: 700;
    color: var(--gray-800);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.cart-item-remove:hover {
    color: var(--danger-500);
}

/* Cart Summary */
.cart-summary {
    padding: 16px 20px;
    border-top: 2px solid var(--gray-200);
    background: var(--gray-50);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.857rem;
}

.cart-summary-row.total {
    padding: 12px 0 4px;
    margin-top: 8px;
    border-top: 2px solid var(--gray-300);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
}

.cart-summary-row .label {
    color: var(--gray-500);
    font-weight: 500;
}

.cart-summary-row .value {
    font-weight: 600;
}

.cart-summary-row.deposit .value {
    color: var(--warning-600);
}

.cart-actions {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.table-number-input {
    position: relative;
    display: flex;
    align-items: center;
}

.table-number-input .table-icon {
    position: absolute;
    left: 10px;
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.table-number-input input {
    padding-left: 34px !important;
    border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
    background: rgba(16, 185, 129, 0.06) !important;
}

.table-number-input input:focus {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-clear-cart {
    width: 100%;
    padding: 10px;
    font-size: 0.857rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--gray-500);
    border: 1px solid var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear-cart:hover {
    background: var(--danger-50);
    color: var(--danger-600);
    border-color: var(--danger-300);
}

/* Cart empty state */
.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    padding: 40px;
}

.cart-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.cart-empty p {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================================
   PAYMENT MODAL
   ============================================================ */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.payment-method-btn {
    padding: 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.857rem;
    font-weight: 600;
    color: var(--gray-600);
}

.payment-method-btn:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.payment-method-btn.selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-700);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.payment-method-btn .method-icon {
    font-size: 1.5rem;
}

.split-payments {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-top: 16px;
}

.split-payment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.split-payment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ============================================================
   CHART
   ============================================================ */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

.chart-bar-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 250px;
    padding: 10px 0;
    border-bottom: 2px solid var(--gray-200);
}

.chart-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 50px;
}

.chart-bar {
    width: 30px;
    background: linear-gradient(to top, var(--primary-600), var(--primary-400));
    border-radius: 4px 4px 0 0;
    transition: height 0.8s ease;
    min-height: 2px;
    position: relative;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-bar-label {
    font-size: 0.65rem;
    color: var(--gray-500);
    margin-top: 8px;
    text-align: center;
}

.chart-bar-value {
    font-size: 0.6rem;
    color: var(--gray-600);
    font-weight: 600;
    margin-bottom: 4px;
}

/* ============================================================
   RECEIPT PRINT LAYOUT
   ============================================================ */
.receipt {
    width: 80mm;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 10px;
    background: #fff;
    color: #000;
}

.receipt .receipt-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.receipt .receipt-header .store-name {
    font-size: 16px;
    font-weight: bold;
}

.receipt .receipt-items {
    border-bottom: 1px dashed #000;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.receipt .receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.receipt .receipt-total {
    font-weight: bold;
    font-size: 14px;
    text-align: right;
}

.receipt .receipt-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 11px;
}

@media print {
    body * {
        visibility: hidden;
    }

    .receipt,
    .receipt * {
        visibility: visible;
    }

    .receipt {
        position: absolute;
        top: 0;
        left: 0;
    }
}

/* ============================================================
   SHIFT MODAL
   ============================================================ */
.shift-info {
    background: linear-gradient(135deg, var(--primary-50), var(--info-50));
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.shift-info .shift-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.857rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.shift-info .shift-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-500);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px 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);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border-color: var(--gray-200);
    border-top-color: var(--primary-500);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .pos-cart-panel {
        width: 340px;
    }

    .pos-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 16px;
    }

    .pos-layout {
        flex-direction: column;
    }

    .pos-cart-panel {
        width: 100%;
        height: auto;
        max-height: 50vh;
        border-left: none;
        border-top: 2px solid var(--gray-200);
    }

    .pos-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
        padding: 12px;
    }

    .product-card .product-image {
        height: 80px;
    }

    .product-card .product-body {
        padding: 8px 10px 10px;
    }

    .product-card .product-name {
        font-size: 0.77rem;
    }

    .product-card .product-price {
        font-size: 0.85rem;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .main-header {
        padding: 0 16px;
    }

    .modal {
        margin: 10px;
    }

    .payment-methods {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .pos-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pos-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .pos-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px;
    }

    .product-card .product-image {
        height: 70px;
    }

    .product-card .product-body {
        padding: 6px 8px 8px;
    }

    .product-card .product-name {
        font-size: 0.72rem;
    }

    .product-card .product-price {
        font-size: 0.8rem;
    }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.filter-bar .form-control {
    max-width: 180px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--border-radius-sm);
    font-size: 0.857rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.pagination a {
    color: var(--gray-600);
    cursor: pointer;
}

.pagination a:hover {
    background: var(--gray-100);
}

.pagination .active {
    background: var(--primary-600);
    color: #fff;
}

/* Kitchen Order Ticket */
.kot-ticket {
    width: 80mm;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 10px;
    border: 2px dashed #000;
    background: #fff;
}

.kot-ticket .kot-header {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px dashed #000;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.kot-ticket .kot-item {
    padding: 4px 0;
    font-size: 14px;
    font-weight: bold;
}

.kot-ticket .kot-modifier {
    padding-left: 16px;
    font-size: 12px;
    font-style: italic;
}