/* DOSH LOUNGE POS - Main Stylesheet */

:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --gold: #f5a623;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --white: #ffffff;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 12px;
    padding: 40px 35px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

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

.login-logo h1 {
    font-size: 32px;
    color: var(--primary);
    letter-spacing: 2px;
}

.login-logo h1 span {
    color: var(--gold);
}

.login-logo p {
    color: var(--gray);
    font-size: 14px;
    margin-top: 5px;
}

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

.login-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.login-box .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.login-box .form-control:focus {
    outline: none;
    border-color: var(--gold);
}

.login-box .btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--gold);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.login-box .btn-primary:hover {
    background: #e09a15;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 166, 35, 0.3);
}

.login-error {
    background: #fde8e8;
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: var(--white);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform 0.3s;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 22px;
    letter-spacing: 2px;
}

.sidebar-header h2 span {
    color: var(--gold);
}

.sidebar-header .user-info {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 5px;
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-nav .nav-section {
    padding: 10px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-left-color: var(--gold);
}

.sidebar-nav a .nav-icon {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-nav a .nav-text {
    flex: 1;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 20px 30px;
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e1e1;
}

.page-header h1 {
    font-size: 24px;
    color: var(--primary);
}

.page-header .header-actions {
    display: flex;
    gap: 10px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    background: #fafafa;
    border-bottom: 1px solid #e1e1e1;
    font-weight: 600;
    font-size: 16px;
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

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

.stat-card {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 15px;
}

.stat-icon.gold { background: rgba(245, 166, 35, 0.15); }
.stat-icon.blue { background: rgba(52, 152, 219, 0.15); }
.stat-icon.green { background: rgba(46, 204, 113, 0.15); }
.stat-icon.red { background: rgba(231, 76, 60, 0.15); }

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-info p {
    font-size: 13px;
    color: var(--gray);
    margin-top: 2px;
}

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

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

table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e1e1e1;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

table tr:hover {
    background: #f8f9fa;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    line-height: 1;
}

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

.btn-primary:hover {
    background: #e09a15;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

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

.btn-success:hover {
    background: #27ae60;
}

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

.btn-danger:hover {
    background: #c0392b;
}

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

.btn-info:hover {
    background: #2980b9;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
}

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

select.form-control {
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 35px;
}

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

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

.pos-products {
    overflow-y: auto;
    padding-right: 10px;
}

.pos-cart {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.pos-cart-header {
    padding: 15px 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-cart-header h3 {
    font-size: 16px;
}

.pos-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.pos-cart-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 2px solid #e1e1e1;
    border-radius: 0 0 10px 10px;
}

.pos-cart-total {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
    margin-bottom: 15px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.product-card {
    background: var(--white);
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.product-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card .product-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.product-card .product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.product-card .product-price {
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
    margin-top: 4px;
}

.product-card .product-stock {
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

.product-card.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Search Bar */
.search-bar {
    position: relative;
    margin-bottom: 15px;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--gold);
}

.search-bar .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--gray);
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
}

.cart-item-meta {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 15px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e1e1e1;
    background: var(--white);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-item-qty button:hover {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.cart-item-qty span {
    font-size: 16px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-total {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    min-width: 70px;
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
    margin-left: 10px;
}

/* Price Type Selector */
.price-type-selector {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.price-type-btn {
    padding: 3px 10px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    background: var(--white);
    transition: all 0.2s;
    font-weight: 600;
}

.price-type-btn.active {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.price-type-btn:hover:not(.active) {
    border-color: var(--gold);
}

/* Checkout Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

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

.modal {
    background: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Receipt Print */
.receipt {
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Courier New', monospace;
    background: var(--white);
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
}

.receipt-header h2 {
    font-size: 20px;
    letter-spacing: 2px;
}

.receipt-header p {
    font-size: 12px;
    margin: 3px 0;
}

.receipt-items {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.receipt-items th,
.receipt-items td {
    padding: 5px;
    font-size: 12px;
    text-align: left;
    border-bottom: 1px dashed #ccc;
}

.receipt-items th:last-child,
.receipt-items td:last-child {
    text-align: right;
}

.receipt-total {
    text-align: right;
    font-size: 16px;
    margin: 10px 0;
}

.receipt-payment {
    margin: 10px 0;
}

.receipt-payment p {
    font-size: 12px;
    margin: 3px 0;
}

.receipt-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
}

@media print {
    body * {
        visibility: hidden;
    }
    .receipt, .receipt * {
        visibility: visible;
    }
    .receipt {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        max-width: 300px;
    }
}

/* Dashboard Widgets */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.widget {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
}

.widget h3 {
    font-size: 14px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.widget .big-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .pos-cart {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        max-height: 50vh;
        border-radius: 15px 15px 0 0;
        box-shadow: 0 -5px 30px rgba(0,0,0,0.15);
    }
    
    .pos-cart-header {
        border-radius: 15px 15px 0 0;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    
    .page-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: inline-block;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-gold { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--gray); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.d-flex { display: flex; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}
