/* ============================
   Design System
============================ */
:root {
    color-scheme: light dark;

    /* Base colors */
    --bg-color: #fff;
    --text-color: #222;
    --link-color: #1a73e8;
    --bg: var(--bg-color);
    --card: #fff;
    --text: var(--text-color);
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: var(--link-color);
    --positive: #166534;
    --negative: #991b1b;

    /* Header */
    --bg-header: #fff;
    --text-header: #111827;

    /* Inputs */
    --input-bg: var(--card);
    --input-text: var(--text);
    --input-border: var(--border);

    /* Typography */
    --font-base: system-ui, -apple-system, "Segoe UI", "Roboto", sans-serif;

    /* Layout */
    --radius: 12px;
    --max-width: 1100px;
    --tool-width: 720px;
    --header-height: 72px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;

    /* Utilities */
    --bg-soft: color-mix(in srgb, var(--card) 92%, var(--bg));
    --text-muted: var(--muted);
    --border-color: var(--border);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 6%);
    --shadow-md: 0 4px 12px rgb(0 0 0 / 8%);
    --shadow-lg: 0 8px 24px rgb(0 0 0 / 12%);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
}

/* ============================
   Separator
============================ */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-md) 0;
}

/* ============================
   Dark Mode
============================ */
[data-theme="dark"],
html.dark {
    color-scheme: dark;

    --bg-color: #121212;
    --text-color: #e6e6e6;
    --link-color: #8ab4f8;
    --bg: var(--bg-color);
    --card: #020617;
    --text: var(--text-color);
    --muted: #94a3b8;
    --border: #1e293b;
    --bg-header: #020617;
    --text-header: #e5e7eb;
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 30%);
    --shadow-md: 0 4px 12px rgb(0 0 0 / 40%);
    --shadow-lg: 0 8px 24px rgb(0 0 0 / 50%);
}

/* ============================
   Reset / Base
============================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

html {
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: var(--font-base);
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: clip;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

/* ============================
   Layout
============================ */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    padding-top: var(--space-xl);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ============================
   Typography
============================ */
h1 {
    font-size: 1.8rem;
    margin: 0 0 var(--space-sm);
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

/* ============================
   Cards
============================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
    width: 100%;
    transition: box-shadow var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card p {
    margin-bottom: 0.75rem;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Content pages (About, Terms, etc.) */
.about-card p,

.tool.placeholder-card p {
    max-width: 60ch;
    margin: 0 auto 0.75rem;
    text-align: left;
}

.about-card p:last-child,

.tool.placeholder-card p:last-child {
    margin-bottom: 0;
}

/* Lists inside cards */
.tool.placeholder-card ul {
    list-style-position: outside;
    padding-left: 1.25rem;
    text-align: left;
    max-width: 60ch;
    margin: 0.75rem auto;
}

.tool.placeholder-card li {
    margin-bottom: 0.4rem;
    color: var(--muted);
    text-align: left;
}

.tool.placeholder-card li:last-child {
    margin-bottom: 0;
}

/* Subtitles inside cards */
.tool.placeholder-card h2,

.tool.placeholder-card h3 {
    margin: 1.5rem auto 0.75rem;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
    text-align: left;
    max-width: 60ch;
}

.tool.placeholder-card h2:first-of-type,

.tool.placeholder-card h3:first-of-type {
    margin-top: 0;
}

.tool.placeholder-card h3 + p,

.tool.placeholder-card h3 + ul,

.tool.placeholder-card h2 + p,

.tool.placeholder-card h2 + ul {
    margin-top: 0;
}

/* Placeholder badge */
.placeholder-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 0;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
}

/* ============================
   Tool – Layout
============================ */
.tool-wrap,

