/* assets/css/style.css */
:root {
    --primary-color: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
    --success: #22c55e;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

/* Login Page Specific */
.login-bg {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.login-container {
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.login-container .subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

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

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

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

.btn-block {
    width: 100%;
    display: block;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert.error {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    color: #fca5a5;
}

.alert.success {
    background-color: rgba(34, 197, 94, 0.2);
    border: 1px solid var(--success);
    color: #86efac;
}

/* App Layout */
.app-bg {
    display: flex;
    background: #0f172a;
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 0;
    border-right: 1px solid var(--border-color);
    border-top: none;
    border-bottom: none;
    border-left: none;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 24px;
    color: white;
}
.sidebar-header h2 span {
    color: var(--primary-color);
}
.user-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.nav-links {
    list-style: none;
    padding: 0 10px;
}

.nav-links li {
    margin-bottom: 5px;
}

.nav-links a {
    display: block;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.nav-links a.logout-btn {
    color: #fca5a5;
    margin-top: auto;
}
.nav-links a.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.main-content {
    margin-left: 260px;
    padding: 30px;
    width: calc(100% - 260px);
}

/* Dashboard & Cards */
.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 28px;
}

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

.stat-card {
    padding: 20px;
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

td {
    font-size: 14px;
}

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

.pos-products, .pos-cart {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.pos-search {
    margin-bottom: 20px;
}

.pos-cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.pos-cart-totals {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}
.total-row.grand-total {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}
