:root {
    --primary: #1A56DB;
    --primary-container: #EBF2FF;
    --on-primary: #FFFFFF;
    --secondary: #2F6BFF;
    --background: #F8FAFF;
    --surface: #FFFFFF;
    --surface-variant: #F1F4F9;
    --outline: #74777F;
    --on-surface: #1C1B1F;
    --on-surface-variant: #44474E;

    --radius-container: 32px;
    --radius-card: 24px;
    --radius-component: 16px;
    --radius-chip: 12px;

    --shadow-low: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-med: 0 4px 12px rgba(26, 86, 219, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--background);
    color: var(--on-surface);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--surface);
    border-right: 1px solid var(--surface-variant);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-box {
    background: var(--primary-container);
    padding: 8px;
    border-radius: var(--radius-chip);
}

.sidebar-header h1 {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--on-surface-variant);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-component);
    transition: all 0.2s;
    gap: 12px;
}

.nav-item:hover {
    background-color: var(--surface-variant);
}

.nav-item.active {
    background-color: var(--primary);
    color: var(--on-primary);
    box-shadow: var(--shadow-med);
}

.badge {
    margin-left: auto;
    background: #FF4D4F;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--surface-variant);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 800;
}

.admin-profile .name {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

.admin-profile .role {
    font-size: 11px;
    color: var(--outline);
    margin: 0;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px 40px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.top-bar h2 {
    font-size: 28px;
    font-weight: 800;
}

.icon-btn {
    border: none;
    background: var(--surface);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    box-shadow: var(--shadow-low);
}

/* Dashboard Cards */
.content-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-low);
    border: 1px solid var(--surface-variant);
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table th {
    text-align: left;
    padding: 12px;
    color: var(--outline);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid var(--surface-variant);
}

.data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--surface-variant);
    font-size: 14px;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-badge.waiting-for-payment-verification { background: #FFF7E6; color: #D48806; }
.status-badge.printing { background: #E6F7FF; color: #096DD9; }
.status-badge.completed { background: #F6FFED; color: #389E0D; }

/* Login Page */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-container);
}

.login-card {
    background: var(--surface);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: var(--radius-container);
    box-shadow: var(--shadow-med);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h2 {
    margin-top: 16px;
    font-weight: 800;
}

.login-header p {
    color: var(--on-surface-variant);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--on-surface-variant);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-component);
    border: 1px solid var(--outline);
    font-family: inherit;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--primary-container);
}

.primary-btn {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-component);
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.1s;
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn.full-width {
    width: 100%;
}

.error-text {
    color: #FF4D4F;
    font-size: 12px;
    margin-top: 12px;
    text-align: center;
}

/* Pricing Grid */
.pricing-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-variant);
    border-radius: var(--radius-component);
}

.price-row .name {
    flex: 1;
    font-weight: 700;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input-group label {
    font-size: 11px;
    font-weight: 800;
    color: var(--outline);
}

.price-input-group input {
    width: 80px;
    padding: 8px;
    border-radius: var(--radius-chip);
    border: 1px solid var(--outline);
    text-align: right;
}

.save-btn {
    padding: 8px 16px;
    border-radius: var(--radius-chip);
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

/* Modal Styling */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--surface);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--radius-container);
    padding: 40px;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-med);
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 24px;
    cursor: pointer;
    background: var(--surface-variant);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px;
}

.detail-section h4 {
    font-size: 12px;
    color: var(--outline);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.detail-card {
    background: var(--surface-variant);
    padding: 16px;
    border-radius: var(--radius-component);
    margin-bottom: 16px;
}

.receipt-preview-container {
    width: 100%;
    border-radius: var(--radius-component);
    overflow: hidden;
    border: 2px solid var(--primary-container);
    cursor: zoom-in;
    position: relative;
}

.receipt-preview-container img {
    width: 100%;
    display: block;
}

.receipt-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px;
    color: var(--outline);
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none; /* Add hamburger menu logic later */
    }
    .main-content {
        padding: 16px;
    }
}

/* Utility Classes */
.hidden { display: none !important; }
