/* NUO Book Cashier Application Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-main: #0b0f19;
    --bg-card: #161f30;
    --bg-card-glass: rgba(22, 31, 48, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(20, 184, 166, 0.5);
    
    --primary: #14b8a6; /* Teal */
    --primary-glow: rgba(20, 184, 166, 0.15);
    --secondary: #8b5cf6; /* Violet */
    --secondary-glow: rgba(139, 92, 246, 0.15);
    
    --success: #10b981; /* Emerald */
    --warning: #f59e0b; /* Amber */
    --danger: #ef4444;  /* Rose */
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.3);
    --shadow-primary: 0 0 20px rgba(20, 184, 166, 0.2);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    padding-left: 1.25rem;
}

.nav-item.active a {
    color: #fff;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--border-focus);
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.05);
}

.user-profile-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-title h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.header-date {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Glass Card Component */
.card-glass {
    background: var(--bg-card-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.card-glass:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0f9f8f);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-secondary);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #cf2e2e);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    background: rgba(11, 15, 25, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-select {
    width: 100%;
    background: rgba(11, 15, 25, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}

.form-select:focus {
    border-color: var(--primary);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Auth Login Layout */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(20, 184, 166, 0.12) 0%, rgba(139, 92, 246, 0.08) 50%, var(--bg-main) 100%);
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.auth-header {
    margin-bottom: 2.25rem;
}

.auth-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Dashboard Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.metric-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.metric-card.teal .metric-icon-box {
    color: var(--primary);
    border-color: rgba(20, 184, 166, 0.2);
    background: rgba(20, 184, 166, 0.05);
}

.metric-card.violet .metric-icon-box {
    color: var(--secondary);
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.05);
}

.metric-card.emerald .metric-icon-box {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.05);
}

.metric-card.amber .metric-icon-box {
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.05);
}

.metric-content {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-val {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-top: 0.1rem;
}

/* POS Cashier Grid Layout */
.pos-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    height: calc(100vh - 120px);
}

