/* ===== VARIABLES & FOUNDATION ===== */
:root {
    --color-primary: #B71C1C;
    --color-primary-light: #E53935;
    --color-bg: #fafbfc;
    --color-text: #1a202c;
    --color-text-muted: #718096;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --color-shadow: rgba(0, 0, 0, 0.08);
    --color-shadow-md: rgba(0, 0, 0, 0.12);
    --color-shadow-subtle: rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 6px;
    --min-width-narrow: 320px;
    --max-width-narrow: 600px;
    --max-width-wide: 760px;
    --breakpoint-mobile: 520px;
    --transition: all 0.2s ease;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

label {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"] {
    font-size: 1rem;
    padding: 12px 14px;
    margin-bottom: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: 300px;
    max-width: 420px;
    box-sizing: border-box;
    transition: var(--transition);
    text-align: center;
    height: 44px;
    max-height: 44px;
    background: var(--color-white);
}

input[type="text"]:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.1);
}

button {
    font-size: 1rem;
    font-weight: 600;
    padding: 0 20px;
    height: 44px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background-color: var(--color-primary-light);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.3);
    transform: translateY(-1px);
}

/* ===== TOPBAR (INPUT & LOOKUP) ===== */
.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 80%;
    min-width: var(--min-width-narrow);
    max-width: var(--max-width-narrow);
    box-sizing: border-box;
    padding: 12px 6px;
    justify-content: center;
    margin-top: 70px;
}

.topbar button {
    padding: 0 16px;
}

.data-box {
    width: 80%;
    min-width: var(--min-width-narrow);
    max-width: var(--max-width-narrow);
    padding: 28px 24px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 2px 8px var(--color-shadow), 0 1px 3px var(--color-shadow-subtle);
    margin-bottom: 16px;
    transition: var(--transition);
}

.data-box:hover {
    box-shadow: 0 8px 16px var(--color-shadow-md), 0 2px 6px var(--color-shadow-subtle);
    border-color: var(--color-primary-light);
}

.data-multi {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-large {
    font-size: 6.8em;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.data-small,
.data-description {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--color-text);
}

/* ===== TABS & NAVIGATION ===== */
.tabs {
    display: flex;
    gap: 8px;
    width: 100%;
    padding: 15px 15px;
    box-sizing: border-box;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-bg);
    z-index: 120;
    box-shadow: 0 1px 0 var(--color-shadow-subtle);
}

.tab-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    min-width: 160px;
    touch-action: manipulation;
}

.tab-button svg {
    display: block;
}

.tab-button.active {
    background: var(--color-primary);
    color: #fff;
}

.tab-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.data-box {
    width: 80%;
    max-width: var(--max-width-narrow);
    padding: 28px 24px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 2px 8px var(--color-shadow), 0 1px 3px var(--color-shadow-subtle);
    margin-bottom: 16px;
    transition: var(--transition);
}

.data-box:hover {
    box-shadow: 0 8px 16px var(--color-shadow-md), 0 2px 6px var(--color-shadow-subtle);
    border-color: var(--color-primary-light);
}

.data-multi {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-large {
    font-size: 5em;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.data-small,
.data-description {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--color-text);
}

/* ===== TABS & NAVIGATION ===== */
.tabs {
    display: flex;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-bg);
    z-index: 120;
    box-shadow: 0 1px 0 var(--color-shadow-subtle);
}

.tab-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    min-width: 160px;
    touch-action: manipulation;
}

.tab-button svg {
    display: block;
}

.tab-button.active {
    background: var(--color-primary);
    color: #fff;
}

.tab-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== PANELS ===== */
.panels {
    width: 100%;
    max-width: var(--max-width-wide);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px;
}

.panel[hidden] {
    display: none;
}

/* ===== ACTIONS ===== */
.actions {
    margin-top: 8px;
}

.actions .primary {
    font-size: 1.1em;
    padding: 10px 18px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
}

/* ===== RESPONSIVE ===== */
@media (max-width: var(--breakpoint-mobile)) {
    .tab-button span {
        font-size: 0.9em;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 90%;
        margin-top: 100px;
    }

    .topbar input[type="text"] {
        width: 100%;
    }

    .data-large {
        font-size: 3.6em;
        padding: 14px;
    }

    .data-small,
    .data-description {
        font-size: 1.6em;
    }
}
