:root {
    --bg-dark: #090d16;
    --panel-bg: rgba(21, 32, 54, 0.85);
    --sidebar-bg: #0f172a;
    --accent-orange: #f39c12;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --text-light: #f8fafc;
    --border-glass: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Tahoma', 'Cairo', sans-serif;
}

body {
    background: linear-gradient(135deg, #020617, #0f172a);
    color: var(--text-light);
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-box {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 410px;
    text-align: center;
}

.login-logo {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 10px;
}

.login-logo span:first-child { color: var(--accent-cyan); }

.login-subtitle {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 25px;
}

.login-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: rgba(2, 6, 23, 0.7);
    color: #fff;
    font-size: 16px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-left: 1px solid var(--border-glass);
    min-height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar .logo {
    padding: 25px 20px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar .logo span:first-child { color: var(--accent-cyan); }

.user-info {
    padding: 15px 20px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-glass);
    font-size: 13px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    color: #94a3b8;
    text-align: right;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    border-right: 3px solid transparent;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.03);
    color: white;
}

.nav-btn.active {
    background: rgba(6, 182, 212, 0.05);
    border-right-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

#logoutBtn {
    margin: 15px;
    width: calc(100% - 30px);
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* Workspace */
.workspace {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

/* Cards */
.card {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 24px;
    border: 1px solid var(--border-glass);
}

.card-title {
    font-size: 19px;
    font-weight: bold;
    border-right: 4px solid var(--accent-cyan);
    padding-right: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }

/* Forms */
input, select, button {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: rgba(2, 6, 23, 0.7);
    color: #fff;
    font-size: 14px;
    outline: none;
}

input:focus, select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Buttons */
button { cursor: pointer; transition: 0.2s; }
button:hover { opacity: 0.9; transform: scale(1.02); }
button:active { transform: scale(0.98); }

.btn-primary { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.btn-secondary { background: #475569; }
.btn-green { background: var(--accent-green); }
.btn-cyan { background: var(--accent-cyan); }
.btn-orange { background: var(--accent-orange); }
.btn-cam { background: var(--accent-orange); }
.btn-demo { background: rgba(6, 182, 212, 0.2); color: var(--accent-cyan); font-size: 12px; }
.btn-large { padding: 14px; width: 100%; margin-top: 10px; }
.btn-small { padding: 6px 12px; font-size: 12px; }

/* POS Layout */
.pos-row { display: flex; gap: 20px; flex-wrap: wrap; }
.pos-products { flex: 1.7; }
.pos-cart { flex: 1.3; background: rgba(0,0,0,0.3); border-radius: 20px; padding: 20px; }

.search-bar { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.search-bar input { flex: 1; }

.products-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.product-card {
    background: rgba(255,255,255,0.02);
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border-glass);
}

.cart-items { max-height: 300px; overflow-y: auto; margin-bottom: 20px; }
.cart-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-glass); }

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
}

.total-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent-green);
}

.payment-section { margin: 15px 0; padding: 12px; background: rgba(0,0,0,0.2); border-radius: 12px; }

/* Tables */
.table-responsive { overflow-x: auto; margin: 15px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.05); }
th { background: rgba(0,0,0,0.3); color: #94a3b8; font-size: 13px; }

/* Badges */
.badge { background: rgba(6, 182, 212, 0.1); color: var(--accent-cyan); padding: 4px 10px; border-radius: 20px; font-size: 12px; }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #f59e0b; padding: 4px 10px; border-radius: 20px; font-size: 12px; }
.badge-red { background: #ef4444; padding: 5px 12px; border-radius: 20px; font-size: 13px; }

/* Stat Cards */
.stat-card {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
}
.stat-card.green { border: 1px solid rgba(16, 185, 129, 0.2); background: rgba(16, 185, 129, 0.05); }
.stat-card.cyan { border: 1px solid rgba(6, 182, 212, 0.2); background: rgba(6, 182, 212, 0.05); }
.stat-card.orange { border: 1px solid rgba(243, 156, 18, 0.2); background: rgba(243, 156, 18, 0.05); }
.stat-card.red { border: 1px solid rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.05); }
.stat-card h2 { font-size: 28px; margin-top: 8px; }

/* Barcode Preview */
.barcode-preview-card {
    background: white;
    color: black;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    margin: 10px 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--sidebar-bg);
    border-radius: 20px;
    padding: 25px;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: #ef4444;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
}

/* Admin Only Hidden */
.admin-only-hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 100%; position: sticky; top: 0; display: flex; flex-wrap: wrap; padding: 10px; gap: 5px; overflow-x: auto; }
    .sidebar .logo, .sidebar .user-info { display: none; }
    .nav-btn { width: auto; border-radius: 30px; border-right: none; padding: 10px 16px; }
    .workspace { padding: 15px; }
    .pos-row { flex-direction: column; }
    .products-grid { grid-template-columns: 1fr; }
} 