/**
 * ADO GOAT - Livestock Management & Enterprise Finance
 * Ultra-Modern Agriculture UI Design System
 */

:root {
    --primary-green: #064E3B;
    --primary-green-dark: #03281E;
    --primary-green-light: #0D5D3A;
    --primary-green-hover: #083D27;
    --primary-emerald: #10B981;
    --primary-emerald-light: #D1FAE5;
    --accent-gold: #D97706;
    --accent-gold-light: #FEF3C7;
    --dark-charcoal: #0F172A;
    --text-muted: #64748B;
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    --sidebar-width: 260px;
    
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px 0 rgba(15, 23, 42, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    --shadow-md: 0 6px 20px -3px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 16px 36px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 16px 36px -6px rgba(6, 78, 59, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--dark-charcoal);
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* Typography polish */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.025em;
    font-weight: 700;
}

/* ==========================================================================
   Sidebar & Navigation
   ========================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #093720 0%, #052213 100%);
    color: #E2E8F0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #FFFFFF;
    text-decoration: none;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #86EFAC;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #FFFFFF;
}

.brand-subtitle {
    font-size: 0.68rem;
    color: #86EFAC;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.sidebar-menu {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.85rem 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #86EFAC;
    padding: 0.85rem 0.75rem 0.35rem;
    font-weight: 800;
    opacity: 0.8;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    border-radius: 12px;
    margin-bottom: 0.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-icon-box {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar-nav-item:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.sidebar-nav-item:hover .sidebar-icon-box {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.08);
}

.sidebar-nav-item.active {
    color: #FFFFFF;
    background: linear-gradient(90deg, rgba(22, 101, 52, 0.95) 0%, rgba(13, 71, 43, 0.9) 100%);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border-left: 3.5px solid #86EFAC;
}

.sidebar-nav-item.active .sidebar-icon-box {
    background: #FFFFFF !important;
    color: #064E3B !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.sidebar-nav-item.active .sidebar-icon-box i {
    color: #064E3B !important;
}

/* Individual Icon Box Accent Colors */
.icon-box-emerald { color: #34D399; background: rgba(52, 211, 153, 0.15); }
.icon-box-teal    { color: #2DD4BF; background: rgba(45, 212, 191, 0.15); }
.icon-box-cyan    { color: #38BDF8; background: rgba(56, 189, 248, 0.15); }
.icon-box-rose    { color: #FB7185; background: rgba(251, 113, 133, 0.15); }
.icon-box-purple  { color: #C084FC; background: rgba(192, 132, 252, 0.15); }
.icon-box-indigo  { color: #818CF8; background: rgba(129, 140, 248, 0.15); }
.icon-box-amber   { color: #FBBF24; background: rgba(251, 191, 36, 0.15); }
.icon-box-lime    { color: #A3E635; background: rgba(163, 230, 53, 0.15); }
.icon-box-orange  { color: #FB923C; background: rgba(251, 146, 60, 0.15); }
.icon-box-blue    { color: #60A5FA; background: rgba(96, 165, 250, 0.15); }
.icon-box-slate   { color: #94A3B8; background: rgba(148, 163, 184, 0.15); }
.icon-box-gold    { color: #F59E0B; background: rgba(245, 158, 11, 0.18); }

/* Main Layout Wrapper */
.main-layout {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem 2.5rem;
    transition: margin-left 0.3s ease;
}

/* ==========================================================================
   Top Navbar
   ========================================================================== */
.top-navbar {
    height: 72px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-xs);
    position: relative;
    top: auto;
    z-index: 1020;
}

.navbar-search {
    position: relative;
    width: 100%;
}

.navbar-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
    font-size: 0.9rem;
}

.navbar-search input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    font-size: 0.86rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background-color: #F8FAFC;
    color: var(--dark-charcoal);
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-search input:focus {
    background-color: #FFFFFF;
    border-color: #10B981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.nav-user-pill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.75rem 0.35rem 0.45rem;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-user-pill:hover {
    background: #F1F5F9;
    box-shadow: var(--shadow-xs);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0D472B 0%, #166534 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(13, 71, 43, 0.3);
}

/* ==========================================================================
   Cards & UI Components
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stat Cards (Modern White with Vibrant Gradient Icons) */
.stat-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.35rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05), 0 1px 4px -1px rgba(15, 23, 42, 0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -6px rgba(15, 23, 42, 0.1);
    border-color: #CBD5E1;
}

.stat-card-clickable {
    cursor: pointer;
    user-select: none;
}

.stat-card-clickable:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
    transform: translateY(-6px) !important;
}

.stat-card-clickable:active {
    transform: translateY(-2px) scale(0.985) !important;
}

.stat-click-hint {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    opacity: 0.75;
    transition: all 0.2s;
}

.stat-card-clickable:hover .stat-click-hint {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.stat-title {
    font-size: 0.78rem;
    color: #64748B;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 0.65rem;
    word-break: break-word;
}

.stat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

/* Premium Gradient Icon Badges (48px) */
.stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #FFFFFF !important;
    flex-shrink: 0;
    box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08) rotate(3deg);
}

/* Gradients */
.stat-icon-emerald {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    box-shadow: 0 6px 16px -2px rgba(16, 185, 129, 0.35);
}

.stat-icon-blue {
    background: linear-gradient(135deg, #0284C7 0%, #38BDF8 100%);
    box-shadow: 0 6px 16px -2px rgba(2, 132, 199, 0.35);
}

.stat-icon-crimson {
    background: linear-gradient(135deg, #DC2626 0%, #F87171 100%);
    box-shadow: 0 6px 16px -2px rgba(220, 38, 38, 0.35);
}

.stat-icon-amber {
    background: linear-gradient(135deg, #D97706 0%, #FBBF24 100%);
    box-shadow: 0 6px 16px -2px rgba(217, 119, 6, 0.35);
}

.stat-icon-purple {
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    box-shadow: 0 6px 16px -2px rgba(124, 58, 237, 0.35);
}

.stat-icon-teal {
    background: linear-gradient(135deg, #0D9488 0%, #2DD4BF 100%);
    box-shadow: 0 6px 16px -2px rgba(13, 148, 136, 0.35);
}

.stat-icon-rose {
    background: linear-gradient(135deg, #E11D48 0%, #FB7185 100%);
    box-shadow: 0 6px 16px -2px rgba(225, 29, 72, 0.35);
}

.stat-icon-orange {
    background: linear-gradient(135deg, #EA580C 0%, #FB923C 100%);
    box-shadow: 0 6px 16px -2px rgba(234, 88, 12, 0.35);
}

/* ==========================================================================
   Buttons & Form Controls
   ========================================================================== */
.btn {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

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

.btn-forest {
    background: linear-gradient(135deg, #0D472B 0%, #166534 100%);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 2px 8px rgba(13, 71, 43, 0.25);
}

.btn-forest:hover {
    background: linear-gradient(135deg, #08331E 0%, #14532D 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(13, 71, 43, 0.35);
    transform: translateY(-1px);
}

.btn-outline-forest {
    background-color: transparent;
    color: var(--primary-green);
    border: 1.5px solid var(--primary-green);
}

.btn-outline-forest:hover {
    background-color: var(--primary-green);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(13, 71, 43, 0.25);
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-size: 0.86rem;
    color: var(--dark-charcoal);
    background-color: #FFFFFF;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3.5px rgba(16, 185, 129, 0.15);
    outline: none;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.4rem;
}

/* ==========================================================================
   Modern Tables
   ========================================================================== */
.table-custom {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background-color: #F8FAFC;
    color: #64748B;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    border-top: none;
}

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

.table-custom tbody tr:hover {
    background-color: #F1F5F9;
}

.table-custom tbody td {
    padding: 0.95rem 1rem;
    font-size: 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

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

/* Badges & Status Pills */
.badge {
    padding: 0.35rem 0.65rem;
    font-weight: 600;
    font-size: 0.72rem;
    border-radius: 9999px;
    letter-spacing: 0.01em;
}

/* Timeline */
.timeline {
    position: relative;
    border-left: 2px solid #E2E8F0;
    margin-left: 1rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -7px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 0 2px #CBD5E1;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.timeline-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark-charcoal);
}

.timeline-desc {
    font-size: 0.8rem;
    color: #475569;
    margin-top: 0.15rem;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    background: #F1F5F9;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #94A3B8;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-charcoal);
    margin-bottom: 0.35rem;
}

.empty-state-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-layout {
        margin-left: 0;
        padding: 1rem 1rem 2rem;
    }
    
    .sidebar-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: 1030;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

/* ==========================================================================
   DESIGN 1: EMERALD MODERN LIGHT UI/UX ENHANCEMENTS
   ========================================================================== */

/* Hero Welcome Banner (Curved Emerald Gradient) */
.hero-banner-luxury {
    background: linear-gradient(135deg, #064E3B 0%, #0D472B 55%, #15803D 100%);
    border-radius: 20px;
    padding: 1.85rem 2.25rem;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 36px -8px rgba(6, 78, 59, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-banner-luxury .hero-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #FFFFFF;
    margin-bottom: 0.25rem;
}

.hero-banner-luxury .hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    font-weight: 400;
}

.hero-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-action-pill-primary {
    background: #042E1F;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-action-pill-primary:hover {
    background: #021E14;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hero-action-pill-secondary {
    background: #FFFFFF;
    color: #064E3B !important;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hero-action-pill-secondary:hover {
    background: #F8FAFC;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* Luxury White Stat Cards with Sparklines */
.stat-card-luxury {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 18px !important;
    padding: 1.25rem 1.35rem !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04), 0 1px 3px 0 rgba(0, 0, 0, 0.02) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-luxury:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 32px -6px rgba(15, 23, 42, 0.08), 0 0 0 1.5px #10B981 !important;
    border-color: #10B981 !important;
}

.stat-card-luxury.stat-card-clickable {
    cursor: pointer;
    user-select: none;
}

.stat-card-luxury.stat-card-clickable:active {
    transform: translateY(-1px) scale(0.99) !important;
}

.stat-luxury-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.stat-luxury-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #FFFFFF !important;
    box-shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.stat-luxury-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.02em;
}

.stat-pill-emerald {
    background: #D1FAE5;
    color: #065F46;
}

.stat-pill-blue {
    background: #DBEAFE;
    color: #1E40AF;
}

.stat-pill-rose {
    background: #FFE4E6;
    color: #9F1239;
}

.stat-pill-amber {
    background: #FEF3C7;
    color: #92400E;
}

.stat-pill-purple {
    background: #EDE9FE;
    color: #6D28D9;
}

.stat-pill-teal {
    background: #CCFBF1;
    color: #0F766E;
}

.stat-pill-orange {
    background: #FFEDD5;
    color: #C2410C;
}

.stat-luxury-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 0.25rem;
}

.stat-luxury-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.stat-luxury-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid #F1F5F9;
}

.stat-luxury-sub {
    font-size: 0.75rem;
    color: #94A3B8;
    font-weight: 500;
}

.stat-sparkline {
    width: 76px;
    height: 28px;
    display: block;
}

/* Refined Table Styling */
.table-luxury {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
}

.table-luxury thead th {
    background: #F8FAFC;
    color: #64748B;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #E2E8F0;
}

.table-luxury tbody td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.85rem;
}

.table-luxury tbody tr:hover {
    background-color: #F8FAFC;
}

/* ==========================================================================
   POINT OF SALE (POS) & MOBILE RESPONSIVE ENGINE (DESIGN MATCHING MOCKUP)
   ========================================================================== */

.pos-container {
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Category Track (Horizontal Scrollable Icon Cards) */
.pos-categories-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.pos-categories-track::-webkit-scrollbar {
    display: none;
}

.pos-cat-card {
    min-width: 80px;
    height: 84px;
    background: #FFFFFF;
    border-radius: 20px;
    border: 1.5px solid #F1F5F9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    flex-shrink: 0;
}

.pos-cat-card:hover {
    transform: translateY(-2px);
    border-color: #00C48C;
}

.pos-cat-card.active {
    background: #E6FBF5 !important;
    border-color: #00C48C !important;
    box-shadow: 0 4px 14px rgba(0, 196, 140, 0.2) !important;
}

.pos-cat-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #475569;
    margin-bottom: 3px;
    transition: color 0.2s ease;
}

.pos-cat-card.active .pos-cat-icon {
    color: #00875F !important;
}

.pos-cat-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748B;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.pos-cat-card.active .pos-cat-name {
    color: #00875F !important;
    font-weight: 800;
}

/* Special Menu for you: Product Card Grid (Matching Image 1) */
.pos-food-card {
    background: #FFFFFF;
    border-radius: 22px !important;
    border: 1.5px solid #F1F5F9 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.pos-food-card:hover {
    transform: translateY(-4px);
    border-color: #00C48C !important;
    box-shadow: 0 12px 28px -4px rgba(0, 196, 140, 0.18) !important;
}

.pos-food-card.active-selected {
    background: #E6FBF5;
    border-color: #00C48C !important;
    box-shadow: 0 0 0 2px #00C48C !important;
}

.pos-card-avatar-wrapper {
    position: relative;
    width: 82px;
    height: 82px;
    margin: 0 auto 10px;
}

.pos-card-avatar-img,
.pos-card-avatar-placeholder {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 3px solid #FFFFFF;
}

.pos-card-tag-pill {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 99px;
    background: #00C48C;
    color: #FFFFFF;
    padding: 1.5px 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.pos-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.25;
    margin-bottom: 2px;
}

.pos-card-meta {
    font-size: 0.72rem;
    color: #64748B;
    margin-bottom: 6px;
}

.pos-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

/* Big Green + ADD Button (Matching Image 1) */
.btn-pos-add {
    background: #00C48C !important;
    border: none !important;
    border-radius: 99px !important;
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(0, 196, 140, 0.25);
}

.btn-pos-add:hover {
    background: #00A876 !important;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 196, 140, 0.4);
}

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

/* Right Side Order & Checkout Panel (Matching Image 1) */
.pos-order-receipt-card {
    background: #FFFFFF;
    border-radius: 24px !important;
    border: 1.5px solid #F1F5F9 !important;
    box-shadow: 0 8px 30px -4px rgba(15, 23, 42, 0.05) !important;
}

.pos-user-avatar-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.active-order-type {
    background: #E6FBF5 !important;
    color: #00875F !important;
    border: 1px solid #00C48C !important;
    font-weight: 700 !important;
}

.pos-order-item-row {
    padding: 8px 0;
    border-bottom: 1px dashed #F1F5F9;
}

.btn-pos-pill-light {
    background: #E6FBF5;
    color: #00875F;
    border: 1px solid #00C48C;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.btn-pos-pill-light:hover {
    background: #C4F7E8;
    color: #005F43;
}

.btn-pos-pill-orange {
    background: #F97316;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.btn-pos-pill-orange:hover {
    background: #EA580C;
    color: #FFFFFF;
}

/* Big Bright Green Full-Width Charge Button */
.btn-pos-charge {
    background: #00C48C !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 16px !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    box-shadow: 0 8px 24px -2px rgba(0, 196, 140, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pos-charge:hover:not(:disabled) {
    background: #00A876 !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 196, 140, 0.5) !important;
}

.btn-pos-charge:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-pos-charge:disabled {
    background: #CBD5E1 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-xs {
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
}

.form-control-xs {
    height: 24px;
    font-size: 0.8rem;
}

/* Payment Method Buttons */
.payment-method-btn {
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #475569;
    transition: all 0.15s ease;
}

.payment-method-btn.active {
    background: #E6FBF5 !important;
    color: #00875F !important;
    border-color: #00C48C !important;
    font-weight: 700;
}

/* Receipt Paper Mockup in Modal */
.receipt-paper {
    font-family: 'Courier New', Courier, monospace;
    color: #111827;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS ENHANCEMENTS
   ========================================================================== */

/* Desktop (>= 992px): Both Catalog & Cart Columns Always Visible Side-by-Side */
@media (min-width: 992px) {
    #posCatalogCol {
        display: block !important;
    }
    #posCartCol {
        display: block !important;
    }
    .pos-order-receipt-card {
        position: sticky;
        top: 85px;
    }
}

/* Tablets & Mobile Screens (< 992px) */
@media (max-width: 991.98px) {
    body.pos-mobile-cart-active #posCatalogCol {
        display: none !important;
    }
    body.pos-mobile-cart-active #posCartCol {
        display: block !important;
    }
    body:not(.pos-mobile-cart-active) #posCartCol {
        display: none !important;
    }
    body:not(.pos-mobile-cart-active) #posCatalogCol {
        display: block !important;
    }

    .main-layout {
        margin-left: 0 !important;
        padding: 0.85rem 0.85rem 5rem !important; /* Extra bottom padding for mobile bar */
    }

    .top-navbar {
        padding: 0.65rem 0.85rem !important;
        border-radius: 12px !important;
        margin-bottom: 1rem !important;
    }

    /* POS Mobile Tweaks */
    .pos-checkout-panel {
        margin-top: 0.5rem;
    }

    .pos-catalog-grid {
        max-height: calc(100vh - 280px) !important;
    }

    /* Floating Chat Widget position adjustment on mobile */
    .chat-floating-button {
        bottom: 75px !important;
        right: 15px !important;
    }
}

/* Small Phones (< 768px) */
@media (max-width: 767.98px) {
    body {
        font-size: 0.88rem;
    }

    .main-layout {
        padding: 0.65rem 0.65rem 5.5rem !important;
    }

    /* Page title & action buttons wrapping */
    .d-flex.flex-column.flex-md-row.justify-content-between.align-items-md-center {
        gap: 0.75rem !important;
    }

    /* Data Tables Horizontal Momentum Scroll */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        margin-bottom: 0.5rem;
        border-radius: 12px;
    }

    .table thead th, 
    .table tbody td {
        white-space: nowrap;
        padding: 0.65rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Modal dialog full width on phone */
    .modal-dialog {
        margin: 0.75rem;
    }

    /* POS Item Card Layout on phone */
    .pos-item-card .pos-item-img {
        width: 50px !important;
        height: 50px !important;
    }

    .pos-item-card .pos-item-img img,
    .pos-item-card .pos-item-img div {
        width: 50px !important;
        height: 50px !important;
    }

    .pos-item-card {
        padding: 0.65rem !important;
    }

    /* Form rows stacking */
    .row.g-3 > div,
    .row.g-2 > div {
        margin-bottom: 0.25rem;
    }

    /* Hero banners */
    .hero-banner-luxury {
        padding: 1.25rem 1.25rem !important;
        border-radius: 16px !important;
    }

    .hero-banner-luxury .hero-title {
        font-size: 1.25rem !important;
    }
}

/* Extra Small Phones (< 480px) */
@media (max-width: 479.98px) {
    .nav-user-pill {
        padding: 3px 6px !important;
    }

    .nav-user-avatar {
        width: 30px !important;
        height: 30px !important;
    }

    .pos-header-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .pos-header h4 {
        font-size: 1.1rem !important;
    }
}