/* ==========================================================================
   ROMANIZZA - PIZZA AL TAGLIO - SYSTEM STYLES
   ========================================================================== */

/* Design Variables */
:root {
    --primary-green: #4c5844;
    --primary-green-light: #64745c;
    --primary-green-dark: #373f31;
    --primary-green-alpha: rgba(76, 88, 68, 0.08);
    --primary-green-alpha-heavy: rgba(76, 88, 68, 0.18);
    
    --accent-tomato: #c85a44;
    --accent-tomato-light: #d6705d;
    --accent-tomato-alpha: rgba(200, 90, 68, 0.08);
    
    --status-pending: #dfa037;
    --status-pending-alpha: rgba(223, 160, 55, 0.1);
    --status-preparing: #4c5844;
    --status-preparing-alpha: rgba(76, 88, 68, 0.08);
    --status-baking: #c85a44;
    --status-baking-alpha: rgba(200, 90, 68, 0.08);
    --status-delivered: #566e5d;
    --status-delivered-alpha: rgba(86, 110, 93, 0.1);

    --bg-cream: #f5f4ed;
    --bg-cream-dark: #ebe9de;
    --bg-card: #ffffff;
    --bg-sidebar: #eae8dd;
    
    --text-main: #2b3028;
    --text-muted: #6e7568;
    --text-light: #949a8f;
    --text-on-primary: #ffffff;
    
    --border-color: #dfddd4;
    --border-color-hover: #c4c1b5;
    
    --shadow-sm: 0 2px 8px rgba(76, 88, 68, 0.04);
    --shadow-md: 0 8px 24px rgba(76, 88, 68, 0.08);
    --shadow-lg: 0 16px 40px rgba(76, 88, 68, 0.12);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --radius-full: 9999px;
    
    --font-serif: 'Cinzel', Georgia, serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-cream);
    color: var(--text-main);
    overflow-x: hidden;
    height: 100vh;
}

/* App Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */
.app-sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    justify-content: space-between;
    height: 100vh;
    z-index: 10;
}

.brand-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-svg-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.brand-logo-svg {
    width: 80px;
    height: 60px;
    filter: drop-shadow(0 4px 6px rgba(76, 88, 68, 0.15));
    transition: var(--transition-bounce);
}

.brand-container:hover .brand-logo-svg {
    transform: scale(1.1) rotate(-3deg);
}

.brand-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: 2px;
    line-height: 1.1;
}

.brand-subtitle {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 3px;
    display: block;
    margin-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    position: relative;
}

.nav-btn:hover {
    color: var(--primary-green-dark);
    background-color: rgba(76, 88, 68, 0.05);
}

.nav-btn.active {
    color: var(--text-on-primary);
    background-color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(76, 88, 68, 0.2);
}

.nav-icon {
    width: 18px;
    height: 18px;
    transition: var(--transition-smooth);
}

.nav-btn.active .nav-icon {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    right: 15px;
    background-color: var(--accent-tomato);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.badge.alert {
    background-color: var(--accent-tomato);
    animation: pulseAlert 1.5s infinite;
}

@keyframes pulseAlert {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200, 90, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(200, 90, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200, 90, 68, 0); }
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
}

.clock-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-green);
    font-variant-numeric: tabular-nums;
}

.date-display {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: capitalize;
}

/* ==========================================================================
   MAIN CONTENT STYLES
   ========================================================================== */
.app-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.main-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    box-shadow: var(--shadow-sm);
}

.header-info h2 {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: 0.5px;
}

.header-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.tab-content-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px 40px;
}

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

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

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

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--text-on-primary);
}

.btn-primary:hover {
    background-color: var(--primary-green-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-cream-dark);
    color: var(--text-main);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

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

.btn-danger:hover {
    background-color: var(--accent-tomato-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
    margin-top: 15px;
}

.btn-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon-text:hover {
    color: var(--primary-green-light);
}

/* ==========================================================================
   CARDS & TABLES
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.card-header h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--primary-green);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

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

.data-table th, .data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: rgba(76, 88, 68, 0.02);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   1. PEDIDOS TAB - KANBAN BOARD STYLES
   ========================================================================== */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.search-input-wrapper {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px var(--primary-green-alpha);
}

.filter-options {
    display: flex;
    gap: 8px;
}

.filter-chip {
    padding: 8px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.filter-chip:hover {
    border-color: var(--border-color-hover);
    color: var(--text-main);
}

.filter-chip.active {
    background-color: var(--primary-green-alpha);
    border-color: var(--primary-green);
    color: var(--primary-green-dark);
    font-weight: 600;
}

/* Kanban Structure */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
    height: calc(100vh - 230px);
    overflow: hidden;
}

.kanban-col {
    background-color: var(--bg-sidebar);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
}

.col-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    margin-right: 8px;
}

.dot-pending { background-color: var(--status-pending); }
.dot-preparing { background-color: var(--status-preparing); }
.dot-baking { background-color: var(--status-baking); }
.dot-delivered { background-color: var(--status-delivered); }

.col-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    flex-grow: 1;
}

