/* ============================================
   SHEHU DOGO International Limited
   Premium Inventory Management System Styles
   ============================================ */

/* ---- CSS Variables (Logo Color Scheme) ---- */
:root {
    /* Primary: Rich Gold from logo */
    --primary: #C8A45C;
    --primary-light: #DBC07A;
    --primary-dark: #A6883E;
    --primary-rgb: 200, 164, 92;

    /* Secondary: Deep Teal */
    --secondary: #0D7377;
    --secondary-light: #14919A;
    --secondary-dark: #095C5F;
    --secondary-rgb: 13, 115, 119;

    /* Accent Colors from Logo */
    --accent-red: #C41E3A;
    --accent-green: #2D8C3F;
    --accent-purple: #6B2D90;
    --accent-blue: #2E5090;

    /* Sidebar - Dark Premium */
    --sidebar-bg: #1A1A2E;
    --sidebar-dark: #16213E;
    --sidebar-hover: #252547;
    --sidebar-active: rgba(200, 164, 92, 0.15);
    --sidebar-text: #A0A3BD;
    --sidebar-text-active: #C8A45C;
    --sidebar-width: 270px;
    --sidebar-collapsed: 70px;

    /* Content */
    --content-bg: #F4F5FA;
    --card-bg: #FFFFFF;
    --card-border: #E8EAF0;
    --text-primary: #2D2D3A;
    --text-secondary: #6B6B80;
    --text-muted: #9A9AAF;

    /* Semantic Colors */
    --success: #2D8C3F;
    --success-bg: #E8F5EC;
    --danger: #C41E3A;
    --danger-bg: #FDE8EC;
    --warning: #D4A017;
    --warning-bg: #FDF5E1;
    --info: #2E5090;
    --info-bg: #E8EDF5;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-gold: 0 4px 16px rgba(200, 164, 92, 0.25);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--content-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 164, 92, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(200, 164, 92, 0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.animate-fadeIn { animation: fadeIn 0.5s ease-out forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.5s ease-out forwards; }
.animate-fadeInRight { animation: fadeInRight 0.5s ease-out forwards; }
.animate-slideUp { animation: slideUp 0.6s ease-out forwards; }

/* Staggered animations */
.stat-card:nth-child(1) { animation: slideUp 0.5s ease-out 0.05s both; }
.stat-card:nth-child(2) { animation: slideUp 0.5s ease-out 0.1s both; }
.stat-card:nth-child(3) { animation: slideUp 0.5s ease-out 0.15s both; }
.stat-card:nth-child(4) { animation: slideUp 0.5s ease-out 0.2s both; }
.stat-card:nth-child(5) { animation: slideUp 0.5s ease-out 0.25s both; }
.stat-card:nth-child(6) { animation: slideUp 0.5s ease-out 0.3s both; }

.data-table tbody tr { animation: fadeIn 0.3s ease-out forwards; }
.data-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.04s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.06s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.08s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.1s; }
.data-table tbody tr:nth-child(6) { animation-delay: 0.12s; }
.data-table tbody tr:nth-child(7) { animation-delay: 0.14s; }
.data-table tbody tr:nth-child(8) { animation-delay: 0.16s; }
.data-table tbody tr:nth-child(9) { animation-delay: 0.18s; }
.data-table tbody tr:nth-child(10) { animation-delay: 0.2s; }

.card { animation: fadeIn 0.5s ease-out forwards; }
.item-row { animation: fadeIn 0.3s ease-out forwards; }
.empty-state { animation: fadeIn 0.5s ease-out forwards; }
.alert { animation: slideUp 0.4s ease-out forwards; }
.breadcrumb { animation: fadeIn 0.4s ease-out forwards; }
.btn { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.nav-item { transition: all 0.25s ease; }
.stat-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.action-btn { transition: all 0.2s ease; }
.action-btn:hover { transform: scale(1.1); }
.form-control { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.data-table tbody tr { transition: background 0.2s ease; }
.data-table tbody tr:hover { background: var(--table-hover); }
.animate-scaleIn { animation: scaleIn 0.4s ease-out forwards; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-dark) 100%);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 4px;
}