.tool-container {
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.tool-wrap.xlarge {
    max-width: 898px;
}

.tool-wrap.large {
    max-width: 838px;
}

.tool-wrap.medium {
    max-width: 720px;
}

.tool-wrap.small {
    max-width: 638px;
}

.tool-wrap.xsmall {
    max-width: 578px;
}

/* Default container for placeholder pages */
.tool-container {
    max-width: 900px;
}



.tool {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    transition: box-shadow var(--transition-base);
}

.tool:hover {
    box-shadow: var(--shadow-md);
}

/* Placeholder cards (About, Contact, etc.) */
.tool.placeholder-card {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.tool.placeholder-card .tool-title,

.tool.placeholder-card h1 {
    text-align: center;
    margin-bottom: var(--space-md);
}

.tool.placeholder-card .tool-description {
    text-align: center;
    margin: 0 auto;
}

/* ============================
   Inputs
============================ */
input,

select,

textarea {
    background: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    min-height: 44px;
    transition: all var(--transition-fast);
}

textarea {
    width: 100%;
    min-height: 200px;
    box-sizing: border-box;
}

input:hover,

select:hover,

textarea:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, var(--input-border));
}

input:focus,

select:focus,

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

/* ============================
   Buttons – Complete System
============================ */

/* Base button */
button,

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

button:hover,

.btn:hover {
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active,

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

button:disabled,

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Primary button */
.btn-primary,
button.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm),
    0 0 0 0 color-mix(in srgb, var(--primary) 30%, transparent);
}

.btn-primary:hover,

button.primary:hover {
    background: color-mix(in srgb, var(--primary) 90%, black);
    border-color: color-mix(in srgb, var(--primary) 90%, black);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent),
    0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}

.btn-primary:active,

button.primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm),
    0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Secondary button */
.btn-secondary,

button.secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,

button.secondary:hover {
    background: color-mix(in srgb, var(--text) 4%, var(--card));
    border-color: color-mix(in srgb, var(--text) 20%, var(--border));
}

/* Ghost/transparent button */
.btn-ghost,

button.ghost {
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
}

.btn-ghost:hover,

button.ghost:hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border-color: color-mix(in srgb, var(--primary) 20%, transparent);
    box-shadow: none;
}

/* Reset button */
.reset-btn,

button[type="reset"] {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    box-shadow: none;
    font-weight: 500;
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.85rem;
}

.reset-btn:hover,

button[type="reset"]:hover {
    background: color-mix(in srgb, var(--negative) 15%, var(--card));
    border-color: var(--negative);
    color: var(--negative);
    box-shadow: none;
}

.reset-btn:active,

button[type="reset"]:active {
    background: transparent !important;
    border-color: var(--border) !important;
    color: var(--muted) !important;
    box-shadow: none;
}

.reset-btn:focus,

button[type="reset"]:focus {
    outline: none;
    background: transparent !important;
    border-color: var(--border) !important;
    color: var(--muted) !important;
    box-shadow: none !important;
}

.reset-btn:focus-visible,

button[type="reset"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Size variants */
.btn-sm {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.85rem;
}

.btn-lg {
    min-height: 48px;
    padding: 0 var(--space-lg);
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ============================
   Pill Button (CTA)
============================ */
.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: 48px;
    padding: 0 28px;
    border-radius: 9999px;
    border: 2px solid transparent;
    background: var(--card);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.btn-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-pill:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Primary Pill */
.btn-pill-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px color-mix(in srgb, var(--primary) 30%, transparent),
    0 2px 4px -1px color-mix(in srgb, var(--primary) 20%, transparent);
}

.btn-pill-primary:hover {
    background: color-mix(in srgb, var(--primary) 90%, black);
    border-color: color-mix(in srgb, var(--primary) 90%, black);
    box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--primary) 35%, transparent),
    0 4px 6px -2px color-mix(in srgb, var(--primary) 25%, transparent);
}

