/* Layout & Cards */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--lmb-bg-dark);
    color: var(--lmb-text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Outfit', sans-serif;
}

main {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    background: var(--lmb-bg-surface);
    padding: 2rem;
    border-radius: var(--lmb-radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}
.hero img { width: 100px; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4)); }

.card {
    background: var(--lmb-bg-surface);
    border-radius: var(--lmb-radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.2rem; }
h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--lmb-primary); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.5rem; }

/* Color Preview Circle */
.color-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.1);
    background-color: #333;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.color-preview.preview-disabled {
    background-color: transparent !important;
    border-style: dashed;
    border-color: rgba(255,255,255,0.2);
    box-shadow: none;
    color: var(--lmb-text-muted);
    font-size: 1.4rem;
    font-weight: 800;
}
.color-preview-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Form Elements */
.input-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
label { font-size: 0.75rem; font-weight: 700; color: var(--lmb-text-muted); text-transform: uppercase; }

select, input[type="text"], input[type="number"] {
    width: 100%;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
}
select:focus, input:focus { outline: none; border-color: var(--lmb-primary); }

/* Mode Switcher */
.mode-switcher {
    display: flex;
    background: rgba(0,0,0,0.2);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.mode-btn {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--lmb-text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.85rem;
}
.mode-btn.active {
    background: var(--lmb-bg-surface-hover);
    color: var(--lmb-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Recipe Table */
.recipe-table { width: 100%; border-collapse: collapse; }
.recipe-table th { text-align: left; font-size: 0.7rem; text-transform: uppercase; color: var(--lmb-text-muted); padding: 0.5rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.recipe-table td { padding: 0.6rem 0.5rem; vertical-align: middle; }

.system-badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-right: 6px;
}
.badge-pantone { background: #E62427; color: white; }
.badge-ral { background: #FFC800; color: black; }
.badge-cmyk { background: #00AEEF; color: white; }
.badge-custom { background: #94A3B8; color: black; }

/* Results */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.result-item { background: rgba(0,0,0,0.2); padding: 1rem; border-radius: 10px; text-align: center; }
.result-val { font-size: 1.4rem; font-weight: 800; display: block; }
.result-label { font-size: 0.65rem; color: var(--lmb-text-muted); text-transform: uppercase; }

/* Storage List */
.saved-recipes { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.recipe-pill {
    background: rgba(255,255,255,0.03);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s;
}
.recipe-pill:hover { background: rgba(255,255,255,0.07); }
.recipe-pill-info { display: flex; align-items: center; gap: 1rem; }
.recipe-pill-text { display: flex; flex-direction: column; }
.recipe-pill-name { font-weight: 700; font-size: 0.95rem; }
.recipe-pill-meta { font-size: 0.7rem; color: var(--lmb-text-muted); }

.btn-delete-saved {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-delete-saved:hover {
    background: #EF4444;
    color: white;
}

@media print {
    .no-print { display: none !important; }
    body { background: white; color: black; }
    main { padding: 0; max-width: 100%; }
    .card { border: 1px solid #eee; background: white; margin-bottom: 2cm; }
    h1, h2, td, th, strong { color: black !important; }
    .badge-pantone, .badge-ral, .badge-cmyk { border: 1px solid #000; color: black !important; background: transparent !important; }
    .print-header { display: flex !important; align-items: center; gap: 2rem; margin-bottom: 2rem; border-bottom: 2px solid #000; padding-bottom: 20px; }
    .color-preview { border-color: #000; }
    @page { size: A5; margin: 1.5cm; }
}

.hidden { display: none !important; }
