:root {
    --primary-color: #0b1d3a;
    --accent-color: #0056b3;
    --bg-color: #f4f6f9;
    --sidebar-width: 220px;
    --danger-color: #dc3545;
    --success-color: #28a745;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: #333;
    height: 100vh;
    overflow: hidden;
}

#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0b1d3a, #1a365d);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    text-align: center;
    width: 350px;
}

.login-card h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.login-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.login-card button:hover {
    background-color: #004085;
}

.error-msg {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

#app-container {
    display: none;
    height: 100vh;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 80px 1fr;
    grid-template-areas: 
        "sidebar header"
        "sidebar main";
}

header {
    grid-area: header;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.action-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #555;
}

.action-icon-btn span.icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

aside {
    grid-area: sidebar;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
}

.brand-box {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: #061124;
}

.brand-box h1 {
    font-size: 13px;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

.brand-box img {
    width: 45px;
    height: auto;
}

.nav-links {
    list-style: none;
    padding: 15px 0;
}

.nav-links li {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: background 0.2s;
}

.nav-links li:hover, .nav-links li.active {
    background-color: var(--accent-color);
}

main {
    grid-area: main;
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

.view-section {
    display: none;
    height: 100%;
    flex-direction: column;
}

.view-section.active {
    display: flex;
}

.sales-bar {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.sales-bar input, .sales-bar select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.sales-bar input[type="text"] {
    flex: 1;
}

.btn-blue {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-blue:hover {
    background-color: #004085;
}

.table-container {
    background: white;
    border-radius: 8px;
    flex: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow-y: auto;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

th {
    background-color: #fafafa;
    color: #666;
    font-weight: 600;
}

tbody tr {
    cursor: pointer;
}

tbody tr.selected-row {
    background-color: #e2e8f0 !important;
    font-weight: bold;
}

.sales-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.total-text {
    font-size: 24px;
    font-weight: bold;
    color: #e65100;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-cancel {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-cancel:hover { background-color: #f1f1f1; }

.btn-credit {
    background-color: #6f42c1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
.btn-credit:hover { background-color: #5a32a3; }

.btn-pay {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

.btn-pay:hover { background-color: #004085; }

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.module-header h2 {
    color: var(--primary-color);
}

.form-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 13px;
    font-weight: bold;
    color: #555;
}

.form-group input, .form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.kitchen-card-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 4px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kitchen-card-item h4 {
    color: var(--primary-color);
}

.badge-stock {
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    width: fit-content;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 16px;
}

.login-logo {
    width: 90px;
    height: auto;
    margin-bottom: 15px;
}