/* ============================================================
   Webmaister Approval System – közös stíluslap
   ============================================================ */

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
    /* Brand */
    --brand:             #ce100a;
    --brand-light:       #ff6b6b;
    --brand-bright:      #ff3b30;
    --brand-dark:        #e8231d;
    --brand-bg:          rgba(206, 16, 10, 0.1);
    --brand-light-bg:    rgba(255, 107, 107, 0.1);
    --brand-shadow:      rgba(206, 16, 10, 0.3);
    --brand-shadow-hover:rgba(206, 16, 10, 0.4);
    --white:             #ffffff;

    /* Buttons - badges */
    --btn-primary-bg:   linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 25%, var(--brand-bright) 50%, var(--brand-dark) 75%, var(--brand) 100%);
    --badge:            linear-gradient(135deg, #447abd, #5a8fd4, #6ba3e8, #5a8fd4, #447abd);

    /* Semantic – state colors */
    --success:           #28a745;
    --success-bg:        #f0fff4;
    --warning:           #e78d00;
    --warning-bg:        #fdf5e9;
    --danger:            #dc3545;
    --danger-bg:         #fff5f5;
    --danger-border:     #f5c6cb;
    --info:              #2563eb;
    --info-light:        #1d4ed8;
    --info-bg:           #dbeafe;

    /* Accent (toast, badge gradient) */
    --accent:            #447abd;
    --accent-mid:        #5a8fd4;
    --accent-light:      #6ba3e8;
    --accent-badge-bg:   linear-gradient(135deg, var(--accent) 0%, var(--accent-mid) 25%, var(--accent-light) 50%, var(--accent-mid) 75%, var(--accent) 100%);
    --accent-shadow:     0 2px 8px rgba(68, 122, 189, 0.3), inset 0 1px rgba(255, 255, 255, 0.3);

    /* Success gradient */
    --success-dark:      #3a8c29;
    --success-mid:       #4ba837;
    --success-base:      #59bd44;
    --success-bright:    #76e160;
    --success-deep:      #359321;
    --success-badge-bg:  linear-gradient(135deg, var(--success-dark) 0%, var(--success-mid) 25%, var(--success-base) 50%, var(--success-bright) 75%, var(--success-deep) 100%);
    --success-shadow:    0 2px 8px rgba(53, 147, 33, 0.3), inset 0 1px rgba(255, 255, 255, 0.3);

    /* Neutrals */
    --text-primary:      #1e293b;
    --text-body:         #334155;
    --text-secondary:    #64748b;
    --text-muted:        #6d7582;
    --text-placeholder:  #999;

    /* Surfaces */
    --surface-page:      #fffaef;
    --surface-card:      #fff;
    --surface-subtle:    #fafafa;
    --surface-code:      #1e293b;
    --surface-hover:     #f1f5f9;
    --surface-muted:     #f8f8f8;
    --surface-selected:  #f3f2ff;

    /* Borders */
    --border:            #e8e8e8;
    --border-light:      #eee;
    --border-rule:       #f0f0f0;
    --border-width:      1px;
    --border-width-double: 2px;
    --border-style:      solid;

    /* Header */
    --header-bg:         rgba(255, 250, 239, 0.75);

    /* Shadows */
    --shadow-card:       0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-btn:        0 4px 15px var(--brand-shadow), 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.4);
    --shadow-btn-hover:  0 8px 25px var(--brand-shadow-hover), 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.4);
    --shadow-dropdown:   0 8px 30px rgba(0, 0, 0, 0.18);
    --shadow-toast:      0 6px 24px rgba(0, 0, 0, 0.25);

    /* Radius */
    --radius-sm:         6px;
    --radius-md:         8px;
    --radius-lg:         10px;
    --radius-xl:         12px;
    --radius-pill:       100px;

    /* Spacing */
    --space-xs:          4px;
    --space-sm:          8px;
    --space-md:          12px;
    --space-lg:          16px;
    --space-xl:          20px;
    --space-2xl:         24px;
    --space-3xl:         28px;
    --space-4xl:         32px;

    /* Typography */
    --font-body:        'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-display:     'Bebas Neue', cursive;
    --font-mono:        'Courier New', monospace;
    --font-size:        14px;
    --font-size-btn:    16px;
    --font-size-subtitle: 16px;
    --font-size-title:  18px;
    --font-size-label:  12px;
    --font-weight-bold: 700;
    --font-weight-medium: 500;
    --font-uppercase:   uppercase;
    --font-italic:      italic;
    --line-height:      1.5;

    --letter-spacing-label: 0.03em;

    /* Transitions */
    --transition-fast:   0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-smooth: 0.4s ease;

    /* Layout */
    --container-max:     820px;
    --header-max:        1400px;
    --backdrop-filter:   blur(5px);
}

/* ----- Self-hosted fonts ----- */

