﻿/* ==========================================================================
   ARABICA INTELLIGENCE — DESIGN SYSTEM
   Aesthetic: Minimalist, Mysterious, Deep Obsidian, Crisp White Typography
   ========================================================================== */

:root {
    --bg-primary: #070708;
    --bg-secondary: #0e0e11;
    --bg-tertiary: #16161a;
    --bg-card: rgba(18, 18, 22, 0.75);
    --border-subtle: rgba(255, 255, 255, 0.09);
    --border-active: rgba(255, 255, 255, 0.35);
    --text-primary: #f5f5f7;
    --text-secondary: #8e8e93;
    --text-muted: #58585e;
    --accent-glow: rgba(255, 255, 255, 0.85);
    --accent-cyan: #52e5ff;
    --accent-gold: #e5b869;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Base Layout */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #15151b 0%, #070708 70%);
}

.site-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: 18px 32px;
    background: rgba(7, 7, 8, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-small {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
    transition: var(--transition);
}

.brand-logo-small:hover {
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.4));
}

.brand-tagline {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.main-content {
    flex: 1;
    padding: 40px 24px 80px;
}

.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 30px 24px;
    text-align: center;
    background: #040405;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.footer-mono {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: #404047;
}

/* Typography & Helpers */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.mono-font {
    font-family: var(--font-mono);
}

.hidden {
    display: none !important;
}

/* Hero Section */
.hero-container {
    max-width: 960px;
    margin: 0 auto;
}

.brand-hero {
    text-align: center;
    padding: 20px 0 50px;
    position: relative;
}

.logo-wrap {
    display: inline-block;
    position: relative;
}

.brand-logo-main {
    max-width: 460px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.12));
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 16px auto 0;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Configuration Section & Sliders */
.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 44px;
    backdrop-filter: blur(16px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.section-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.config-title {
    font-size: 28px;
    margin-bottom: 8px;
}

.config-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 36px;
    max-width: 650px;
}

.sliders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.slider-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    transition: var(--transition);
}

.slider-card:hover {
    border-color: var(--border-active);
    background: rgba(22, 22, 28, 0.9);
}

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

.slider-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 12px;
}

.slider-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.slider-val-badge {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.slider-endpoints {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}

/* Custom Styled Range Slider */
.bespoke-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #202026;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.bespoke-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
    border: 2px solid #111115;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bespoke-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.95);
}

.bespoke-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
    border: 2px solid #111115;
}

.slider-subtext {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

/* Sensory Matrix Preview */
.matrix-preview-card {
    margin-top: 36px;
    background: rgba(10, 10, 14, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}

.matrix-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #34d399;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.matrix-title {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.matrix-summary-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.matrix-bars {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.mini-bar-track {
    background: #191920;
    border-radius: 3px;
    height: 6px;
    position: relative;
    margin-bottom: 6px;
}

.mini-bar-fill {
    background: #ffffff;
    height: 100%;
    border-radius: 3px;
    width: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    transition: width 0.2s ease;
}

.mini-bar-track label {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: block;
    margin-top: 6px;
    text-align: center;
}

/* Buttons */
.order-trigger-wrap {
    margin-top: 40px;
    text-align: center;
}

.btn-primary-glow {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 16px 36px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.6);
    background: #f0f0f5;
}

.btn-primary-glow:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    border-color: var(--border-active);
    background: rgba(255, 255, 255, 0.05);
}

.order-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
}

/* 3-Second Neural Waiting Screen */
.neural-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 4, 6, 0.94);
    backdrop-filter: blur(24px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.neural-content {
    max-width: 500px;
    padding: 30px;
    position: relative;
    z-index: 2;
}

.neural-animation-box {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#neuralCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.neural-center-icon {
    position: relative;
    z-index: 2;
}

.neural-bean-pulse {
    width: 110px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.7));
    animation: neuralBeanPulse 1.5s infinite ease-in-out;
}

@keyframes neuralBeanPulse {
    0%, 100% { transform: scale(0.96); filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.9)); }
}

