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

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #10B981;
    --accent-color: #F43F5E;
    
    --bg-color: #0F172A;
    --surface-color: #1E293B;
    --surface-light: #334155;
    --border-color: #334155;
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color) !important;
    color: var(--text-main) !important;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.brand {
    padding: 24px;
    font-size: 24px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.brand span {
    color: var(--text-main);
}

.nav-links {
    list-style: none;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-links li a i {
    font-size: 20px;
}

.user-profile {
    margin-top: auto;
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.top-header {
    height: 80px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Dashboard Cards */
.page-container {
    padding: 32px;
    animation: fadeIn 0.4s ease forwards;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s;
}

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

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.metric-card.success .metric-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.metric-card.danger .metric-icon {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-color);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

.gradient-text {
    background: linear-gradient(135deg, #818CF8, #C084FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* POS Specific Layout */
.pos-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    height: calc(100vh - 144px);
}

.xcrud-wrapper {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* Split Login Screen */
.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.login-left {
    background: linear-gradient(135deg, var(--bg-color), #231d5b);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    filter: blur(150px);
    border-radius: 50%;
    opacity: 0.15;
    z-index: 0;
}

.login-right {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--surface-color);
    padding: 48px;
}

.login-box {
    width: 100%;
    max-width: 440px;
    z-index: 1;
}

/* XCRUD Dark Mode Overrides */
.xcrud-wrapper h1, 
.xcrud-wrapper h2, 
.xcrud-wrapper h3, 
.xcrud-wrapper h4, 
.xcrud-wrapper table th,
.xcrud-wrapper table td,
.xcrud-wrapper label,
.xcrud-wrapper .xcrud-list-container,
.xcrud-wrapper .xcrud-details-container {
    color: var(--text-main) !important;
}

/* Force White Font across all record tables - AGGRESSIVE */
.xcrud-wrapper .xcrud-list table tbody tr td,
.xcrud-wrapper .xcrud-list table tbody tr td *,
.xcrud-wrapper .xcrud-details table tbody tr td,
.xcrud-wrapper .xcrud-details table tbody tr td *,
.xcrud-list-container table tbody tr td,
.xcrud-list-container table tbody tr td a,
.xcrud-list-container table tbody tr td span,
.xcrud-details-container table tbody tr td,
.xcrud-data,
.xcrud-data * {
    color: #FFFFFF !important;
}

.xcrud-wrapper table th,
.xcrud-list thead th {
    background-color: var(--bg-color) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

.xcrud-wrapper .table-striped tbody tr:nth-of-type(odd),
.xcrud-list .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05) !important;
}


