/* ============================================================
   LicenseReg EU - Premium EU Government-Inspired Design
   Color Palette: Deep Navy, EU Blue, Gold Accents
   ============================================================ */

/* ============================================================
   Page Preloader — EU Directory Scanning Illusion
   ============================================================ */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 40%, #0d2147 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    max-width: 420px;
    padding: 2rem;
}

/* EU Emblem */
.preloader-eu-emblem {
    margin-bottom: 1.5rem;
    animation: preloaderPulse 2s ease-in-out infinite;
}

.preloader-eu-emblem svg {
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(0, 51, 153, 0.4), 0 0 60px rgba(200, 169, 81, 0.15);
}

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

/* Spinning ring */
.preloader-ring-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.preloader-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(200, 169, 81, 0.15);
    border-top-color: #c8a951;
    border-right-color: #c8a951;
    border-radius: 50%;
    animation: preloaderSpin 1s linear infinite;
}

@keyframes preloaderSpin {
    to { transform: rotate(360deg); }
}

/* Title */
.preloader-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

/* Subtitle text */
.preloader-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: rgba(200, 169, 81, 0.85);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
}

/* Step indicators */
.preloader-steps {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
    text-align: left;
}

.preloader-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.5s ease, transform 0.3s ease;
    padding-left: 0.5rem;
}

.preloader-step i {
    font-size: 0.85rem;
    width: 18px;
    text-align: center;
    transition: color 0.5s ease;
}

.preloader-step.active {
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.preloader-step.active i {
    color: #c8a951;
}

.preloader-step.done {
    color: rgba(200, 169, 81, 0.7);
}

.preloader-step.done i {
    color: #4ade80;
}

/* Progress bar */
.preloader-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.preloader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #003399, #c8a951);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Counter */
.preloader-counter {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
}

.preloader-counter span {
    font-weight: 600;
    color: rgba(200, 169, 81, 0.6);
    font-variant-numeric: tabular-nums;
}

/* Hide main content until preloader done */
body.preloading .ec-masthead,
body.preloading .main-content,
body.preloading .ec-footer {
    opacity: 0;
}

body:not(.preloading) .ec-masthead,
body:not(.preloading) .main-content,
body:not(.preloading) .ec-footer {
    animation: preloaderReveal 0.6s ease forwards;
}

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

/* AJAX Search Overlay Enhancement */
.loading-overlay .loading-steps {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
    text-align: center;
}

.loading-overlay .loading-step {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.3;
    transition: opacity 0.4s ease, color 0.4s ease;
}

.loading-overlay .loading-step.active {
    opacity: 1;
    color: var(--eu-blue);
}

.loading-overlay .loading-step.done {
    opacity: 0.6;
    color: var(--success);
}

.loading-overlay .search-counter {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-variant-numeric: tabular-nums;
}

:root {
    --navy: #1a2744;
    --navy-light: #243352;
    --eu-blue: #003399;
    --eu-blue-light: #0044cc;
    --gold: #c8a951;
    --gold-light: #dfc374;
    --gold-dark: #a88b3d;
    --surface: #f8f9fc;
    --surface-alt: #eef1f7;
    --border: #d4dbe8;
    --text-primary: #1a2744;
    --text-secondary: #5a6a85;
    --success: #198754;
    --warning: #d4a017;
    --danger: #c0392b;
    --info: #2980b9;
}

/* ============================================================
   Base & Typography
   ============================================================ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--surface);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ============================================================
   EC-Style Institutional Masthead
   (Inspired by European Commission official header)
   ============================================================ */

.ec-masthead {
    position: relative;
    z-index: 100;
}

/* Top thin gold accent line */
.ec-accent-line {
    height: 4px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
}

/* Main masthead area — white background, EU flag + brand */
.ec-masthead-main {
    background: #fff;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
}

.ec-brand-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.ec-brand-link:hover {
    opacity: 0.85;
    color: inherit;
}

/* EU Flag (rectangular, like the real EU flag) */
.ec-flag {
    flex-shrink: 0;
    width: 52px;
    height: 36px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ec-brand-text {
    display: flex;
    flex-direction: column;
}

.ec-brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.ec-brand-desc {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    margin-top: 1px;
}

/* Blue institutional bar (below masthead, like EC navigation bar) */
.ec-blue-bar {
    background: linear-gradient(180deg, var(--eu-blue), #002a80);
    padding: 0.55rem 0;
    box-shadow: 0 2px 8px rgba(0, 51, 153, 0.2);
}

.ec-bar-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Admin links in blue bar (only visible when logged in) */
.ec-admin-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ec-admin-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ec-admin-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* ============================================================
   Main Content
   ============================================================ */

.main-content {
    flex: 1;
}

/* ============================================================
   Cards - Government-style
   ============================================================ */

.gov-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gov-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.gov-card-header {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid var(--gold);
}

.gov-card-header h2,
.gov-card-header h3,
.gov-card-header h4 {
    margin: 0;
    font-weight: 700;
}

.gov-card-header .subtitle {
    color: var(--gold-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.gov-card-body {
    padding: 1.5rem;
}

/* ============================================================
   Validation Form (Home Page)
   ============================================================ */

.validation-hero {
    text-align: center;
    padding: 2rem 0 1rem;
}

.validation-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.validation-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto;
}

.validation-card {
    max-width: 560px;
    margin: 0 auto;
}

.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--eu-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.12);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-gov {
    background: linear-gradient(135deg, var(--eu-blue), var(--eu-blue-light));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 51, 153, 0.25);
}

.btn-gov:hover {
    background: linear-gradient(135deg, var(--eu-blue-light), var(--eu-blue));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 51, 153, 0.35);
}

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

.btn-gov-outline {
    background: transparent;
    border: 2px solid var(--eu-blue);
    color: var(--eu-blue);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-gov-outline:hover {
    background: var(--eu-blue);
    color: #fff;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    color: var(--navy);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(200, 169, 81, 0.3);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(200, 169, 81, 0.4);
}

/* ============================================================
   Result Page
   ============================================================ */

.result-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid var(--gold);
}

.result-logo {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    background: #fff;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.result-logo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--gold);
}

.result-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.result-subtitle {
    color: var(--gold-light);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Detail grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.detail-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--surface-alt);
}

