/* Air Connect Ltd. - ERP & Accounting Custom Styles */

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

:root {
    --primary: #c02026;
    --primary-dark: #a51a20;
    --primary-light: #fef2f2;
    --primary-border: #fca5a5;
    --secondary: #111827;
    --accent: #c02026;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --surface: #ffffff;
    --background: #f9fafb;
    --border: #e5e7eb;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: #111827;
    -webkit-font-smoothing: antialiased;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f3f4f6;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Glass & Card Effects */
.card-shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

.card-shadow-hover {
    transition: all 0.2s ease-in-out;
}
.card-shadow-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(192, 32, 38, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
}

/* Brand KPI Card Gradients */
.kpi-red {
    background: linear-gradient(135deg, #c02026 0%, #a51a20 100%);
}
.kpi-dark {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}
.kpi-emerald {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}
.kpi-amber {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Active Navigation Highlight */
.nav-item.active {
    background-color: #fef2f2;
    color: #c02026;
    font-weight: 600;
    border-left: 3px solid #c02026;
}

.nav-item {
    transition: all 0.15s ease-in-out;
    border-left: 3px solid transparent;
}
.nav-item:hover:not(.active) {
    background-color: #f9fafb;
    color: #111827;
}

/* Data Tables */
.table-compact th {
    padding: 0.65rem 0.85rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #4b5563;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.table-compact td {
    padding: 0.75rem 0.85rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.table-compact tr:hover td {
    background-color: #fef2f2 / 30%;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-brand { background-color: #fef2f2; color: #c02026; border: 1px solid #fee2e2; }
.badge-success { background-color: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.badge-warning { background-color: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }
.badge-danger { background-color: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.badge-info { background-color: #fef2f2; color: #c02026; border: 1px solid #fee2e2; }
.badge-neutral { background-color: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }

/* Modals */
.modal-backdrop {
    background-color: rgba(17, 24, 39, 0.65);
    backdrop-filter: blur(2px);
}

/* Operator RBAC - Hide Admin Only elements */
body.role-operator .admin-only {
    display: none !important;
}

/* Print Stylesheet for Invoices & Vouchers */
@media print {
    body * {
        visibility: hidden;
    }
    #printSection, #printSection * {
        visibility: visible;
    }
    #printSection {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        margin: 0;
        padding: 20px;
    }
    .no-print {
        display: none !important;
    }
}

/* Mobile Responsive Enhancements */
@media (max-width: 1023px) {
    #sidebar_nav {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    #sidebar_overlay {
        transition: opacity 0.3s ease-in-out;
    }

    .table-compact th, .table-compact td {
        white-space: nowrap;
    }

    /* Prevent text overflowing in small screen headers */
    .app-brand-name {
        max-width: 160px;
    }

    .view-panel {
        width: 100%;
        max-width: 100%;
    }
}

/* Smooth touch scrolling for tables */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

/* Responsive Modals on Mobile */
@media (max-width: 640px) {
    .modal-backdrop > div {
        max-height: 94vh !important;
        margin: auto !important;
        width: 95% !important;
    }
}

