:root {
    --bg-main: #1c1917; /* Warm dark brown/stone-900 */
    --bg-header: #292524; /* Stone-800 */
    --bg-card: #292524;
    --bg-card-hover: #383230;
    --bg-input: #1c1917;
    
    --primary: #d97706; /* Amber-600 coffee roast gold */
    --primary-hover: #b45309; /* Amber-700 */
    --primary-light: #fef3c7; /* Amber-100 */
    --accent: #78350f; /* Amber-900 warm espresso */
    
    --text-primary: #f5f5f4; /* Stone-100 */
    --text-secondary: #a8a29e; /* Stone-400 */
    --text-muted: #78716c; /* Stone-500 */
    
    --border-color: #44403c; /* Stone-700 */
    --border-light: #57534e; /* Stone-600 */
    
    --badge-success-bg: rgba(16, 185, 129, 0.15);
    --badge-success-text: #34d399;
    --badge-danger-bg: rgba(239, 68, 68, 0.15);
    --badge-danger-text: #f87171;
}

* {
    box-sizing: border-box;
    font-family: 'Sukhumvit Set', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

.header {
    background: var(--bg-header);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.header h1 {
    font-size: 1.35rem;
    margin: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: rgba(217, 119, 6, 0.1);
}

.nav-badge {
    background: #ef4444;
    color: white;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 4px;
    vertical-align: middle;
    display: inline-block;
    line-height: 1;
}

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

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-header);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
        z-index: 100;
        gap: 0.25rem;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        padding: 0.75rem 1rem;
    }
}

.container {
    padding: 2.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.stat-card {
    background: linear-gradient(145deg, var(--bg-card), #231f1e);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.stat-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.flex-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.table-card, .card {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.card-body {
    padding: 1.5rem;
}

.table-title, .card-title {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(0, 0, 0, 0.15);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-main);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: var(--badge-success-bg);
    color: var(--badge-success-text);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-danger {
    background: var(--badge-danger-bg);
    color: var(--badge-danger-text);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.btn-action, .btn-submit {
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-action:hover, .btn-submit:hover {
    background: var(--primary-hover);
}

.btn-del {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-del:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
}

/* Login specific styles */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

/* Custom Checkbox */
.form-group label.custom-checkbox-container,
.custom-checkbox-container {
    display: inline-flex !important;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    transition: color 0.2s ease;
}

.custom-checkbox-container:hover {
    color: var(--text-primary);
}

.custom-checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-container .checkmark {
    width: 20px;
    height: 20px;
    background-color: var(--bg-input);
    border: 2px solid var(--border-light);
    border-radius: 6px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox-container .checkmark svg {
    width: 12px;
    height: 12px;
    stroke: #ffffff;
    opacity: 0;
    transform: scale(0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
}

.custom-checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.35);
}

.custom-checkbox-container input:checked ~ .checkmark svg {
    opacity: 1;
    transform: scale(1);
}

/* Modal Dark Theme (Image 1 & 2 styles) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #2a2827;
    border-radius: 1rem;
    width: 90%;
    max-width: 720px;
    border: 1px solid #423e3c;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s ease;
    color: #f5f5f4;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #3c3836;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
}

.modal-close {
    background: transparent;
    border: none;
    color: #a8a29e;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.modal-close:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
}

.modal-body {
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #3c3836;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #242221;
}

/* Switch Toggle (Image 1) */
.switch-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.switch-input {
    display: none;
}

.switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #44403c;
    border-radius: 9999px;
    transition: 0.2s ease;
}

.switch-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s ease;
}

.switch-input:checked + .switch-slider {
    background-color: #8c5332;
}

.switch-input:checked + .switch-slider:before {
    transform: translateX(20px);
}

/* Size Pill Buttons (Image 2) */
.size-selector, .sweetness-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.size-pill, .sweetness-pill {
    background: #383432;
    border: 1px solid #4a4542;
    border-radius: 0.75rem;
    padding: 0.85rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-pill:hover, .sweetness-pill:hover {
    border-color: #8c5332;
    background: #403b38;
}

.size-pill.active, .sweetness-pill.active {
    background: #8c5332;
    border-color: #8c5332;
    color: #ffffff;
    font-weight: 700;
}

/* Topping Checkboxes (Image 2) */
.topping-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #332f2d;
    border: 1px solid #443f3d;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topping-item:hover {
    border-color: #8c5332;
}

.topping-item.selected {
    border-color: #8c5332;
    background: rgba(140, 83, 50, 0.15);
}

.topping-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topping-price {
    color: #c68b57;
    font-weight: 600;
}

/* Buttons (Image 1 & 2 styles) */
.btn-secondary {
    background: #4a4542;
    color: #f5f5f4;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

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

.btn-primary-coffee {
    background: #8c5332;
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}

.btn-primary-coffee:hover {
    background: #a3623b;
}

/* Summary Box */
.summary-box {
    background: #232120;
    border: 1px solid #3c3836;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
}

.summary-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #c68b57;
}