.col-count {
    background-color: rgba(76, 88, 68, 0.1);
    color: var(--primary-green);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.kanban-cards-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100px;
    padding: 2px;
}

/* Kanban Cards styling */
.order-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: cardIn 0.3s ease forwards;
}

@keyframes cardIn {
    from { opacity: 0; transform: scale(0.95) translateY(5px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.order-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.order-id {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-green);
    background-color: var(--primary-green-alpha);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.order-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.order-card-client {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.order-card-items {
    font-size: 0.85rem;
    color: var(--text-muted);
    border-left: 2px solid var(--primary-green-alpha-heavy);
    padding-left: 8px;
    margin: 2px 0;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    margin-top: 4px;
}

.order-card-total {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-green-dark);
}

.delivery-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.delivery-badge.Local {
    background-color: var(--primary-green-alpha);
    color: var(--primary-green);
}

.delivery-badge.Delivery {
    background-color: var(--accent-tomato-alpha);
    color: var(--accent-tomato);
}

/* Card Control Actions */
.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
}

.btn-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: none;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.btn-card-action:hover {
    color: var(--primary-green-dark);
    background-color: var(--bg-cream);
    border-color: var(--border-color-hover);
}

.btn-card-action.primary {
    background-color: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.btn-card-action.primary:hover {
    background-color: var(--primary-green-light);
    border-color: var(--primary-green-light);
}

/* ==========================================================================
   2. STOCK TAB - CALCULATOR & INVENTORY STYLES
   ========================================================================== */
.stock-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Stock progress items */
.stock-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 150px;
}

.stock-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-cream-dark);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.stock-progress-fill {
    height: 100%;
    background-color: var(--primary-green);
    transition: var(--transition-smooth);
}

.stock-progress-fill.low {
    background-color: var(--accent-tomato);
}

.stock-alert-text {
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-alert-text.low {
    color: var(--accent-tomato);
}

.stock-alert-text.good {
    color: var(--primary-green);
}

/* Toggle Switch */
.toggle-switch-wrapper {
    display: flex;
    background-color: var(--bg-cream-dark);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 20px;
}

.toggle-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.toggle-btn.active {
    background-color: var(--bg-card);
    color: var(--primary-green-dark);
    box-shadow: var(--shadow-sm);
}

.calc-mode-panel {
    display: none;
}

.calc-mode-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

.alert-info-box {
    display: flex;
    gap: 10px;
    background-color: var(--primary-green-alpha);
    padding: 12px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-green);
    margin-bottom: 15px;
    color: var(--primary-green-dark);
    font-size: 0.85rem;
}

.calculator-summary {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--bg-cream);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.pizza-sim-inputs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.sim-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-cream);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.sim-input-row span {
    font-size: 0.85rem;
    font-weight: 500;
}

.sim-qty-input {
    width: 60px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
}

.sim-qty-input:focus {
    outline: none;
    border-color: var(--primary-green);
}

.shopping-list-results {
    margin-top: 15px;
    animation: slideDown 0.4s ease forwards;
}

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

.divider {
    border: 0;
    border-top: 1px dashed var(--border-color);
    margin: 20px 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.results-header h4 {
    font-family: var(--font-serif);
    color: var(--primary-green);
    font-size: 0.95rem;
}

.shopping-items-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}

.shopping-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 6px 10px;
    background-color: var(--accent-tomato-alpha);
    border-radius: var(--radius-sm);
    color: var(--accent-tomato);
    border-left: 2px solid var(--accent-tomato);
}

.shopping-item.sufficient {
    background-color: var(--primary-green-alpha);
    color: var(--primary-green-dark);
    border-left: 2px solid var(--primary-green);
}