/* Bebas Neue – latin-ext */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/bebas-neue-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Bebas Neue – latin */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/bebas-neue-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Figtree – latin-ext */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(fonts/figtree-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Figtree – latin */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(fonts/figtree-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ----- Base ----- */

::selection {
  background: rgba(255, 107, 107, 0.1);
  color: var(--brand);
}

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

body {
    font-family: var(--font-body);
    font-size: var(--font-size);
    background: var(--surface-page);
    color: var(--text-body);
    line-height: var(--line-height);
    min-height: 100vh;
    opacity: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
}

a:not(.btn) {
  border-radius: var(--radius-sm);
}
a:not(.btn):focus-visible {
  outline: var(--border-style) var(--border-width) var(--brand);
}

.btn {
    border-radius: var(--radius-pill);
    padding: var(--space-sm) var(--space-2xl);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    font-size: var(--font-size-btn);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: transform var(--transition-smooth);
    border: var(--border-width-double) var(--border-style) var(--brand);
    background: var(--btn-primary-bg);
    color: var(--white);
    box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
    transform: translateY(-2px);
    transition: transform var(--transition-smooth);
    box-shadow: var(--shadow-btn-hover);
}

.btn-secondary {
    font-size: var(--font-size-btn);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: transform var(--transition-smooth);
    border: var(--border-width-double) var(--border-style) var(--brand);
    background: var(--brand-bg);
    color: var(--brand);
    box-shadow: var(--shadow-btn);
}
.btn-secondary:hover {
    transform: translateY(-2px);
    transition: transform var(--transition-smooth);
    box-shadow: var(--shadow-btn-hover);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ----- Header ----- */
.header {
    color: var(--text-body);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}
.header-inner {
    max-width: 100%;
    width: var(--header-max);
    border-radius: var(--radius-xl);
    border: var(--border-width) var(--border-style) var(--border);
    margin: var(--space-md) auto;
    padding: var(--space-lg) var(--space-2xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    backdrop-filter: var(--backdrop-filter);
    background: var(--header-bg);
}
.header-logo {
    display: block;
    height: 36px;
    width: auto;
}
.header-btn {
    margin-left: auto;
    padding: var(--space-sm) 18px;
    border-radius: var(--radius-md);
    color: var(--text-body);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-normal);
}
.header-btn:hover {
    color: var(--brand);
    background: var(--brand-light-bg);
}

/* Notification bell */
.notif-wrapper {
    position: relative;
    margin-left: auto;
}
.notif-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--body-text);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    background: var(--brand);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
    pointer-events: none;
}
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-dropdown);
    z-index: 1000;
    padding: var(--space-sm);
    backdrop-filter: var(--backdrop-filter);
    background: var(--header-bg);
    border: var(--border-width) var(--border-style) var(--border);
}
.notif-dropdown.open {
    display: block;
}
.notif-dropdown-title {
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-bold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-label);
    padding: 8px 16px 4px;
    margin: 0;
}
.notif-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-smooth);
}
.notif-item:hover {
    background: var(--brand-light-bg);
    color: var(--brand);
}
.notif-item-name {
    font-weight: var(--font-weight-bold);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item-due {
    font-size: var(--font-size-label);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
/* When header has both bell and button */
.notif-wrapper + .header-btn {
    margin-left: 0;
}

/* ----- Layout ----- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-xl) 60px;
    padding-top: calc(var(--header-height, 100px) + 10px);
}

.section {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl) var(--space-4xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-card);
}
.section-label {
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-label);
    text-transform: var(--font-uppercase);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* ----- Landing page ----- */
.landing-text {
    text-align: justify;
    margin-bottom: 24px;
}
.landing-action {
    text-align: center;
}

/* ----- Card title ----- */
.card-meta {
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-bold);
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: var(--font-uppercase);
    letter-spacing: var(--letter-spacing-label);
}
h1.card-title {
    font-size: 26px;
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    margin-bottom: var(--space-3xl);
    color: var(--text-primary);
}
.card-due {
    margin-top: -20px;
    margin-bottom: 28px;
}

/* ----- Renderelt markdown tartalom ----- */
.card-content { line-height: 1.75; color: var(--text-body); }
.card-content h1 { font-size: 20px; margin: 16px 0 8px; color: var(--text-primary); }
.card-content h2 { font-size: 17px; margin: 14px 0 6px; color: var(--text-primary); }
.card-content h3 { font-size: 15px; margin: 12px 0 5px; color: var(--text-primary); }
.card-content p  { margin-bottom: 12px; }
.card-content ul, .card-content ol { margin: 8px 0 12px 22px; }
.card-content li { margin-bottom: 4px; }
.card-content hr { border: none; border-top: 1px solid var(--border-light); margin: 18px 0; }
.card-content code {
    background: var(--surface-code);
    color: var(--white);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 13px;
    font-family: var(--font-mono);
}
.card-content strong { font-weight: 600; }
.card-content a {
    color: var(--brand);
    text-decoration: none;
}
.card-content a:hover { text-decoration: underline; }

/* ----- Footer ----- */
.footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    padding: var(--space-2xl);
    max-width: 100%;
    width: var(--header-max);
    margin: 0 auto;
}

