/* Custom Professional Admin Dashboard Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --dark-bg: #0f172a;
    --card-bg-light: #ffffff;
    --card-bg-dark: #1e293b;
    --body-bg-light: #f8fafc;
    --body-bg-dark: #0b0f19;
    --text-light: #0f172a;
    --text-dark: #f8fafc;
    --border-light: #e2e8f0;
    --border-dark: #334155;
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--body-bg-light);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Dark Mode Overrides */
body.dark-mode {
    background-color: var(--body-bg-dark);
    color: var(--text-dark);
}

body.dark-mode .card {
    background-color: var(--card-bg-dark);
    border-color: var(--border-dark);
}

body.dark-mode .sidebar {
    background-color: #111827;
    border-right-color: var(--border-dark);
}

body.dark-mode .navbar-main {
    background-color: var(--card-bg-dark);
    border-bottom-color: var(--border-dark);
}

body.dark-mode .table {
    color: var(--text-dark);
}

body.dark-mode .table th, body.dark-mode .table td {
    border-color: var(--border-dark);
}

body.dark-mode .modal-content {
    background-color: var(--card-bg-dark);
    border-color: var(--border-dark);
    color: var(--text-dark);
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background-color: #1e1b4b; /* Deep Indigo Brand color */
    color: #ffffff;
    transition: all var(--transition-speed) ease;
    border-right: 1px solid var(--border-light);
    z-index: 1000;
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    max-height: 40px;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-menu li {
    padding: 2px 15px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-menu a i {
    margin-right: 12px;
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sidebar-menu li.active a {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Main Content Area */
.content-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-speed) ease;
}

/* Navbar */
.navbar-main {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-light);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 99;
}

.toggle-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--secondary-color);
}

/* Cards & Statistics */
.card {
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-stat {
    position: relative;
    padding: 24px;
}

.card-stat .stat-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2.5rem;
    opacity: 0.2;
    transition: all 0.3s ease;
}

.card-stat:hover .stat-icon {
    transform: scale(1.15);
    opacity: 0.45;
}

/* POS Screen */
.pos-container {
    height: calc(100vh - 150px);
    overflow: hidden;
}

.pos-cart-panel {
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid var(--border-light);
}

.pos-products-panel {
    height: 100%;
    overflow-y: auto;
}

/* Login Page Custom Style */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #4f46e5, #0b0f19);
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
    padding: 40px;
}

body.dark-mode .login-card {
    background: rgba(30, 41, 59, 0.95);
}

/* Badge colors */
.bg-light-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.bg-light-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.bg-light-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.bg-light-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #475569;
}

/* POS Grid Items */
.pos-product-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.pos-product-card:hover {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.05);
}

/* Floating toasts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
}