/* Logo Area */
.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.sidebar-brand img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 0 12px rgba(200, 164, 92, 0.3);
    transition: var(--transition);
}

.sidebar-brand:hover img {
    transform: rotate(10deg) scale(1.05);
    box-shadow: 0 0 20px rgba(200, 164, 92, 0.5);
}

.brand-text {
    margin-left: 14px;
    overflow: hidden;
}

.brand-text h1 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.brand-text span {
    font-size: 0.65rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* New Sidebar Header (for updated header.php) */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
    flex-shrink: 0;
    gap: 12px;
}

.sidebar-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 0 6px rgba(200, 164, 92, 0.2);
    flex-shrink: 0;
}

.sidebar-title {
    min-width: 0;
    overflow: hidden;
}

.sidebar-title h1 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-title p {
    font-size: 0.6rem;
    color: var(--primary);
    opacity: 0.8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 1px;
}

/* User Profile in Sidebar */
.sidebar-user {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    margin-left: 12px;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-section {
    padding: 0 24px;
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    margin: 2px 12px;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.nav-item i {
    width: 24px;
    font-size: 1.1rem;
    text-align: center;
    margin-right: 14px;
    transition: var(--transition);
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.nav-item.active .nav-badge {
    background: var(--accent-red);
    color: #fff;
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-footer a:hover {
    background: rgba(196, 30, 58, 0.15);
    color: #ff6b7a;
}

.sidebar-footer a i {
    width: 24px;
    margin-right: 14px;
}

/* ---- Main Content ---- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* Top Header */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.header-title span {
    color: var(--primary);
}

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

.header-breadcrumb a {
    color: var(--secondary);
    transition: var(--transition);
}

.header-breadcrumb a:hover {
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-search {
    position: relative;
}

.header-search input {
    background: var(--content-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 10px 16px 10px 40px;
    width: 280px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.15);
    width: 320px;
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--content-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.header-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.header-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Content Body */
.content-body {
    padding: 28px;
}

/* ---- Cards ---- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease-out forwards;
    min-width: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card.gold::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.teal::before { background: linear-gradient(90deg, var(--secondary), var(--secondary-light)); }
.stat-card.red::before { background: linear-gradient(90deg, var(--accent-red), #e05060); }
.stat-card.green::before { background: linear-gradient(90deg, var(--accent-green), #4CAF50); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--accent-purple), #9B59B6); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--accent-blue), #4A90D9); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.stat-card.gold .stat-icon { background: rgba(200, 164, 92, 0.12); color: var(--primary); }
.stat-card.teal .stat-icon { background: rgba(13, 115, 119, 0.12); color: var(--secondary); }
.stat-card.red .stat-icon { background: rgba(196, 30, 58, 0.12); color: var(--accent-red); }
.stat-card.green .stat-icon { background: rgba(45, 140, 63, 0.12); color: var(--accent-green); }
.stat-card.purple .stat-icon { background: rgba(107, 45, 144, 0.12); color: var(--accent-purple); }
.stat-card.blue .stat-icon { background: rgba(46, 80, 144, 0.12); color: var(--accent-blue); }

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.15;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-change.up { background: var(--success-bg); color: var(--success); }
.stat-change.down { background: var(--danger-bg); color: var(--danger); }

/* Card entrance animation - only animation properties */
.stat-card {
    animation: slideUp 0.5s ease-out forwards;
    animation-fill-mode: both;
}

/* Shimmer effect on hover */
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.8s ease;
}

.stat-card:hover::after {
    left: 100%;
}

/* ---- Tables ---- */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

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

.data-table thead th {
    background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-dark));
    color: #fff;
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition);
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
}

.data-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.04s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.06s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.08s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.1s; }
.data-table tbody tr:nth-child(6) { animation-delay: 0.12s; }
.data-table tbody tr:nth-child(7) { animation-delay: 0.14s; }
.data-table tbody tr:nth-child(8) { animation-delay: 0.16s; }
.data-table tbody tr:nth-child(9) { animation-delay: 0.18s; }
.data-table tbody tr:nth-child(10) { animation-delay: 0.2s; }

.data-table tbody tr:hover {
    background: rgba(200, 164, 92, 0.04);
}

.data-table tbody td {
    padding: 14px 20px;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody td.text-muted {
    color: var(--text-muted);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.btn-primary:hover {
    box-shadow: var(--shadow-gold);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #249A38);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #A01830);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #B8941D);
    color: #fff;
}

.btn-info {
    background: linear-gradient(135deg, var(--accent-blue), #1E4080);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--card-border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.btn-group {
    display: flex;
    gap: 8px;
}

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

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

.form-label .required {
    color: var(--accent-red);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--card-bg);
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(200, 164, 92, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B80' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ---- Alerts ---- */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeIn 0.4s ease-out;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(45, 140, 63, 0.2);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(196, 30, 58, 0.2);
}

.alert-warning {
    background: var(--warning-bg);
    color: #8B6914;
    border: 1px solid rgba(212, 160, 23, 0.2);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(46, 80, 144, 0.2);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    color: inherit;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: #8B6914; }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: rgba(200, 164, 92, 0.12); color: var(--primary-dark); }
.badge-secondary { background: rgba(13, 115, 119, 0.12); color: var(--secondary); }

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    justify-content: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-ellipsis {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease-out;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(200, 164, 92, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary);
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---- Action Buttons in Table ---- */
.action-btns {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn.view { background: rgba(46, 80, 144, 0.1); color: var(--accent-blue); }
.action-btn.view:hover { background: var(--accent-blue); color: #fff; }

.action-btn.edit { background: rgba(212, 160, 23, 0.1); color: var(--warning); }
.action-btn.edit:hover { background: var(--warning); color: #fff; }

.action-btn.delete { background: rgba(196, 30, 58, 0.1); color: var(--accent-red); }
.action-btn.delete:hover { background: var(--accent-red); color: #fff; }

.action-btn.print { background: rgba(45, 140, 63, 0.1); color: var(--accent-green); }
.action-btn.print:hover { background: var(--accent-green); color: #fff; }

.action-btn.qr { background: rgba(107, 45, 144, 0.1); color: var(--accent-purple); }
.action-btn.qr:hover { background: var(--accent-purple); color: #fff; }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s ease-out;
}

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent-red);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--card-border);
    background: var(--content-bg);
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--content-bg);
    padding: 6px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    width: fit-content;
}

.tab {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.5);
}

.tab.active {
    background: var(--card-bg);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* ---- QR Code Display ---- */
.qr-display {
    text-align: center;
    padding: 24px;
}

.qr-display img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.qr-display .qr-ref {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* ---- Print Receipt ---- */
.receipt {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
}

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px dashed #ddd;
}

.receipt-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.receipt-header h2 {
    font-size: 1rem;
    color: var(--text-primary);
}

.receipt-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.receipt-row.total {
    border-top: 2px solid #333;
    margin-top: 10px;
    padding-top: 10px;
    font-weight: 700;
    font-size: 1rem;
}

.receipt-footer {
    margin-top: 20px;
    text-align: center;
    padding-top: 16px;
    border-top: 2px dashed #ddd;
}

.receipt-footer img {
    margin: 10px auto;
}

@media print {
    body * { visibility: hidden; }
    .receipt, .receipt * { visibility: visible; }
    .receipt { position: absolute; left: 50%; transform: translateX(-50%); top: 0; }
}

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--content-bg);
    border-radius: var(--radius-md);
}

.filter-bar .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 160px;
}

/* ---- Search Box ---- */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(200, 164, 92, 0.1);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ---- Statement Table ---- */
.statement-table th,
.statement-table td {
    font-size: 0.85rem;
}

.statement-credit { color: var(--accent-green); font-weight: 600; }
.statement-debit { color: var(--accent-red); font-weight: 600; }
.statement-balance { font-weight: 700; color: var(--text-primary); }

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sidebar-bg), var(--sidebar-dark));
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(200, 164, 92, 0.08), transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(13, 115, 119, 0.06), transparent 70%);
    animation: float 8s ease-in-out infinite reverse;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    position: relative;
    z-index: 1;
    animation: scaleIn 0.5s ease-out;
}

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

