@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';

@theme {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --line: #d8e0ea;
    --text: #102033;
    --muted: #66758a;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --danger: #b91c1c;
    --warning: #b45309;
    --info: #1d4ed8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    min-height: 100vh;
}

.topbar {
    background: #102033;
    color: #fff;
    border-bottom: 4px solid var(--accent);
}

.topbar-inner,
.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

.brand {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0;
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
}

.nav a {
    color: #dbeafe;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.page {
    padding: 28px 0 48px;
}

.page-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-title h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1;
}

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

.grid {
    display: grid;
    gap: 14px;
}

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

.two-cols {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stat-label {
    color: var(--muted);
    font-size: .88rem;
    text-transform: uppercase;
    font-weight: 800;
}

.stat-value {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1;
    margin-top: 8px;
    font-weight: 900;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 9px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: .8rem;
    font-weight: 800;
}

.badge.confirmado { background: #dcfce7; color: #166534; }
.badge.duplicado { background: #fef3c7; color: var(--warning); }
.badge.desconhecido,
.badge.invalido { background: #fee2e2; color: var(--danger); }
.badge.entrada { background: #ccfbf1; color: var(--accent-strong); }
.badge.saida { background: #dbeafe; color: var(--info); }

.button {
    background: var(--accent);
    color: #fff;
}

.button.secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

input,
select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
}

.alert {
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-weight: 700;
}

.pagination {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 10px;
    background: #fff;
}

@media (max-width: 900px) {
    .topbar-inner,
    .page-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats,
    .two-cols,
    .form-row {
        grid-template-columns: 1fr;
    }

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

.live-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 26px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .95), rgba(16, 32, 51, .98)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 1px, transparent 1px 12px);
    color: #fff;
}

.live-hero h1 {
    margin: 5px 0 8px;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: .95;
}

.live-hero p {
    margin: 0;
    color: #d7fffa;
    font-weight: 700;
}

.live-kicker {
    color: #a7f3d0;
    font-size: .88rem;
    font-weight: 900;
    text-transform: uppercase;
}

.live-grid {
    display: grid;
    grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.live-metric {
    min-height: 150px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.live-metric.main {
    background: var(--accent);
    color: #fff;
}

.live-metric span {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 900;
    text-transform: uppercase;
}

.live-metric.main span {
    color: #d7fffa;
}

.live-metric strong {
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: .85;
    font-weight: 950;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.section-heading h2 {
    margin: 0;
}

.section-heading span {
    color: var(--muted);
    font-weight: 800;
}

.live-card {
    padding: 20px;
}

.live-table th,
.live-table td {
    padding: 12px 10px;
}

.live-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

@media (max-width: 900px) {
    .live-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-grid {
        grid-template-columns: 1fr;
    }
}
