/* ==========================================================================
   Aamdani ERP - Enterprise Application Design System
   Bootstrap 5.3 Extension & Custom Components
   ========================================================================== */

:root {
    --erp-navy: #0f172a;
    --erp-dark-slate: #1e293b;
    --erp-sidebar-bg: #111827;
    --erp-sidebar-hover: #1f2937;
    --erp-sidebar-active: #374151;
    --erp-emerald: #10b981;
    --erp-emerald-hover: #059669;
    --erp-amber: #f59e0b;
    --erp-rose: #f43f5e;
    --erp-blue: #3b82f6;
    --erp-surface-bg: #f8fafc;
    --erp-card-bg: #ffffff;
    --erp-border: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--erp-surface-bg);
    color: #334155;
    min-height: 100vh;
}

/* ==========================================================================
   Navbar & Top Header
   ========================================================================== */
.erp-topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--erp-border);
    height: 64px;
    z-index: 1020;
}

.erp-brand-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
}

.erp-location-pill {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    transition: all 0.15s ease-in-out;
}

.erp-location-pill:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.erp-sidebar {
    width: 260px;
    background-color: var(--erp-sidebar-bg);
    color: #9ca3af;
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.2s ease-in-out;
    border-right: 1px solid #1f2937;
}

.erp-sidebar-header {
    padding: 1rem 1.25rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #6b7280;
}

.erp-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s ease-in-out;
}

.erp-nav-item:hover {
    color: #ffffff;
    background-color: var(--erp-sidebar-hover);
    border-left-color: #9ca3af;
}

.erp-nav-item.active {
    color: #ffffff;
    background-color: var(--erp-sidebar-active);
    border-left-color: var(--erp-emerald);
    font-weight: 600;
}

.erp-nav-item i {
    font-size: 1.15rem;
    margin-right: 0.85rem;
    width: 22px;
    text-align: center;
}

/* Main Content Area */
.erp-main-content {
    margin-left: 260px;
    padding-top: 64px;
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .erp-sidebar {
        transform: translateX(-100%);
    }
    .erp-sidebar.show {
        transform: translateX(0);
    }
    .erp-main-content {
        margin-left: 0;
    }
}

/* ==========================================================================
   Dashboard Metrics Cards
   ========================================================================== */
.erp-metric-card {
    background: #ffffff;
    border: 1px solid var(--erp-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.erp-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.erp-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.erp-metric-icon.icon-emerald { background-color: #ecfdf5; color: var(--erp-emerald); }
.erp-metric-icon.icon-blue { background-color: #eff6ff; color: var(--erp-blue); }
.erp-metric-icon.icon-amber { background-color: #fffbeb; color: var(--erp-amber); }
.erp-metric-icon.icon-rose { background-color: #fff1f2; color: var(--erp-rose); }
.erp-metric-icon.icon-slate { background-color: #f1f5f9; color: #475569; }

.erp-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.erp-metric-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Touch Cashier PIN Keypad
   ========================================================================== */
.erp-pin-pad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 320px;
    margin: 0 auto;
}

.erp-pin-btn {
    height: 64px;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: all 0.1s ease-in-out;
}

.erp-pin-btn:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
}

.erp-pin-btn:active {
    background-color: #cbd5e1;
    transform: scale(0.96);
}

.erp-pin-display {
    height: 56px;
    letter-spacing: 12px;
    font-size: 2rem;
    text-align: center;
    border: 2px solid #cbd5e1;
    border-radius: 0.5rem;
    background-color: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.erp-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.erp-toast {
    pointer-events: auto;
    min-width: 320px;
    max-width: 420px;
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--erp-emerald);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: flex-start;
    animation: slideInRight 0.25s ease-out;
}

.erp-toast.toast-danger { border-left-color: var(--erp-rose); }
.erp-toast.toast-warning { border-left-color: var(--erp-amber); }
.erp-toast.toast-info { border-left-color: var(--erp-blue); }

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