.login-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(200, 164, 92, 0.3);
    margin-bottom: 16px;
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.login-logo span {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- Grid Layouts ---- */
.form-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.form-grid-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ---- Select2 Styling - Black text on light dropdown ---- */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 44px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: var(--content-bg);
    color: var(--text-primary);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
    padding-left: 14px;
    color: var(--text-primary);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
}

/* Dropdown - white background with BLACK text */
.select2-dropdown {
    background: #ffffff !important;
    border: 1px solid #d0d4dc !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
    z-index: 9999 !important;
    color: #1a1a2e !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.select2-container--open {
    z-index: 9999 !important;
}

/* Options - BLACK text on white */
.select2-results__option {
    padding: 10px 14px !important;
    color: #1a1a2e !important;
    font-size: 0.88rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.select2-results__option:last-child {
    border-bottom: none !important;
}

/* Highlighted option */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #0D7377 !important;
    color: #ffffff !important;
}

/* Selected option */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background: #e8f4f4 !important;
    color: #0D7377 !important;
    font-weight: 600 !important;
}

/* Search field */
.select2-search--dropdown .select2-search__field {
    background: #f8f9fa !important;
    border: 1px solid #d0d4dc !important;
    color: #1a1a2e !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 0.88rem !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #0D7377 !important;
    outline: none !important;
}

