/*
Theme Name: Chocoloom Order Management
Author: Chocoloom Team
Description: Premium Order Management System for Chocoloom Bakery.
Version: 1.0
License: GNU General Public License v2 or later
*/

:root {
    /* Brand Colors */
    --clr-chocolate: #4a2e1b;
    --clr-chocolate-light: #6b4329;
    --clr-gold: #d4af37;
    --clr-gold-light: #f3d573;
    
    /* Neutral Colors */
    --clr-bg: #f8f5f2;
    --clr-surface: #ffffff;
    --clr-text: #333333;
    --clr-text-light: #777777;
    --clr-border: #e2d9d1;
    --clr-danger: #e74c3c;
    --clr-success: #2ecc71;
    --clr-info: #3498db;
    --clr-purple: #9b59b6;
    
    /* Layout & Styling */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 8px 30px rgba(74, 46, 27, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text);
    overflow-x: hidden;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--clr-chocolate);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.logo-container {
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container i {
    font-size: 1.5rem;
    color: var(--clr-gold);
}

.logo-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-container span {
    color: var(--clr-gold);
    font-weight: 400;
    font-size: 1rem;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    gap: 12px;
    border-left: 4px solid transparent;
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--clr-gold);
    border-left-color: var(--clr-gold);
}

.logout-item {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ff6b6b !important;
}

.logout-item:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    border-left-color: #ff6b6b !important;
}

.sidebar-footer {
    padding: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: var(--transition);
}

.top-header {
    background-color: var(--clr-surface);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 900;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--clr-chocolate);
    cursor: pointer;
    padding: 5px;
}

.top-header h1 {
    font-size: 1.25rem;
    color: var(--clr-chocolate);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--clr-gold);
}

.content-area {
    padding: 20px;
    flex: 1;
}

.section-panel {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.section-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms & Cards */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-card, .summary-card, .table-container {
    background-color: var(--clr-surface);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--clr-border);
}

.form-card h3 {
    color: var(--clr-chocolate);
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--clr-border);
    padding-bottom: 10px;
}

.form-card h3 i {
    color: var(--clr-gold);
}

.input-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .input-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-chocolate);
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--clr-border);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    background-color: var(--clr-bg);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--clr-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    background-color: var(--clr-surface);
}

/* Weight Selector */
.weight-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.weight-option {
    flex: 1;
    min-width: 70px;
}

.weight-option span {
    display: block;
    text-align: center;
    padding: 8px 5px;
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.weight-option input:checked ~ span {
    background-color: var(--clr-chocolate);
    color: white;
    border-color: var(--clr-chocolate);
}

/* Summary Card */
.summary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.summary-details {
    flex: 1;
    min-width: 250px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--clr-text-light);
}

.total-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px dashed var(--clr-border);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-chocolate);
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary { background-color: var(--clr-chocolate); color: white; }
.btn-primary:hover { background-color: var(--clr-chocolate-light); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; color: var(--clr-text-light); border: 1px solid var(--clr-border); }
.btn-secondary:hover { background-color: var(--clr-bg); }

/* Table Section */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--clr-text-light);
}

.search-box input {
    padding-left: 35px;
    border-radius: 20px;
}

.table-container {
    overflow-x: auto;
    padding: 0;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

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

.orders-table th {
    background-color: var(--clr-bg);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--clr-chocolate);
}

.orders-table td { font-size: 0.9rem; }

/* Status Badges */
.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-pending { background: rgba(243, 156, 18, 0.1); color: #f39c12; }
.status-accepted { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }
.status-rejected { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }
.status-preparing { background: rgba(52, 152, 219, 0.1); color: #3498db; }
.status-ready { background: rgba(155, 89, 182, 0.1); color: #9b59b6; }
.status-completed { background: rgba(44, 62, 80, 0.1); color: #2c3e50; }

.actions-cell {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 5px 10px;
    border-radius: 4px;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: white;
}

.btn-action.accept { background: #2ecc71; }
.btn-action.reject { background: #e74c3c; }
.btn-action.prepare { background: #3498db; }
.btn-action.ready { background: #9b59b6; }
.btn-action.complete { background: #2c3e50; }

/* Premium Login Redesign */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #0f0a07;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(107, 67, 41, 0.15), transparent 25%);
    padding: 20px;
}

.login-box {
    background: rgba(26, 17, 10, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    padding: 40px 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    color: white;
}

.login-header { text-align: center; margin-bottom: 30px; }
.login-header i { font-size: 3rem; color: var(--clr-gold); margin-bottom: 10px; }
.login-header h2 { font-size: 1.75rem; margin-bottom: 5px; }
.login-header span { color: var(--clr-gold); }
.login-header p { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }

.login-box .input-group label { color: rgba(255, 255, 255, 0.8); }
.login-box input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.login-box .btn-primary {
    background: linear-gradient(135deg, var(--clr-gold) 0%, #b89325 100%);
    color: #1a110a;
    width: 100%;
    padding: 14px;
}

.login-footer { margin-top: 30px; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.4); border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }

/* Toast */
.toast {
    position: fixed;
    bottom: -100px;
    right: 20px;
    left: 20px;
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show { bottom: 20px; }

/* Responsive Media Queries */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 576px) {
    .top-header { padding: 10px 15px; }
    .top-header h1 { font-size: 1.1rem; }
    .admin-profile span { display: none; }
    .content-area { padding: 15px; }
    .form-grid { grid-template-columns: 1fr; }
    .summary-card { flex-direction: column; align-items: stretch; }
    .action-buttons { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .weight-option { flex: 0 0 calc(50% - 4px); }
    .login-box { padding: 30px 20px; }
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar.active + .sidebar-overlay {
    display: block;
}