.shopping-financials {
    background-color: var(--bg-cream);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.financial-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.financial-row strong {
    font-size: 1.05rem;
    color: var(--primary-green-dark);
}

/* ==========================================================================
   3. ANALYTICS TAB STYLES
   ========================================================================== */
.analytics-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 0;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 8px 0;
    font-variant-numeric: tabular-nums;
}

.metric-value.text-green {
    color: #4b6b55;
}

.metric-trend {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.text-success {
    color: #566e5d;
}

.shipping-ratio {
    display: flex;
    height: 8px;
    width: 100%;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 12px 0 8px 0;
}

.ratio-segment {
    height: 100%;
}

.ratio-segment.local {
    background-color: var(--primary-green);
}

.ratio-segment.delivery {
    background-color: var(--accent-tomato);
}

.ratio-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 600;
}

.label-local { color: var(--primary-green); }
.label-delivery { color: var(--accent-tomato); }

.analytics-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* SVG Chart */
.chart-card {
    margin-bottom: 0;
}

.chart-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.svg-chart-container {
    width: 100%;
    position: relative;
}

.analytics-svg-chart {
    width: 100%;
    height: auto;
    overflow: visible;
}

.svg-bar {
    fill: var(--primary-green);
    transition: height 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.1), y 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    rx: 4;
}

.svg-bar:hover {
    fill: var(--primary-green-light);
}

.chart-text {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    fill: var(--text-main);
}

.chart-text.axis {
    fill: var(--text-muted);
}

.chart-text.val {
    font-weight: 700;
    fill: var(--primary-green-dark);
}

.history-card {
    margin-bottom: 0;
    max-height: 350px;
    display: flex;
    flex-direction: column;
}

.history-card .table-responsive {
    flex-grow: 1;
    overflow-y: auto;
}

/* ==========================================================================
   4. SETTINGS TAB STYLES
   ========================================================================== */
.settings-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    align-items: start;
}

.settings-card {
    margin-bottom: 0;
}

.pizza-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 550px;
    overflow-y: auto;
    padding-right: 5px;
}

.settings-pizza-item {
    background-color: var(--bg-cream);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-pizza-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-pizza-name {
    font-weight: 700;
    color: var(--primary-green-dark);
    font-size: 1rem;
}

.settings-pizza-price {
    font-weight: 600;
    color: var(--text-main);
    background-color: rgba(76, 88, 68, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.settings-pizza-recipe {
    font-size: 0.8rem;
    color: var(--text-muted);
    background-color: var(--bg-card);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.settings-recipe-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-pizza-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ==========================================================================
   MODAL DIALOG STYLES
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(43, 48, 40, 0.4);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(15px);
    transition: var(--transition-bounce);
}

.modal-card-sm {
    max-width: 440px;
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--primary-green-dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition-smooth);
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent-tomato);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-cream);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* Form Styling */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px var(--primary-green-alpha);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.section-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-green-dark);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
}

.help-label {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Pizzas in Order Grid */
.pizza-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 180px;
    overflow-y: auto;
    padding: 2px;
}

.pizza-selector-card {
    background-color: var(--bg-cream);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.pizza-selector-card.selected {
    border-color: var(--primary-green);
    background-color: var(--primary-green-alpha);
}

.pizza-selector-info {
    display: flex;
    flex-direction: column;
}

.pizza-selector-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.pizza-selector-price {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.qty-counter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.counter-btn {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: white;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.counter-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.counter-qty {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 14px;
    text-align: center;
}

.order-total-preview {
    display: flex;
    flex-direction: column;
}

.order-total-preview span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.order-total-preview strong {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-green-dark);
}

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

/* Recipe Ingredient List in Modal */
.recipe-editor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 15px;
}

.recipe-editor-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 60px;
    gap: 12px;
    align-items: center;
    background-color: var(--bg-cream);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.recipe-ingredient-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.recipe-qty-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recipe-qty-input {
    width: 60px;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
}

.recipe-unit-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   TOAST NOTIFICATION STYLES
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background-color: var(--bg-card);
    border-left: 4px solid var(--primary-green);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 280px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25) forwards;
    transition: var(--transition-smooth);
}

.toast.error {
    border-left-color: var(--accent-tomato);
}

.toast.hide {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(50px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(50px); }
}