/* ============================================================
   Approval oldal
   ============================================================ */
.empty-content {
    color: var(--text-muted);
    font-style: var(--font-italic);
}

/* ----- Wizard progress bar ----- */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    padding: 0 10%;
}
.wizard-step {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
    transition: all var(--transition-smooth);
    position: relative;
}
.wizard-step .wizard-step-check {
    display: none;
}
.wizard-step.active {
    background: linear-gradient(135deg, var(--brand-bg), rgba(206, 16, 10, 0.15), rgba(206, 16, 10, 0.2));
    color: var(--brand);
    border: var(--border-style) var(--border-width) var(--brand);
}
.wizard-step.done {
    background: var(--success);
    color: var(--white);
}
.wizard-step.done .wizard-step-num  {
    display: none;
}
.wizard-step.done .wizard-step-check {
    display: block;
}
.wizard-line {
    flex: 1;
    height: 3px;
    background: var(--brand);
    min-width: 20px;
}

/* Wizard navigáció gombok */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-rule);
}

/* Shake animáció (validáció figyelmeztetés) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.shake { animation: shake 0.4s ease; }

/* Toast értesítés */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--accent-badge-bg);
    color: var(--white);
    padding: 14px 40px 14px 20px;
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-medium);
    box-shadow: var(--accent-shadow);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-smooth);
    z-index: 9999;
    max-width: 90vw;
    text-align: center;
    line-height: 1.4;
}
.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.toast-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: var(--font-size-title);
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    line-height: 1;
}
.toast-close:hover {
    color: var(--white);
}
.toast-success {
    background: var(--success-badge-bg);
    box-shadow: var(--success-shadow);
}

/* Batch elem fejléc */
.batch-item-num {
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-label);
    text-transform: var(--font-uppercase);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}
.batch-item-title {
    font-size: var(--font-size-title);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}
.batch-item {
    border-left: 3px solid var(--border);
}

/* Döntés blokk */
.decision-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: var(--border-width) var(--border-style) var(--border-rule);
}
.decision-label {
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-label);
    text-transform: var(--font-uppercase);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* Radio gombok */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}
.radio-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-lg);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    color: var(--text-body);
    transition: all var(--transition-smooth);
    user-select: none;
}
.radio-option input[type=radio] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.radio-option:has(input:checked) {
    border-color: var(--brand);
    background: var(--surface-selected);
}
.radio-option:has(input[value=approved]) {
    border-color: var(--border);
    color: var(--success);
}
.radio-option:has(input[value=approved]:hover) {
    border-color: var(--success);
}
.radio-option:has(input[value=approved]:checked),
.decision-badge.approved {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-bg);
    border-width: var(--border-width-double);
    border-style: var(--border-style);
}
.radio-option:has(input[value=changes]) {
    border-color: var(--border);
    color: var(--warning);
}
.radio-option:has(input[value=changes]:hover) {
    border-color: var(--warning);
}
.radio-option:has(input[value=changes]:checked),
.decision-badge.partial,
.decision-badge.neutral {
    border-color: var(--warning);
    color: var(--warning);
    background: var(--warning-bg);
    border-width: var(--border-width-double);
    border-style: var(--border-style);
}
.radio-option:has(input[value=rejected]) {
    border-color: var(--border);
    color: var(--danger);
}
.radio-option:has(input[value=rejected]:hover) {
    border-color: var(--danger);
}
.radio-option:has(input[value=rejected]:checked),
.decision-badge.rejected {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
    border-width: var(--border-width-double);
    border-style: var(--border-style);
}
.radio-option:hover {
    border-color: var(--brand);
}
.decision-badge.pending {
    border-color: var(--info);
    color: var(--info-light);
    background: var(--info-bg);
    border-width: var(--border-width-double);
    border-style: var(--border-style);
}

/* Megjegyzés textarea */
.comment-textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: var(--border-width-double) var(--border-style) var(--border);
    border-radius: var(--radius-md);
    resize: vertical;
    line-height: 1.5;
    transition: all var(--transition-smooth);
    margin-top: var(--space-xs);
}
.comment-textarea:focus {
    outline: none;
    border-color: var(--brand);
}

/* Submit szekció */
.submit-section {
    text-align: center;
    padding: 8px 0 32px;
}
.submit-inline {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: var(--border-width) var(--border-style) var(--border-rule);
}
.submit-note {
    font-size: var(--font-size-label);
    color: var(--text-muted);
    margin-top: var(--space-2xl);
    text-align: center;
}