.neural-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.neural-headline {
    font-size: 18px;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.neural-substep {
    font-size: 13px;
    color: var(--text-secondary);
    min-height: 20px;
    margin-bottom: 24px;
}

.neural-progress-track {
    width: 100%;
    height: 4px;
    background: #1a1a22;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.neural-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #a0a0ff);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    transition: width 0.05s linear;
}

.neural-time-countdown {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

/* Step 2: Order Customer Form Screen */
.order-form-section {
    max-width: 680px;
    margin: 0 auto;
}

.order-card-frame {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.order-title {
    font-size: 26px;
    margin-bottom: 8px;
}

.order-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.calibrated-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.chip {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.chip strong {
    color: var(--text-primary);
}

.bespoke-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.col-half {
    flex: 1;
}

.form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
    background: #141419;
}

.form-notice {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-subtle);
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.form-notice strong {
    color: #ffffff;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* Confirmation Page */
.confirmation-container {
    max-width: 780px;
    margin: 20px auto 60px;
}

.confirmation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 44px;
}

.confirm-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: #34d399;
    margin-bottom: 12px;
}

.confirm-title {
    font-size: 32px;
    margin-bottom: 8px;
}

.confirm-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 30px;
}

.order-id-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    padding: 18px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.id-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.id-code {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.status-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.status-acknowledged { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-roasted { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.status-shipped { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-delivered { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.3); }

.receipt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.receipt-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.section-heading {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
}

.receipt-row span {
    color: var(--text-secondary);
}

.radar-summary-list .mini-spec {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.qr-explanation-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.qr-hint-icon {
    font-size: 24px;
}

.qr-hint-body h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.qr-hint-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.assigned-hex-link {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.hex-badge-link {
    font-family: var(--font-mono);
    color: #ffffff;
    background: #1c1c24;
    border: 1px solid var(--border-subtle);
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.hex-badge-link:hover {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

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

/* Admin Dashboard & Table */
.admin-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.admin-heading {
    font-size: 28px;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

.btn-action {
    padding: 10px 20px;
    font-size: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.stat-accent {
    border-color: rgba(82, 229, 255, 0.3);
    background: rgba(82, 229, 255, 0.03);
}

.stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.stat-hint {
    font-size: 11px;
    color: var(--text-secondary);
}

.admin-panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
}

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

.panel-title {
    font-size: 18px;
}

.panel-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.table-responsive {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.orders-table th {
    text-align: left;
    padding: 12px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-subtle);
}

.orders-table td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}

.order-id-cell {
    font-size: 14px;
}

.sub-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.cust-name {
    font-size: 14px;
}

.cust-contact {
    font-size: 12px;
    color: var(--text-secondary);
}

.address-cell {
    max-width: 200px;
    font-size: 12px;
    color: var(--text-secondary);
}

.matrix-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 170px;
}

.matrix-tags span {
    font-family: var(--font-mono);
    font-size: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.hex-pill {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    background: #181822;
    border: 1px solid var(--border-subtle);
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

.hex-pill:hover {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.unassigned-badge {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.roast-info-mini {
    font-size: 12px;
}

.status-dropdown {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.batches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.batch-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
}

.batch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.batch-id-text {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}

.batch-avail-tag {
    font-size: 11px;
    color: #34d399;
}

.batch-created-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.btn-pdf-download {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition);
}

.btn-pdf-download:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: #0f0f13;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 620px;
    width: 100%;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9);
}

.modal-sm {
    max-width: 480px;
}

.modal-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: #c084fc;
    margin-bottom: 8px;
}

.modal-title {
    font-size: 22px;
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.assigned-hex-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #171720;
    border: 1px solid rgba(192, 132, 252, 0.3);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.hex-tag-title {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.hex-tag-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
}

.hex-badge-seq {
    font-size: 10px;
    background: rgba(192, 132, 252, 0.15);
    color: #c084fc;
    padding: 4px 8px;
    border-radius: 12px;
    font-family: var(--font-mono);
}

.roast-slider-section {
    background: #14141a;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 20px;
}

.roast-level-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #ffffff;
    background: #23232c;
    padding: 3px 8px;
    border-radius: 4px;
}

.roast-desc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    background: #0d0d12;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.roast-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.roast-desc-text strong {
    font-size: 14px;
    color: #ffffff;
    display: block;
}

.roast-desc-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.batch-preview-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: #14141b;
    padding: 14px;
    border-radius: 6px;
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.batch-preview-codes span {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #a0a0b0;
}

/* Secret Bean Dossier Page */
.dossier-container {
    max-width: 860px;
    margin: 20px auto 60px;
}

.dossier-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 48px;
    position: relative;
}

.dossier-error-card {
    background: var(--bg-card);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
}

.error-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: #ef4444;
    margin-bottom: 12px;
}

.seal-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2.5px;
    color: #34d399;
    margin-bottom: 8px;
}

.hex-seal-title {
    font-size: 26px;
    letter-spacing: 3px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.dossier-title {
    font-size: 32px;
    margin-bottom: 6px;
}

.dossier-sub {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 36px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.spec-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
}

.spec-highlight {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(30, 30, 38, 0.8);
}

.spec-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.spec-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.spec-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.spec-desc-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
    margin-top: 4px;
}

.dossier-section-title {
    font-size: 16px;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
    color: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
}

.roaster-notes-section {
    margin-bottom: 36px;
}

.notes-quote {
    font-style: italic;
    font-size: 15px;
    color: #e0e0e5;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #ffffff;
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.dossier-matrix-section {
    margin-bottom: 36px;
}

.matrix-exp {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.calibrated-matrix-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.matrix-meter {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
}

.meter-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
}

.meter-head strong {
    font-family: var(--font-mono);
    color: #ffffff;
}

.meter-bar {
    background: #1a1a22;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.brewing-guide-section {
    margin-bottom: 36px;
}

.brew-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.brew-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.brew-method {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.brew-param {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.dossier-footer-seal {
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Admin Login Card */
.admin-login-container {
    max-width: 440px;
    margin: 60px auto;
}

.admin-login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
}

.logo-wrap-mini {
    margin-bottom: 16px;
}

.login-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.login-title {
    font-size: 22px;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.error-banner {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.full-width {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .config-section, .confirmation-card, .dossier-card, .order-card-frame {
        padding: 24px 18px;
    }
    
    .form-row, .receipt-grid, .specs-grid, .calibrated-matrix-grid, .brew-cards {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    
    .matrix-bars {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 12px;
    }
    
    .admin-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