/* ==========================================================================
   RESPONSIVENESS & MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 100vh;
    }
    
    .app-sidebar {
        height: auto;
        flex-direction: row;
        padding: 15px 20px;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        justify-content: space-between;
    }
    
    .brand-container {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
    }
    
    .logo-svg-wrapper {
        margin-bottom: 0;
    }
    
    .brand-logo-svg {
        width: 50px;
        height: 40px;
    }
    
    .brand-subtitle {
        display: inline;
        margin-left: 5px;
        font-size: 0.6rem;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-grow: 0;
        gap: 4px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .nav-btn span {
        display: none; /* Icon-only or badge-only on medium tablets */
    }
    
    .nav-btn .badge {
        position: static;
        margin-left: 4px;
        font-size: 0.65rem;
        padding: 1px 5px;
    }

    .sidebar-footer {
        display: none;
    }
    
    .app-main {
        height: calc(100vh - 75px);
    }
    
    .main-header {
        padding: 15px 20px;
    }
    
    .tab-content-container {
        padding: 20px;
    }
    
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
        overflow-y: visible;
        gap: 15px;
    }
    
    .kanban-col {
        max-height: 450px;
    }
    
    .stock-layout, .settings-layout, .analytics-charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .analytics-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 640px) {
    .app-sidebar {
        padding: 10px;
    }
    
    .brand-container {
        flex-shrink: 0;
    }
    
    .brand-title {
        font-size: 1.1rem;
    }
    
    .brand-subtitle {
        display: none;
    }
    
    .sidebar-nav {
        gap: 2px;
    }
    
    .nav-btn {
        padding: 6px 8px;
    }
    
    .nav-icon {
        width: 16px;
        height: 16px;
    }
    
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .pizza-selector-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-card {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .order-total-preview {
        text-align: center;
    }
    
    .modal-actions {
        justify-content: center;
    }
}

/* ==========================================================================
   CUSTOMER VIEW STYLES (MENU DIGITAL)
   ========================================================================== */
.customer-container {
    max-width: 680px;
    margin: 0 auto;
    background-color: var(--bg-cream);
    min-height: 100vh;
    padding: 30px 20px 120px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-shadow: 0 0 40px rgba(76, 88, 68, 0.08);
}

.customer-header {
    text-align: center;
    padding: 20px 10px;
    border-bottom: 1px dashed var(--border-color);
}

.customer-logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.customer-brand-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: 3px;
    line-height: 1.1;
}

.customer-brand-subtitle {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 4px;
    display: block;
    margin-top: 2px;
}

.customer-slogan {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 15px;
    line-height: 1.4;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.customer-section-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--primary-green-dark);
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-green);
    padding-left: 10px;
}

.customer-pizza-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.customer-pizza-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.customer-pizza-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-color-hover);
}

.customer-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 680px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 15px 24px 25px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    box-shadow: 0 -8px 24px rgba(76, 88, 68, 0.08);
}

.customer-total-preview {
    display: flex;
    flex-direction: column;
}

.customer-total-preview span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-total-preview strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green-dark);
}

/* Responsiveness for Customer view */
@media (max-width: 640px) {
    .customer-pizza-grid {
        grid-template-columns: 1fr;
    }
    .customer-sticky-footer {
        padding: 12px 20px 20px 20px;
    }
    .customer-brand-title {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   SECURITY & LOGIN STYLES
   ========================================================================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-cream-dark);
    background-image: radial-gradient(circle at 20% 30%, rgba(76, 88, 68, 0.04) 0%, transparent 70%),
                      radial-gradient(circle at 80% 70%, rgba(200, 90, 68, 0.04) 0%, transparent 70%);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: cardIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.login-brand {
    margin-bottom: 10px;
}

.login-brand .logo-svg-wrapper {
    margin-bottom: 10px;
}

.login-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.google-login-btn-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 10px 0;
}

.dev-login-bypass-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.bypass-divider {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bypass-divider::before,
.bypass-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.bypass-divider span {
    padding: 0 10px;
}

.bypass-help {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

.login-error-message {
    background-color: var(--accent-tomato-alpha);
    color: var(--accent-tomato);
    border: 1px solid rgba(200, 90, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

/* Sidebar Profile Widget & Logout */
.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: rgba(76, 88, 68, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    text-align: left;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary-green);
    background-color: var(--bg-cream-dark);
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-email {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--accent-tomato);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: 15px;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background-color: var(--accent-tomato-alpha);
    border-color: var(--accent-tomato);
    color: var(--accent-tomato);
}
