/* Maktaba - Modern POS System Styles */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--gray-50);
    color: var(--gray-900);
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
    margin: 0;
    padding: 0;
}

input, select, textarea { direction: rtl; }

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-left: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

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

@media (min-width: 1024px) {
    .sidebar {
        position: relative;
        transform: translateX(0);
    }
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 4px;
}

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

.sidebar-section {
    padding: 16px 16px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    text-decoration: none;
}

.sidebar-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--gray-200);
}

.sidebar-user {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-logout:hover {
    background: var(--danger-light);
}

.sidebar-logout svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding-bottom: calc(70px + var(--safe-area-bottom));
}

@media (min-width: 1024px) {
    .main-content {
        padding-bottom: 0;
    }
}

/* Top Header (Mobile) */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 30;
}

@media (min-width: 1024px) {
    .top-header {
        display: none;
    }
}

.menu-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--gray-600);
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-btn:hover {
    background: var(--gray-100);
}

.header-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    padding: 8px 16px;
    padding-bottom: calc(8px + var(--safe-area-bottom));
    z-index: 30;
}

@media (min-width: 1024px) {
    .bottom-nav {
        display: none;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--gray-500);
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 60px;
    text-decoration: none;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active svg {
    stroke-width: 2.5;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 16px;
}

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

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.card-body {
    padding: 20px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 1.75rem;
    }
}

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

.stat-card.primary .stat-value { color: var(--primary); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.warning .stat-value { color: var(--warning); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-height: 44px;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 1rem;
    min-height: 52px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* FAB - Floating Action Button */
.fab {
    position: fixed;
    bottom: calc(90px + var(--safe-area-bottom));
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 20;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.fab:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.fab svg {
    width: 24px;
    height: 24px;
}

@media (min-width: 1024px) {
    .fab {
        bottom: 24px;
    }
}

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

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    min-height: 48px;
}

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

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

.form-input.error {
    border-color: var(--danger);
}

.form-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 6px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: left 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-left: 40px;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th {
    text-align: right;
    padding: 12px 16px;
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.data-table tr:last-child td {
    border-bottom: none;
}

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

.data-table .highlight-low {
    background: var(--warning-light);
}

.data-table .highlight-negative {
    background: var(--danger-light);
}

/* Mobile Cards (alternative to tables) */
.mobile-cards {
    display: block;
}

@media (min-width: 768px) {
    .mobile-cards {
        display: none;
    }
}

.desktop-table {
    display: none;
}

@media (min-width: 768px) {
    .desktop-table {
        display: block;
    }
}

.mobile-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.mobile-card-title {
    font-weight: 600;
    color: var(--gray-900);
}

.mobile-card-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
}

.mobile-card-label {
    color: var(--gray-500);
}

.mobile-card-value {
    font-weight: 500;
}

.mobile-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

/* Alerts & Messages */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
}

.alert-danger, .alert-error {
    background: var(--danger-light);
    color: #991b1b;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
}

.alert-info {
    background: var(--primary-light);
    color: #1e40af;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

@media (min-width: 768px) {
    .toast-container {
        left: auto;
        right: 20px;
        max-width: 400px;
    }
}

.toast {
    background: var(--gray-900);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    pointer-events: auto;
}

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

.toast-success { background: var(--success); }
.toast-danger { background: var(--danger); }

/* Page Header */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 1.75rem;
    }
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Search */
.search-box {
    position: relative;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 44px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-height: 44px;
}

.search-box input:focus {
    border-color: var(--primary);
    outline: none;
}

.search-box svg {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
}

/* POS Specific Styles */
.pos-container {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 130px);
    margin: -16px;
}

@media (min-width: 1024px) {
    .pos-container {
        flex-direction: row;
        gap: 20px;
        margin: 0;
        height: calc(100dvh - 48px);
        padding: 24px;
    }
}

.pos-products {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
}

@media (min-width: 1024px) {
    .pos-products {
        padding: 0;
    }
}

.pos-search input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.pos-search input:focus {
    border-color: var(--primary);
    outline: none;
}

.pos-pinned {
    margin-bottom: 12px;
}

.pos-pinned-title {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 8px;
}

.pos-pinned-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pos-pinned-btn {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    color: var(--primary-dark);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pos-pinned-btn:hover {
    background: #dbeafe;
}

.pos-pinned-btn .price {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-right: 6px;
}

.pos-results {
    flex: 1;
    overflow-y: auto;
    background: white;
    border-radius: var(--radius-lg);
    padding: 8px;
    margin-top: 12px;
}

.pos-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    width: 100%;
    background: none;
    text-align: right;
}

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

.pos-product-item:active {
    background: var(--primary-light);
}

.pos-product-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.pos-product-meta {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.pos-product-price {
    font-weight: 700;
    color: var(--primary);
}

/* Cart Panel */
.pos-cart {
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-height: 60vh;
}

@media (min-width: 1024px) {
    .pos-cart {
        width: 400px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        max-height: none;
    }
}

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

.pos-cart-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.pos-cart-count {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 100px;
}

.pos-cart-empty {
    text-align: center;
    color: var(--gray-400);
    padding: 40px 20px;
    font-size: 0.9rem;
}

.pos-cart-item {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
}

.pos-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.pos-cart-item-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.pos-cart-item-total {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.pos-cart-item-remove {
    color: var(--danger);
    font-size: 1.25rem;
    line-height: 1;
    padding: 4px 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.pos-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.pos-qty-btn:hover {
    background: var(--gray-300);
}

.pos-qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 6px;
    font-weight: 500;
}

.pos-discount-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-right: auto;
    margin-left: 8px;
}

.pos-discount-input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 6px;
    font-size: 0.85rem;
}

.pos-cart-footer {
    padding: 16px;
    border-top: 1px solid var(--gray-100);
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
}

.pos-summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid var(--gray-200);
}

.pos-payment-row {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    align-items: center;
}

.pos-payment-select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.pos-delivery-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.pos-delivery-fields {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.pos-delivery-fields.active {
    display: flex;
}

.pos-delivery-fields input,
.pos-delivery-fields textarea {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: var(--success-light); color: #065f46; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-primary { background: var(--primary-light); color: #1e40af; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}

/* Login Page */
.login-container {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    width: 100%;
    max-width: 400px;
}

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

.login-logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Print Styles */
@media print {
    .sidebar, .bottom-nav, .top-header, .fab, .no-print {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--gray-500); }

.bg-success-light { background: var(--success-light); }
.bg-danger-light { background: var(--danger-light); }
.bg-warning-light { background: var(--warning-light); }

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

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.p-3 { padding: 12px; }
.p-4 { padding: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-full { width: 100%; }
.flex-1 { flex: 1; }

.hidden { display: none !important; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

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

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.overflow-x-auto { overflow-x: auto; }
.whitespace-nowrap { white-space: nowrap; }

/* Link styles */
.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

.link-danger {
    color: var(--danger);
}