/* ---- Currency Input Styling ---- */
.currency-input {
    font-family: 'Segoe UI', monospace;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ---- Select2 Product Option Styling ---- */
.select2-product-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select2-product-option img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex !important;
    }

    .stat-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .form-grid-2-1,
    .form-grid-1-2 {
        grid-template-columns: 1fr;
    }

    .form-grid-1-1 {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid-auto {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .content-body {
        padding: 16px;
    }

    .header-title {
        font-size: 1.1rem;
    }

    .header-search {
        display: none;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }

    .form-grid-2-1,
    .form-grid-1-1,
    .form-grid-1-2,
    .form-grid-3,
    .form-grid-auto {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar .form-group {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 10px 12px;
    }

    .data-table tbody td {
        white-space: nowrap;
    }

    .login-card {
        padding: 24px;
        margin: 16px;
    }

    .modal {
        width: 95%;
        max-width: 95%;
    }

    .top-header {
        padding: 12px 16px;
    }

    .header-right {
        gap: 8px;
    }

    .action-btns {
        flex-wrap: wrap;
    }

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

    /* Order page mobile */
    .order-item-grid {
        grid-template-columns: 1fr !important;
    }

    .order-item-grid > div:first-child {
        display: none;
    }

    /* Purchase item rows mobile */
    .item-row > div[style*="grid-template-columns:auto"] {
        grid-template-columns: 1fr 1fr !important;
    }

    .item-row > div[style*="grid-template-columns:auto"] > div:first-child {
        display: none;
    }

    .item-row {
        padding: 12px !important;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .order-layout-grid {
        grid-template-columns: 1fr !important;
    }

    .transfer-layout-grid {
        grid-template-columns: 1fr !important;
    }

    /* Better card padding on mobile */
    .card-body {
        padding: 16px;
    }

    /* Table horizontal scroll container */
    .table-container {
        margin: 0 -16px;
        padding: 0 16px;
        width: calc(100% + 32px);
    }

    /* User info hide name on small mobile */
    .user-details {
        display: none;
    }

    /* Top header adjustments */
    .top-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    /* Receipt print mobile */
    .receipt {
        padding: 16px;
    }

    /* Form group spacing */
    .form-group {
        margin-bottom: 14px;
    }

    /* Modal mobile */
    .modal-header {
        padding: 14px 18px;
    }

    .modal-body {
        padding: 14px 18px;
    }

    .modal-footer {
        padding: 14px 18px;
    }

    /* Stat card icon smaller */
    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .content-body {
        padding: 10px;
    }

    .card {
        border-radius: 10px;
    }

    .card-header {
        padding: 14px 16px;
    }

    .card-body {
        padding: 12px;
    }

    .top-header {
        padding: 10px 12px;
    }

    .header-title {
        font-size: 1rem;
    }

    .btn {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-cards {
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }
}

/* Mobile toggle button */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1101;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    padding: 0;
}

/* Overlay for mobile sidebar */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* ---- Utilities ---- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.ms-auto { margin-left: auto; }
.w-100 { width: 100%; }

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--content-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