.detail-item:nth-child(odd) {
    border-right: 1px solid var(--surface-alt);
}

.detail-item.full-width {
    grid-column: 1 / -1;
    border-right: none;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
    white-space: pre-line;
}

/* QR Code sidebar card */
.qr-card {
    text-align: center;
    padding: 1.5rem;
}

.qr-image {
    width: 200px;
    height: 200px;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qr-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

/* ============================================================
   Status Badges
   ============================================================ */

.badge-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-status.active {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.badge-status.dissolved,
.badge-status.cancelled {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.badge-status.expired,
.badge-status.suspended {
    background: rgba(212, 160, 23, 0.1);
    color: #9a7b0a;
    border: 1px solid rgba(212, 160, 23, 0.2);
}

.badge-status.struck_off,
.badge-status.revoked,
.badge-status.liquidation {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
    border: 1px solid rgba(192, 57, 43, 0.2);
}

/* Code type badges (small - for accordion headers) */
.badge-type {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    letter-spacing: 0.03em;
}

/* Code type badges (large - for result detail grid) */
.badge-category {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    letter-spacing: 0.02em;
}

.badge-type.business_license,
.badge-category.business_license {
    background: rgba(0, 51, 153, 0.1);
    color: var(--eu-blue);
    border: 1px solid rgba(0, 51, 153, 0.15);
}

.badge-type.tax_id,
.badge-category.tax_id {
    background: rgba(200, 169, 81, 0.1);
    color: var(--gold-dark);
    border: 1px solid rgba(200, 169, 81, 0.2);
}

.badge-type.custom,
.badge-category.custom {
    background: rgba(108, 117, 125, 0.08);
    color: #5a6a85;
    border: 1px solid rgba(108, 117, 125, 0.15);
}

/* ============================================================
   Admin Tables
   ============================================================ */

.gov-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.gov-table thead th {
    background: var(--surface-alt);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.gov-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--surface-alt);
    vertical-align: middle;
    font-size: 0.9rem;
}

.gov-table tbody tr {
    transition: background-color 0.15s ease;
}

.gov-table tbody tr:hover {
    background-color: rgba(0, 51, 153, 0.02);
}

.table-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.table-logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
}

.table-qr {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* ============================================================
   Admin Login
   ============================================================ */

.login-card {
    max-width: 420px;
    margin: 3rem auto;
}

.login-card .gov-card-header {
    text-align: center;
    padding: 2rem;
}

.login-shield {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

/* ============================================================
   EC-Style Institutional Footer
   (Mirrors the EC masthead: blue bar + white main area + gold line)
   ============================================================ */

.ec-footer {
    margin-top: auto;
}

/* Top blue bar in footer (mirrors header blue bar) */
.ec-footer-blue-bar {
    background: linear-gradient(180deg, var(--eu-blue), #002a80);
    padding: 0.6rem 0;
}

.ec-footer-bar-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.ec-footer-bar-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ec-footer-bar-link:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

/* Main footer area (white, mirroring header masthead) */
.ec-footer-main {
    background: #fff;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
}

/* Footer brand (EU flag + text) */
.ec-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Smaller flag variant for footer */
.ec-flag-sm {
    width: 44px;
    height: 30px;
}

.ec-footer-brand-text {
    display: flex;
    flex-direction: column;
}

.ec-footer-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
}

.ec-footer-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

/* Copyright & legal */
.ec-footer-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ec-footer-copy {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ec-footer-legal {
    font-size: 0.68rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ============================================================
   Animations
   ============================================================ */

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Staggered animation for cards and rows */
.animate-stagger > * {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.25s; }

/* Loading spinner */
.spinner-gov {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--eu-blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(248, 249, 252, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-text {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* ============================================================
   Admin Form Styles
   ============================================================ */

.admin-form .form-group {
    margin-bottom: 1.25rem;
}

.logo-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    border: 2px solid var(--border);
    object-fit: cover;
    display: none;
}

.logo-preview.visible {
    display: block;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper .form-control {
    cursor: pointer;
}

/* ============================================================
   Search Page - ASIC-Inspired Layout
   ============================================================ */

/* Info banner below navbar */
.search-banner {
    background: linear-gradient(135deg, #e8eef8, #eef1f7);
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: -1rem -12px 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    width: calc(100% + 24px);
    position: relative;
    left: -12px;
}

.search-banner i {
    color: var(--eu-blue);
    font-size: 0.9rem;
}

/* Search panel structured layout */
.search-panel .gov-card-body {
    padding: 2rem;
}

/* "Search within" / "For" label pattern (ASIC-inspired) */
.search-field-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.search-label {
    min-width: 110px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--navy);
    padding-top: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.search-field-input {
    flex: 1;
}

/* Info Accordion Panels */
.info-accordion-header {
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
}

.info-accordion-item {
    border: none !important;
    border-bottom: 1px solid var(--surface-alt) !important;
}

.info-accordion-item:last-child {
    border-bottom: none !important;
}

.info-accordion-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: none;
}

.info-accordion-btn:not(.collapsed) {
    background: rgba(0, 51, 153, 0.03);
    color: var(--eu-blue);
    box-shadow: none;
}

.info-accordion-btn:focus {
    box-shadow: none;
    border-color: transparent;
}

.info-accordion-btn::after {
    width: 1rem;
    height: 1rem;
    background-size: 1rem;
}

.info-accordion-body {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem 1rem;
    line-height: 1.6;
}

.info-list {
    padding-left: 1.25rem;
}

.info-list li {
    margin-bottom: 0.3rem;
}

.info-list li:last-child {
    margin-bottom: 0;
}

/* Sidebar Cards */
.sidebar-card {
    border-radius: 12px;
}

.sidebar-card-header {
    padding: 0.85rem 1.25rem;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
}

.sidebar-card-header h6 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-card-body {
    padding: 1rem 1.25rem;
}

/* Quick Links */
.quick-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links-list li {
    border-bottom: 1px solid var(--surface-alt);
}

.quick-links-list li:last-child {
    border-bottom: none;
}

.quick-links-list a {
    display: block;
    padding: 0.6rem 0;
    color: var(--eu-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-links-list a:hover {
    color: var(--eu-blue-light);
    padding-left: 4px;
}

.quick-links-list a i {
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.quick-links-list a:hover i {
    color: var(--eu-blue);
}

/* Stats Counter */
.stat-counter {
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--eu-blue);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

/* Security Icon */
.security-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: rgba(0, 51, 153, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--eu-blue);
}

/* ============================================================
   EU Flag / Stars Inline Icons
   ============================================================ */

/* Inline SVG flag icon sizing for banners */
.eu-flag-icon {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

/* Small inline star motif used inside accordion body text */
.eu-stars-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--eu-blue);
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
}

.eu-stars-inline::after {
    content: '\2605';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    color: var(--gold);
}

/* Security badge with EU flag SVG */
.eu-security-badge {
    background: rgba(0, 51, 153, 0.08);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
}

/* Footer SVG sizing */
.footer-eu-flag {
    flex-shrink: 0;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 991.98px) {
    .search-banner {
        margin: -1rem -12px 0 -12px;
        width: calc(100% + 24px);
    }
}

@media (max-width: 768px) {
    /* EC Masthead responsive */
    .ec-masthead-main {
        padding: 0.85rem 0;
    }

    .ec-flag {
        width: 42px;
        height: 28px;
    }

    .ec-brand-name {
        font-size: 1.15rem;
    }

    .ec-brand-desc {
        font-size: 0.68rem;
    }

    .ec-blue-bar {
        padding: 0.45rem 0;
    }

    .ec-bar-label {
        font-size: 0.7rem;
    }

    .ec-admin-links a {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    /* Grid & Result responsive */
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-item:nth-child(odd) {
        border-right: none;
    }

    .result-header {
        flex-direction: column;
        text-align: center;
    }

    .validation-hero h1 {
        font-size: 1.5rem;
    }

    .result-title {
        font-size: 1.25rem;
    }

    .qr-image {
        width: 160px;
        height: 160px;
    }

    /* Search page responsive */
    .search-field-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .search-label {
        min-width: auto;
        padding-top: 0;
        font-size: 0.82rem;
    }

    .search-panel .gov-card-body {
        padding: 1.25rem;
    }

    .search-banner {
        font-size: 0.75rem;
        text-align: center;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* EC Footer responsive */
    .ec-footer-blue-bar {
        text-align: center;
        padding: 0.5rem 0;
    }

    .ec-footer-bar-text {
        font-size: 0.68rem;
        display: block;
    }

    .ec-footer-bar-link {
        font-size: 0.68rem;
    }

    .ec-footer-main {
        padding: 1rem 0;
    }

    .ec-footer-brand {
        justify-content: center;
    }

    .ec-flag-sm {
        width: 36px;
        height: 24px;
    }

    .ec-footer-name {
        font-size: 0.9rem;
    }

    .ec-footer-desc {
        font-size: 0.65rem;
    }

    .ec-footer-meta {
        text-align: center;
    }
}

/* ============================================================
   Utilities
   ============================================================ */

/* ============================================================
   Security: Lockout Warning & Security Log
   ============================================================ */

/* Lockout warning on login page */
.lockout-warning {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid rgba(192, 57, 43, 0.2);
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.lockout-icon {
    font-size: 2rem;
    color: var(--danger);
    margin-bottom: 0.5rem;
}

.lockout-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 0.35rem;
}

.lockout-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.lockout-timer {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(192, 57, 43, 0.08);
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

/* Security notice below login form */
.security-notice {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-alt);
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 0.01em;
}

/* Security log badges */
.sec-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    white-space: nowrap;
}

.sec-badge-success {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.15);
}

.sec-badge-failed {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
    border: 1px solid rgba(192, 57, 43, 0.15);
}

.sec-badge-info {
    background: rgba(0, 51, 153, 0.1);
    color: var(--eu-blue);
    border: 1px solid rgba(0, 51, 153, 0.15);
}

.sec-badge-warning {
    background: rgba(212, 160, 23, 0.1);
    color: #9a7b0a;
    border: 1px solid rgba(212, 160, 23, 0.15);
}

.sec-badge-danger {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
    border: 1px solid rgba(192, 57, 43, 0.15);
}

.sec-badge-default {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.15);
}

/* ============================================================
   Utilities
   ============================================================ */

.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-eu-blue { color: var(--eu-blue); }
.bg-surface { background-color: var(--surface); }
.border-gold { border-color: var(--gold) !important; }