/* Secondary Pill */
.btn-pill-secondary {
    background: var(--card);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-pill-secondary:hover {
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

/* Ghost Pill */
.btn-pill-ghost {
    background: transparent;
    border: 2px solid transparent;
    box-shadow: none;
}

.btn-pill-ghost:hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border-color: color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Pill sizes */
.btn-pill-sm {
    min-height: 40px;
    padding: 0 20px;
    font-size: 0.9rem;
}

.btn-pill-lg {
    min-height: 56px;
    padding: 0 32px;
    font-size: 1.1rem;
}

/* Affiliate button */
.btn-affiliate {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.85rem;
    width: fit-content;
}

/* ============================
   Value Proposition
============================ */
section.value-prop > .card {
    background: color-mix(in srgb, var(--card) 75%, var(--bg));
    color: var(--text);
    border: 1px solid var(--border);
}

section.value-prop > .card p {
    color: color-mix(in srgb, var(--text) 85%, var(--muted));
}

/* ============================
   Spreadsheet Preview (animated images)
============================ */
.planilha-preview {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0;
}

.planilha-preview img {
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: 12px;
}

/* ============================
   Utility Classes
============================ */

/* Margins */
.m-0 {
    margin: 0;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.ml-0 {
    margin-left: 0;
}

.mr-0 {
    margin-right: 0;
}

.mt-xs {
    margin-top: var(--space-xs);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.ml-sm {
    margin-left: var(--space-sm);
}

.ml-md {
    margin-left: var(--space-md);
}

.mr-sm {
    margin-right: var(--space-sm);
}

.mr-md {
    margin-right: var(--space-md);
}

/* Paddings */
.p-0 {
    padding: 0;
}

.p-sm {
    padding: var(--space-sm);
}

.p-md {
    padding: var(--space-md);
}

.p-lg {
    padding: var(--space-lg);
}

.p-xl {
    padding: var(--space-xl);
}

.pt-sm {
    padding-top: var(--space-sm);
}

.pt-md {
    padding-top: var(--space-md);
}

.pt-lg {
    padding-top: var(--space-lg);
}

.pb-sm {
    padding-bottom: var(--space-sm);
}

.pb-md {
    padding-bottom: var(--space-md);
}

.pb-lg {
    padding-bottom: var(--space-lg);
}

/* Text */
.text-left {
    text-align: left;
}

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

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-muted {
    color: var(--muted);
}

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

.text-positive {
    color: var(--positive);
}

.text-negative {
    color: var(--negative);
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Display */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

/* Flex */
.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

/* Gaps */
.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* Grid */
.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Width */
.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.max-w-full {
    max-width: 100%;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

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

.overflow-y-auto {
    overflow-y: auto;
}

/* Border */
.border {
    border: 1px solid var(--border);
}

.border-t {
    border-top: 1px solid var(--border);
}

.border-b {
    border-bottom: 1px solid var(--border);
}

.border-l {
    border-left: 1px solid var(--border);
}

.border-r {
    border-right: 1px solid var(--border);
}

.border-0 {
    border: none;
}

.rounded {
    border-radius: var(--radius);
}

.rounded-sm {
    border-radius: 6px;
}

.rounded-lg {
    border-radius: 16px;
}

.rounded-full {
    border-radius: 9999px;
}

/* Background */
.bg-card {
    background: var(--card);
}

.bg-primary {
    background: var(--primary);
}

.bg-transparent {
    background: transparent;
}

/* Shadows */
.shadow-none {
    box-shadow: none;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* Opacity */
.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.opacity-100 {
    opacity: 1;
}

/* Transitions */
.transition {
    transition: all var(--transition-base);
}

.transition-fast {
    transition: all var(--transition-fast);
}

/* ============================
   Dark Mode – Specific Adjustments
============================ */
html.dark button,

html.dark .btn {
    background: color-mix(in srgb, var(--card) 90%, white);
    color: var(--text);
    border-color: var(--border);
}

html.dark button:hover,

html.dark .btn:hover {
    background: color-mix(in srgb, var(--primary) 15%, var(--card));
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

html.dark .btn-primary,

html.dark button.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

html.dark .btn-primary:hover,

html.dark button.primary:hover {
    background: color-mix(in srgb, var(--primary) 85%, black);
}

html.dark .btn-secondary,

html.dark button.secondary {
    background: color-mix(in srgb, var(--bg) 95%, white);
}

html.dark .reset-btn:hover,

html.dark button[type="reset"]:hover {
    background: color-mix(in srgb, var(--negative) 25%, var(--card));
    border-color: var(--negative);
    color: var(--negative);
}

html.dark .reset-btn:active,

html.dark button[type="reset"]:active {
    background: transparent !important;
    border-color: var(--border) !important;
    color: var(--muted) !important;
}

/* Dark Mode - Pill Buttons */
html.dark .btn-pill {
    background: color-mix(in srgb, var(--card) 90%, white);
    color: var(--text);
}

html.dark .btn-pill-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

html.dark .btn-pill-primary:hover {
    background: color-mix(in srgb, var(--primary) 85%, black);
    border-color: color-mix(in srgb, var(--primary) 85%, black);
}

html.dark .btn-pill-secondary {
    background: color-mix(in srgb, var(--bg) 95%, white);
    border-color: var(--border);
}

html.dark .btn-pill-secondary:hover {
    background: color-mix(in srgb, var(--primary) 15%, var(--card));
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

/* ============================
   Mobile
============================ */
@media (width <= 768px) {
    :root {
        --header-height: 64px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .container,
    .tool-wrap,
    .tool-container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .tool-wrap {
        width: 100%;
    }

    .card,
    .tool,
    .calc-card {
        overflow-x: hidden;
    }

    .tool {
        padding: var(--space-lg);
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .tool-actions:not(.center) > button,
    .tool-actions:not(.center) > .btn {
        width: 100%;
    }

    .result-value {
        overflow-wrap: break-word;
        word-break: normal;
    }
}

/* ============================
   Custom Scrollbar
============================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* Extra small screens */
@media (width <= 380px) {
    :root {
        --space-lg: 16px;
        --space-xl: 24px;
    }

    h1 {
        font-size: 1.25rem;
    }

    .tool {
        padding: var(--space-md);
    }
}

/* ============================
   Common Components (Tools)
   Consolidation of .field, .result, .message
============================ */

/* Tool Header (Generic) */
.tool-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-lg);
    padding: 0 var(--space-md);
}

.tool-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.tool-header .subtitle,
.tool-header .tool-description,
.tool-header .tool-subtitle {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

/* Form Fields (.field) */
.field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: 12px;
}

.field label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.field input,
.field select {
    width: 100%;
}

.field small {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Results (.result) and (.result-card) to avoid conflicts */
.result-card,
.result {
    margin-bottom: var(--space-sm);
    padding: var(--space-md);
    background: color-mix(in srgb, var(--primary) 5%, var(--card));
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
    border-radius: 10px;
}

.result-label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: var(--space-xs);
}

.result-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

/* Balance state (used in banco-horas and margem) */
.saldo-positivo {
    color: var(--positive);
}

.saldo-negativo {
    color: var(--negative);
}

/* Messages (.message) */
.message {
    font-size: 0.85rem;
    padding: var(--space-sm) 12px;
    border-radius: 8px;
    line-height: 1.4;
    margin-top: var(--space-sm);
}

.message.info {
    background: transparent;
    color: var(--muted);
    border: none;
    padding: 0;
}

.message.warning {
    background: color-mix(in srgb, #f59e0b 10%, var(--card));
    color: #b45309;
    border: 1px solid color-mix(in srgb, #f59e0b 30%, var(--border));
}

.message.success {
    background: color-mix(in srgb, #10b981 10%, var(--card));
    color: #047857;
    border: 1px solid color-mix(in srgb, #10b981 30%, var(--border));
}

/* Calculator Layout (Tools) */
.calculator {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.calc-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.tool-context {
    max-width: 720px;
    margin: var(--space-lg) auto 0;
}

/* Default action group */
.tool-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Helper text */
.hint {
    font-size: 0.875rem;
    color: var(--muted);
}

/* SEO/UX responsive safety */
@media (width <= 1024px) {
  .container, .tool-wrap, .tool-container {
    max-width: 100%;
  }
}

@media (width <= 768px) {
  body {
    overflow-x: hidden;
  }

  input, select, textarea, button, .btn {
    min-height: 44px;
  }
}

.checklist-page .page-content {
    min-height: calc(100vh - var(--header-height) - 120px);
}

.conversor-page .page-content {
    min-height: 70vh;
}

.conversor-page .header-actions {
    min-height: 40px;
    display: flex;
    align-items: center;
}

.conversor-page button,
.conversor-page select,
.conversor-page input {
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.conversor-page .tool-conversor,
.conversor-page .calc-card {
    min-height: 300px;
}

.conversor-page .drawer-body a,
.conversor-page .nav-dropdown a {
    box-sizing: border-box;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    padding-left: 13px;
    font-weight: 500;
}

.conversor-page .drawer-body a.active,
.conversor-page .nav-dropdown a.active {
    font-weight: 500;
}

.checklist-page .site-footer {
    min-height: 120px;
}

.checklist-page .drawer,
.checklist-page .drawer-overlay {
    will-change: transform, opacity;
}

.contato-page .page-content {
    min-height: calc(100vh - var(--header-height) - 120px);
}

.contato-page .site-footer {
    min-height: 120px;
}

.contato-page .contact-card {
    min-height: 620px;
}

.contato-page .form-note {
    min-height: 3em;
    line-height: 1.5;
    opacity: 1;
    visibility: visible;
}

.contato-page .drawer-body a,
.contato-page .nav-dropdown a {
    box-sizing: border-box;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    padding-left: 13px;
    font-weight: 500;
}

.contato-page .drawer-body a.active,
.contato-page .nav-dropdown a.active {
    border-left-color: var(--primary);
    font-weight: 500;
}

.contato-page .footer-meta span {
    color: color-mix(in srgb, var(--text) 68%, var(--muted));
}

html.dark .contato-page .footer-meta span {
    color: color-mix(in srgb, var(--text) 84%, var(--muted));
}

@media (width <= 768px) {
    .contato-page .contact-card {
        min-height: 560px;
    }
}


/* Global PageSpeed safeguards */
a {
    color: var(--link-color);
}

a:hover {
    color: color-mix(in srgb, var(--link-color) 85%, black);
}

.tool-wrap,
.tool-container {
    min-height: 500px;
}

.emoji-grid,
.tools-grid {
    content-visibility: auto;
    contain-intrinsic-size: 600px;
}

/* =========================
   TOOL UI EXTENSIONS (FINAL)
========================= */

/* Wrapper opcional (não conflita) */
.tool-box {
    max-width: var(--tool-width);
    margin: var(--space-xl) auto;
}

/* Resultados inline (contador, etc) */
.tool-results-inline {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.tool-results-inline span {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text);
}

/* =========================
   RELATED TOOLS (SEO BLOCK)
========================= */

.related-tools {
    max-width: var(--tool-width);
    margin: var(--space-xl) auto;
    padding: var(--space-md);
    border-radius: var(--radius);

    /* destaque leve (melhor que antes) */
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
}

/* título */
.related-tools h3 {
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* lista */
.related-tools ul {
    padding-left: 18px;
    margin: 0;
}

/* itens */
.related-tools li {
    margin-bottom: 6px;
}

/* links */
.related-tools a {
    color: var(--link-color);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.related-tools a:hover {
    text-decoration: underline;
    color: color-mix(in srgb, var(--link-color) 85%, black);
}

/* =========================
   DARK MODE AJUSTES
========================= */

html.dark .related-tools {
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

html.dark .related-tools a:hover {
    color: color-mix(in srgb, var(--link-color) 90%, white);
}