/* ============================================================
   Snapshot oldal
   ============================================================ */
.badge {
    display: inline-block;
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-md);
    background: var(--accent-badge-bg);
    color: var(--white);
    letter-spacing: 0.var(--letter-spacing-label);
    padding: 0.5rem 1rem;
    box-shadow: var(--accent-shadow);
    outline: var(--border-width) var(--border-style) rgba(255, 255, 255, 0.1) !important;
    outline-offset: -1px;
    user-select: none;
}
.badge.badge-archive::before {
    content: "●";
    margin-right: var(--space-xs);
}

.meta-date {
    color: var(--text-muted);
    margin-bottom: var(--space-3xl);
    margin-top: -20px;
}

.decision-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    font-size: var(--font-size-subtitle);
    font-weight: var(--font-weight-bold);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
}

.comment-text {
    white-space: pre-wrap;
    word-break: break-word;
}
.no-comment {
    color: var(--text-muted);
    font-style: var(--font-italic);
}

/* Snapshot batch item */
.batch-snapshot-item .snapshot-decision-row {
    margin: 12px 0 0;
}
.snapshot-comment {
    margin: 10px 0 0;
    color: var(--text-body);
    background: var(--surface-muted);
    border: var(--border-style) var(--border-width-double) var(--border);
    padding: var(--space-sm) 14px;
    border-radius: var(--radius-sm);
    line-height: 1.6;
}

/* Details/summary – tartalom toggle */
.content-toggle {
    margin-top: 16px;
    border-top: var(--border-width) var(--border-dashed) var(--border);
    padding-top: var(--space-md);
}
.content-toggle summary {
    font-size: var(--font-size-label);
    color: var(--brand);
    cursor: pointer;
    user-select: none;
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-label);
}
.content-toggle-body {
    margin-top: 12px;
}

/* ============================================================
   History oldal – korábbi anyagok
   ============================================================ */
.history-desc {
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}
.history-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.history-label {
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-bold);
    text-transform: var(--font-uppercase);
    letter-spacing: var(--letter-spacing-label);
    color: var(--text-muted);
}
.history-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: var(--border-width-double) var(--border-style) var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-subtitle);
    color: var(--text-body);
    transition: all var(--transition-smooth);
}
.history-input:focus {
    outline: none;
    border-color: var(--brand);
}
.history-code-input {
    text-align: center;
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-label);
    max-width: 240px;
}
.history-btn {
    align-self: flex-start;
    margin-top: 4px;
}
.history-hint {
    font-size: var(--font-size-label);
    color: var(--text-placeholder);
    margin-top: var(--space-lg);
    display: inline-block;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 4px;
}
.history-hint a {
    color: var(--brand);
}
.history-resend-form {
    display: inline;
}
.history-resend-btn {
    background: none;
    border: none;
    color: var(--brand);
    cursor: pointer;
    font: inherit;
    font-size: var(--font-size-label);
    padding: 0;
    text-decoration: none;
}
.history-resend-btn:hover {
    text-decoration: underline;
}

/* Alert */
.alert {
    padding: var(--space-md) 18px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}
.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: var(--border-width) var(--border-style) var(--danger-border);
}

/* History lista */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: var(--space-lg) var(--space-xl);
    background: var(--surface-subtle);
    border: var(--border-width) var(--border-style) var(--border-light);
    border-radius: var(--radius-md) !important;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-smooth);
}
.history-item:hover {
    background: var(--surface-hover);
    border-color: #ccc;
}
.history-item:hover .history-item-title {
    color: var(--brand);
}
.history-item-main {
    flex: 1;
    min-width: 0;
}
.history-item-title {
    font-size: var(--font-size-subtitle);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 2px;
}
.history-item-date {
    font-size: var(--font-size-label);
    color: var(--text-placeholder);
}
.history-item-badge {
    flex-shrink: 0;
}

/* Pending items */
.pending-section-title,
.history-section-title {
    font-size: var(--font-size-title);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    text-transform: var(--font-uppercase);
    letter-spacing: var(--letter-spacing-label);
    margin-top: 8px;
    margin-bottom: 6px;
}
.pending-list {
    margin-bottom: 24px;
}
.pending-item {
    border-left: 3px solid var(--info);
}

/* ----- Responsive ----- */
@media (max-width: 600px) {
    .section { padding: 20px 18px; }
    h1.card-title { font-size: 21px; }
    .radio-group { flex-direction: column; }
    .batch-snapshot-item .snapshot-decision-row { flex-direction: column; }
    .history-item { flex-direction: column; align-items: flex-start; }
    .header-btn { padding: 6px 12px; font-size: 12px; }
    .notif-dropdown { width: calc(100vw - 32px); right: -8px; }
}