@media (max-width: 1200px) {
    .pos-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.books-pane {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    overflow: hidden;
}

.search-filters {
    display: flex;
    gap: 1rem;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.pos-search-input {
    padding-left: 2.75rem;
}

.books-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    flex-grow: 1;
}

.book-item-card {
    background: var(--bg-card-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-item-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.15);
}

.book-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.book-item-code {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.book-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.book-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.book-item-price {
    font-weight: 700;
    color: var(--text-primary);
}

.book-item-stock {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.book-item-stock.low {
    color: var(--danger);
    font-weight: 600;
}

/* Cart Pane */
.cart-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
    margin-bottom: 1.5rem;
}

.cart-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

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

.cart-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-qty-mod {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.15s;
}

.btn-qty-mod:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.qty-val {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-total {
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 80px;
    text-align: right;
}

.cart-summary {
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.summary-row.grand-total {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    border-top: 1px dashed var(--border-color);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-family: var(--font-heading);
}

/* Payment Selection */
.payment-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.payment-option {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.payment-option:hover {
    border-color: var(--text-secondary);
}

.payment-option.active {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(139, 92, 246, 0.05));
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.08);
}

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

.btn-checkout {
    width: 100%;
    justify-content: center;
    padding: 0.95rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* QRIS Modal Specifics */
.qris-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.qris-merchant-info {
    margin-bottom: 1rem;
}

.qris-merchant-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}

.qris-merchant-id {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.qris-code-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qris-amount {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Success Receipt Layout */
.success-card {
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
    padding: 3rem;
}

.success-icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--success);
    color: var(--success);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.success-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.success-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.barcode-scanner-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
    display: inline-block;
}

.barcode-qr-container {
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    margin-bottom: 1rem;
}

.success-action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.custom-table tbody tr {
    transition: background-color 0.15s;
}

.custom-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Public Invoice Styles */
.public-invoice-page {
    background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.08) 0%, var(--bg-main) 100%);
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.invoice-receipt-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.receipt-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.receipt-address {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.receipt-phone {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.receipt-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metadata-item {
    display: flex;
    justify-content: space-between;
}

.metadata-item span:first-child {
    font-weight: 500;
}

.metadata-item span:last-child {
    color: var(--text-primary);
}

.receipt-items {
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.receipt-item-details {
    display: flex;
    flex-direction: column;
}

.receipt-item-title {
    font-weight: 600;
    color: var(--text-primary);
}

.receipt-item-calc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.receipt-item-subtotal {
    font-weight: 600;
    align-self: center;
}

.receipt-totals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.receipt-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.receipt-total-row.grand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.receipt-footer {
    text-align: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.receipt-footer p:first-child {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

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

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

.animate-fade {
    animation: fadeIn 0.4s ease forwards;
}

.animate-slide {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Grid & Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* Custom Login UI Specifics */
.auth-input-icon {
    position: relative;
}
.auth-input-icon input {
    padding-left: 2.5rem;
}
.auth-input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Responsive adjustments for Tablets and Mobile Devices */

/* Hide desktop elements on mobile/tablet */
.no-desktop {
    display: none !important;
}

@media (max-width: 992px) {
    .no-desktop {
        display: flex !important;
    }
    
    .no-mobile {
        display: none !important;
    }
    
    /* Layout */
    .app-container {
        flex-direction: column;
    }
    
    /* Sidebar as overlay drawer */
    .sidebar {
        width: 280px;
        position: fixed;
        left: -280px;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 999;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
        padding-top: calc(60px + 1.5rem); /* Offset fixed mobile topbar */
        min-height: calc(100vh - 60px);
    }
    
    /* Header positioning */
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .header-date {
        align-self: flex-end;
    }
    
    /* Grid Collapses */
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* Table Responsive Swipe */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* POS cashier grid adaptation */
    .pos-grid {
        grid-template-columns: 1fr !important;
        height: calc(100vh - 150px);
        gap: 1rem;
    }
    
    .books-pane, .cart-pane {
        height: 100%;
    }
    
    .pos-tabs button {
        border-bottom: 2px solid transparent;
        transition: all 0.2s;
    }
    
    .pos-tabs button.active {
        color: var(--primary) !important;
        border-bottom-color: var(--primary);
        background: rgba(20, 184, 166, 0.05);
    }
}

@media (max-width: 576px) {
    /* Login Page Cards scaling */
    .login-card {
        padding: 1.75rem 1.25rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Success Receipt sizes */
    .success-card {
        padding: 1.5rem 1rem;
    }
}

/* Custom Responsive Overrides for Cashier POS */
@media (max-width: 992px) {
    body {
        overflow: auto !important; /* Allow scrolling on mobile screens */
    }
    .pos-header {
        padding: 0.75rem 1rem !important;
        margin-bottom: 1rem !important;
    }
    .pos-container {
        padding: 0 1rem !important;
    }
    /* Grid 2 specifically for Cash/Change input to stay in 2 columns on mobile */
    .cash-grid-input {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
    /* Make the entire cart pane scrollable on mobile so checkout is accessible */
    .cart-pane {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .cart-items-list {
        overflow-y: visible !important;
        flex-grow: 0 !important;
    }
}

@media (max-width: 576px) {
    .pos-container {
        padding: 0 0.5rem !important;
    }
    /* 2 Columns Catalog for Mobile */
    .books-catalog {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 0.75rem !important;
        padding-right: 0 !important;
    }
    .book-item-card {
        padding: 0.75rem !important;
        gap: 0.5rem !important;
    }
    .book-item-title {
        font-size: 0.85rem !important;
        height: 2.4rem !important;
    }
    .book-item-price {
        font-size: 0.85rem !important;
    }
    .book-item-stock {
        font-size: 0.7rem !important;
    }
    .book-item-footer {
        padding-top: 0.5rem !important;
    }
    
    /* Success Receipt action buttons stacked on mobile */
    .success-action-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    .success-action-buttons a {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Modal Padding */
    .modal-content {
        padding: 1.5rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .invoice-receipt-card {
        padding: 1.25rem !important;
    }
}

