@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #102d46;
    --navy-2: #1c4563;
    --blue: #28658b;
    --cyan: #5aa7bd;
    --ink: #172b3a;
    --muted: #71808d;
    --line: #e2e9ee;
    --paper: #f5f8fa;
    --white: #fff;
    --green: #1b8062;
    --amber: #9b6a1a;
    --red: #a94343;
    --shadow: 0 14px 36px rgba(21, 48, 69, .07);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
}
a { color: inherit; }
.topbar {
    background: var(--navy);
    color: #fff;
    height: 76px;
    display: flex;
    align-items: center;
}
.topbar-inner {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand strong { display: block; font: 700 15px 'Manrope', sans-serif; letter-spacing: -.2px; }
.brand span { display: block; color: #b7c8d5; font-size: 11px; margin-top: 2px; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 12px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, #73c4d1, #2c7895);
    color: #fff; font: 800 20px 'Manrope', sans-serif;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.logout-link { color: #d5e1e9; text-decoration: none; font-size: 12px; }
.logout-link:hover { color: #fff; }
.container { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.intro {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; padding: 48px 0 28px;
}
.eyebrow {
    color: var(--blue); font-size: 10px; font-weight: 700;
    letter-spacing: 1.5px; margin: 0 0 10px;
}
h1, h2, h3 { font-family: 'Manrope', sans-serif; }
.intro h1 { font-size: clamp(25px, 3vw, 36px); line-height: 1.18; letter-spacing: -1.2px; max-width: 760px; margin: 0; }
.intro-text { color: var(--muted); line-height: 1.65; max-width: 730px; margin: 14px 0 0; }
.source-pill {
    white-space: nowrap; border: 1px solid #dce7ed; background: #fff;
    border-radius: 30px; padding: 10px 14px; color: #526a7a; font-size: 11px;
}
.pulse { display: inline-block; width: 7px; height: 7px; background: #37a77f; border-radius: 50%; margin-right: 7px; box-shadow: 0 0 0 4px #e6f4ee; }
.panel {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 17px; box-shadow: var(--shadow); padding: 28px;
    margin-bottom: 24px;
}
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.panel-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.panel-heading .eyebrow { margin-bottom: 7px; }
.step-number { color: #9ab1bf; font: 700 24px 'Manrope', sans-serif; }
.upload-area {
    border: 1.5px dashed #b9cbd5; background: #f8fbfc;
    border-radius: 13px; padding: 23px; display: flex; align-items: center; gap: 18px;
}
.upload-icon {
    width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center;
    border-radius: 13px; color: var(--blue); background: #e8f2f6; font-size: 25px;
}
.upload-area strong { font: 700 14px 'Manrope', sans-serif; }
.upload-area p { color: var(--muted); font-size: 12px; margin: 5px 0 10px; }
input[type=file] { font-size: 12px; color: #637583; max-width: 100%; }
.or-divider { display: flex; align-items: center; gap: 14px; color: #98a6af; font-size: 11px; margin: 22px 0; }
.or-divider:before, .or-divider:after { content: ''; height: 1px; flex: 1; background: var(--line); }
.field-label, label { display: block; color: #445967; font-size: 12px; font-weight: 600; }
textarea, input[type=text], input[type=password] {
    width: 100%; border: 1px solid #dce5ea; background: #fff; border-radius: 10px;
    padding: 12px 13px; color: var(--ink); font: 13px 'DM Sans', sans-serif;
    outline: none; transition: border .2s, box-shadow .2s;
}
textarea { resize: vertical; margin-top: 8px; line-height: 1.6; }
textarea:focus, input:focus { border-color: #76a9bd; box-shadow: 0 0 0 3px #eaf3f7; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.tiny { font-size: 11px; line-height: 1.55; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.button {
    display: inline-flex; justify-content: center; align-items: center; gap: 10px;
    border: 0; border-radius: 9px; padding: 12px 17px; cursor: pointer;
    text-decoration: none; font: 700 12px 'DM Sans', sans-serif; transition: .18s ease;
}
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { background: var(--navy); color: #fff; }
.button-primary:hover:not(:disabled) { background: #1b4b6b; transform: translateY(-1px); }
.button-secondary { background: #e8f0f4; color: #234c65; }
.button-secondary:hover:not(:disabled) { background: #dce9ef; }
.button-ghost { background: transparent; color: #536c7c; border: 1px solid #dce5ea; }
.button-full { width: 100%; }
.alert { padding: 14px 16px; border-radius: 10px; margin: 0 0 18px; font-size: 12px; line-height: 1.55; }
.alert-error { color: #8e3030; background: #fff0f0; border: 1px solid #f3d2d2; }
.alert-warning { color: #76521d; background: #fff8e9; border: 1px solid #f1e2bd; }
.alert ul { margin: 8px 0 0; padding-left: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.summary-card { padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; }
.summary-label { display: block; color: #758692; font-size: 11px; margin-bottom: 6px; }
.summary-card strong { font: 800 24px 'Manrope', sans-serif; color: var(--navy); }
.progress-wrap { margin: 18px 0 20px; }
.progress-label { display: flex; justify-content: space-between; color: #647987; font-size: 11px; margin-bottom: 8px; }
.progress-label strong { color: var(--navy); }
.progress-track { height: 8px; background: #edf2f5; border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2d7898, #70b8c4); border-radius: 20px; transition: width .25s ease; }
.action-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 22px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.results-table { border-collapse: collapse; width: 100%; min-width: 980px; font-size: 11px; }
.results-table th { text-align: left; padding: 13px 12px; color: #657b89; font-size: 10px; letter-spacing: .4px; font-weight: 700; background: #f6f9fa; border-bottom: 1px solid var(--line); }
.results-table td { padding: 14px 12px; border-bottom: 1px solid #edf1f3; vertical-align: top; line-height: 1.5; }
.results-table tr:last-child td { border-bottom: 0; }
.process-cell strong { white-space: nowrap; color: #234a63; font-size: 11px; }
.status-badge { display: inline-block; border-radius: 20px; padding: 5px 8px; font-size: 9px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.status-concluso { color: #8a5b13; background: #fff3d8; }
.status-julgado { color: #17674e; background: #e4f5ed; }
.status-notfound, .status-error { color: #9b3f3f; background: #ffeded; }
.status-other { color: #526b7b; background: #edf2f5; }
.status-detail { color: #82909a; font-size: 10px; margin: 6px 0 7px; max-width: 250px; }
.movement-cell { min-width: 210px; max-width: 300px; color: #4f626f; }
.table-link { color: #276d91; font-weight: 700; text-decoration: none; white-space: nowrap; }
.table-link:hover { text-decoration: underline; }
.movement-details { color: #477187; margin-top: 7px; }
.movement-details summary { cursor: pointer; font-size: 10px; font-weight: 600; }
.movement-list { margin-top: 8px; padding: 8px; border-radius: 8px; background: #f7fafb; min-width: 260px; }
.movement-item { display: grid; grid-template-columns: 92px 55px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid #e8eef1; color: #526571; font-size: 10px; }
.movement-item:last-child { border-bottom: 0; }
.movement-item time { color: #84939d; white-space: nowrap; }
.movement-code { color: #2d718d; white-space: nowrap; }
.empty-row td { color: #94a2ab; text-align: center; padding: 26px; }
.disclaimer { color: #84939d; font-size: 10px; line-height: 1.6; margin: 14px 2px 0; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 20px; }
.info-icon { display: inline-block; color: #6c9bad; font: 800 12px 'Manrope', sans-serif; margin-bottom: 14px; }
.info-card h3 { font-size: 14px; margin: 0 0 7px; }
.info-card p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.footer { display: flex; justify-content: space-between; gap: 15px; color: #8997a0; font-size: 10px; padding: 8px 0 30px; }
.footer a { color: #5d7f91; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #0e2b43, #1b526c); }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 18px; padding: 34px; box-shadow: 0 25px 80px rgba(0,0,0,.2); }
.login-card .brand-mark { margin-bottom: 24px; }
.login-card h1 { font-size: 25px; letter-spacing: -.7px; margin: 0; }
.login-card > .muted { margin: 9px 0 24px; font-size: 12px; }
.stack { display: grid; gap: 16px; }
.stack input { margin-top: 7px; }
.login-card .tiny { margin-top: 18px; }
@media (max-width: 760px) {
    .topbar { height: 66px; }
    .container, .topbar-inner { width: min(100% - 28px, 1240px); }
    .intro { padding: 32px 0 20px; display: block; }
    .intro h1 { font-size: 26px; }
    .source-pill { display: inline-block; margin-top: 18px; }
    .panel { padding: 19px; border-radius: 13px; }
    .upload-area { align-items: flex-start; padding: 16px; }
    .form-footer { align-items: flex-start; flex-direction: column; }
    .form-footer .button { width: 100%; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .footer { flex-direction: column; }
}
