:root {
    --navy: #102a43;
    --navy-deep: #071b2e;
    --ink: #172b4d;
    --muted: #6b7c93;
    --line: #e4ebf2;
    --paper: #f7fafc;
    --white: #ffffff;
    --cyan: #39c6c8;
    --cyan-dark: #129da8;
    --orange: #ffb36b;
    --shadow: 0 22px 55px rgba(16, 42, 67, .11);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: 'DM Sans', sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.portal-page { min-height: 100vh; overflow-x: hidden; background: linear-gradient(135deg, #f8fbfd 0%, #eef8f8 100%); }
.ambient { position: fixed; z-index: 0; width: 430px; height: 430px; border-radius: 50%; pointer-events: none; filter: blur(2px); opacity: .44; }
.ambient-one { top: -250px; right: -90px; background: radial-gradient(circle, rgba(57,198,200,.23), transparent 68%); }
.ambient-two { bottom: -290px; left: -130px; background: radial-gradient(circle, rgba(255,179,107,.16), transparent 66%); }
.portal-shell { position: relative; z-index: 1; width: min(1140px, calc(100% - 48px)); margin: 0 auto; }
.portal-header { display: flex; align-items: center; justify-content: space-between; padding: 31px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: var(--white); background: var(--cyan); font: 700 24px/1 'Space Grotesk', sans-serif; box-shadow: 0 8px 16px rgba(18,157,168,.2); }
.brand-logo { overflow: hidden; padding: 2px; background: var(--white); box-shadow: 0 8px 16px rgba(16,42,67,.15); }
.brand-logo img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.brand strong, .brand small { display: block; }
.brand strong { color: var(--navy); font: 700 18px/1 'Space Grotesk', sans-serif; letter-spacing: .08em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.admin-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 0 10px 14px; color: var(--muted); font-size: 13px; transition: color .2s ease; }
.admin-link:hover, .back-link:hover, .cancel-link:hover { color: var(--cyan-dark); }
.settings-icon { color: var(--cyan-dark); font-size: 18px; }
.hero-section { display: flex; min-height: 370px; align-items: center; justify-content: space-between; padding: 55px 80px 40px; border-radius: 24px; overflow: hidden; background: var(--navy); box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--cyan-dark); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.hero-section .eyebrow { color: var(--cyan); }
.eyebrow > span { display: inline-block; width: 22px; height: 2px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
.hero-section h1 { margin-bottom: 18px; color: var(--white); font: 600 clamp(39px, 5vw, 60px)/1.03 'Space Grotesk', sans-serif; letter-spacing: -.055em; }
.hero-section h1 em { color: var(--cyan); font-style: normal; }
.hero-text { max-width: 350px; margin-bottom: 0; color: #afc1d2; font-size: 16px; line-height: 1.6; }
.hero-orbit { position: relative; width: 250px; height: 250px; margin-right: 20px; }
.orbit-ring { position: absolute; inset: 10px; border: 1px solid rgba(57,198,200,.32); border-radius: 50%; transform: rotate(-24deg) scaleX(.72); }
.orbit-ring::after { position: absolute; inset: 18px; border: 1px solid rgba(255,179,107,.19); border-radius: 50%; content: ''; }
.orbit-core { position: absolute; top: 50%; left: 50%; display: grid; width: 94px; height: 94px; place-items: center; border: 1px solid rgba(57,198,200,.6); border-radius: 28px; color: var(--white); background: linear-gradient(145deg, #214d6b, #163650); box-shadow: 0 0 50px rgba(57,198,200,.17); transform: translate(-50%, -50%) rotate(8deg); }
.orbit-core span { font: 600 53px/1 'Space Grotesk', sans-serif; color: var(--cyan); transform: rotate(-8deg); }
.orbit-dot { position: absolute; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 6px rgba(255,179,107,.12); }
.dot-one { top: 29px; right: 35px; }.dot-two { bottom: 28px; left: 27px; width: 7px; height: 7px; background: var(--cyan); box-shadow: 0 0 0 5px rgba(57,198,200,.14); }.dot-three { top: 104px; left: 14px; width: 5px; height: 5px; background: #d9e5ee; box-shadow: none; }
.systems-section { padding: 67px 0 42px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.section-heading .eyebrow { margin-bottom: 9px; }
.section-heading h2 { margin-bottom: 0; color: var(--navy); font: 600 28px/1.1 'Space Grotesk', sans-serif; letter-spacing: -.04em; }
.system-count { margin-bottom: 3px; color: var(--muted); font-size: 13px; }
.systems-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; }
.system-card { position: relative; display: flex; min-height: 185px; flex-direction: column; padding: 21px 20px 18px; border: 1px solid rgba(219,230,237,.9); border-radius: var(--radius); background: rgba(255,255,255,.78); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.system-card:hover { border-color: rgba(57,198,200,.46); box-shadow: 0 15px 32px rgba(16,42,67,.09); transform: translateY(-4px); }
.card-topline { display: flex; align-items: start; justify-content: space-between; margin-bottom: 19px; }
.system-icon, .upload-preview, .list-icon { display: grid; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 13px; color: var(--navy); background: #e9f7f5; font: 700 20px/1 'Space Grotesk', sans-serif; }
.system-icon { width: 49px; height: 49px; }
.system-icon img, .upload-preview img, .list-icon img { width: 100%; height: 100%; object-fit: cover; }
.icon-fallback { background: #e8f5f5; }
.arrow-icon { color: #94a8b7; font-size: 20px; line-height: 1; transition: color .2s ease, transform .2s ease; }
.system-card:hover .arrow-icon { color: var(--cyan-dark); transform: translate(2px, -2px); }
.system-name { color: var(--navy); font: 600 17px/1.25 'Space Grotesk', sans-serif; }
.system-description { overflow: hidden; margin-top: 6px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.system-link { overflow: hidden; margin-top: auto; padding-top: 14px; color: var(--cyan-dark); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.empty-state { padding: 53px 20px; border: 1px dashed #b8d7d9; border-radius: var(--radius); text-align: center; background: rgba(255,255,255,.5); }
.empty-icon { display: grid; width: 49px; height: 49px; margin: 0 auto 17px; place-items: center; border-radius: 15px; color: var(--cyan-dark); background: #e4f7f5; font-size: 28px; }
.empty-state h3 { margin-bottom: 7px; font: 600 20px 'Space Grotesk', sans-serif; }.empty-state p { margin-bottom: 21px; color: var(--muted); font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; font-size: 13px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }.button span { font-size: 17px; line-height: 1; }.button-primary { color: var(--navy-deep); background: var(--cyan); box-shadow: 0 8px 16px rgba(18,157,168,.16); }.button-primary:hover { background: #5bd9d4; box-shadow: 0 11px 20px rgba(18,157,168,.23); }.button-full { width: 100%; }
.portal-footer { display: flex; justify-content: space-between; padding: 19px 0 30px; border-top: 1px solid rgba(191,213,220,.6); color: #8496a6; font-size: 11px; }.footer-status { display: flex; align-items: center; gap: 7px; }.footer-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-dark); }

/* Administração */
.admin-page { min-height: 100vh; background: #f5f8fa; }.admin-layout { display: flex; min-height: 100vh; }.admin-sidebar { position: fixed; top: 0; bottom: 0; display: flex; width: 245px; flex-direction: column; padding: 32px 23px 25px; background: var(--navy); }.admin-sidebar .brand strong { color: var(--white); }.admin-sidebar .brand small { color: #91aabd; }.brand-dark .brand-mark { background: var(--cyan); }.admin-nav { display: grid; gap: 6px; margin-top: 80px; }.admin-nav a { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 9px; color: #a9bbca; font-size: 13px; }.admin-nav a span { width: 18px; color: var(--cyan); font-size: 18px; text-align: center; }.admin-nav a:hover, .admin-nav a.active { color: var(--white); background: rgba(255,255,255,.1); }.sidebar-bottom { margin-top: auto; }.sidebar-bottom p { color: #8099ab; font-size: 11px; line-height: 1.5; }.sidebar-bottom a { display: flex; justify-content: space-between; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.12); color: #b3c2ce; font-size: 12px; }.sidebar-bottom a:hover { color: var(--cyan); }.admin-content { width: min(100% - 245px, 1050px); margin-left: 245px; padding: 56px clamp(30px, 6vw, 90px); }.admin-topbar { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }.admin-topbar h1 { margin-bottom: 9px; color: var(--navy); font: 600 36px/1.1 'Space Grotesk', sans-serif; letter-spacing: -.05em; }.admin-lead { margin-bottom: 0; color: var(--muted); font-size: 14px; }.admin-topbar .eyebrow { margin-bottom: 10px; }.admin-panel { margin-bottom: 25px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 25px rgba(16,42,67,.035); }.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }.panel-kicker { display: block; margin-bottom: 7px; color: var(--cyan-dark); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }.panel-heading h2 { margin-bottom: 0; color: var(--navy); font: 600 20px 'Space Grotesk', sans-serif; letter-spacing: -.025em; }.panel-heading sup { display: inline-grid; min-width: 23px; height: 23px; margin-left: 5px; place-items: center; border-radius: 8px; color: var(--cyan-dark); background: #e4f7f5; font: 700 11px 'DM Sans', sans-serif; vertical-align: 2px; }.cancel-link { color: var(--muted); font-size: 12px; }.form-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }.field { display: flex; min-width: 0; flex-direction: column; }.field-wide { grid-column: span 1; }.field label, .upload-copy label { margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }.field label span { color: var(--cyan-dark); }.field input, .stack-form input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #d7e2ea; border-radius: 9px; outline: none; color: var(--ink); background: #fbfdfe; font-size: 13px; transition: border-color .2s ease, box-shadow .2s ease; }.field input:focus, .stack-form input:focus { border-color: var(--cyan-dark); box-shadow: 0 0 0 3px rgba(57,198,200,.13); }.field small { margin-top: 7px; color: #8b9baa; font-size: 10px; }.upload-row { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding-top: 22px; border-top: 1px solid #edf2f5; }.upload-preview { width: 65px; height: 65px; border-radius: 17px; font-size: 27px; }.upload-copy { min-width: 0; }.upload-copy label:not(.upload-button) { display: block; margin-bottom: 4px; }.upload-copy p { margin: 0 0 11px; color: var(--muted); font-size: 11px; }.upload-button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; color: var(--cyan-dark); background: #e9f8f7; font-size: 11px !important; cursor: pointer; }.upload-button span { font-size: 15px; }.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }.form-actions { display: flex; justify-content: flex-end; margin-top: 24px; }.alert { margin: -12px 0 24px; padding: 12px 15px; border-radius: 9px; font-size: 12px; }.alert-success { color: #176b59; background: #e2f7ee; }.alert-error { color: #a13d38; background: #ffebe9; }.admin-list { display: grid; }.admin-list-item { display: flex; align-items: center; gap: 15px; padding: 15px 0; border-top: 1px solid #edf2f5; }.admin-list-item:first-child { padding-top: 0; border-top: 0; }.list-icon { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }.list-info { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }.list-info strong { overflow: hidden; color: var(--navy); font: 600 14px 'Space Grotesk', sans-serif; text-overflow: ellipsis; white-space: nowrap; }.list-info span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.list-actions { display: flex; align-items: center; gap: 13px; }.list-actions a, .list-actions button { padding: 0; border: 0; color: var(--cyan-dark); background: transparent; font-size: 11px; font-weight: 700; }.list-actions button { color: #b66c6a; }.list-actions a:hover, .list-actions button:hover { text-decoration: underline; }.admin-empty { padding: 16px 0 4px; text-align: center; }.admin-empty > span { display: block; margin-bottom: 9px; color: var(--cyan-dark); font-size: 28px; }.admin-empty p { margin-bottom: 4px; font: 600 14px 'Space Grotesk', sans-serif; }.admin-empty small { color: var(--muted); font-size: 11px; }

/* Login */
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 25px; background: linear-gradient(135deg, #f8fbfd, #edf8f7); }.login-card { width: min(100%, 440px); padding: 39px 42px 32px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.87); box-shadow: var(--shadow); }.login-card .brand { margin-bottom: 51px; }.login-heading { position: relative; }.lock-icon { position: absolute; top: -8px; right: 0; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--cyan-dark); background: #e8f8f6; font-size: 19px; }.login-heading h1 { margin-bottom: 9px; color: var(--navy); font: 600 30px 'Space Grotesk', sans-serif; letter-spacing: -.05em; }.login-heading > p:last-child { margin-bottom: 26px; color: var(--muted); font-size: 13px; line-height: 1.5; }.stack-form { display: grid; gap: 9px; }.stack-form label { color: var(--ink); font-size: 12px; font-weight: 700; }.stack-form .button { margin-top: 12px; }.back-link { display: block; margin-top: 25px; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 850px) { .hero-section { padding-right: 45px; padding-left: 45px; }.hero-orbit { width: 190px; height: 190px; margin-right: 0; }.orbit-core { width: 75px; height: 75px; border-radius: 22px; }.orbit-core span { font-size: 40px; }.systems-grid { grid-template-columns: repeat(2, 1fr); }.admin-content { padding-right: 30px; padding-left: 30px; } }
@media (max-width: 640px) { .portal-shell { width: min(100% - 30px, 1140px); }.portal-header { padding: 22px 0; }.admin-link { font-size: 0; }.admin-link .settings-icon { font-size: 20px; }.hero-section { min-height: 405px; align-items: start; padding: 41px 28px; }.hero-section h1 { font-size: 42px; }.hero-orbit { position: absolute; top: 278px; right: 24px; width: 130px; height: 130px; opacity: .72; }.orbit-core { width: 56px; height: 56px; border-radius: 16px; }.orbit-core span { font-size: 30px; }.orbit-ring { inset: 3px; }.systems-section { padding-top: 47px; }.section-heading { align-items: start; flex-direction: column; gap: 8px; }.systems-grid { grid-template-columns: 1fr; }.system-card { min-height: 160px; }.portal-footer { gap: 12px; flex-direction: column; }.admin-layout { display: block; }.admin-sidebar { position: static; width: 100%; min-height: auto; padding: 20px 18px; }.admin-nav { display: flex; margin-top: 25px; }.sidebar-bottom { display: none; }.admin-content { width: 100%; margin-left: 0; padding: 35px 18px; }.admin-topbar { align-items: start; flex-direction: column; gap: 20px; }.admin-topbar h1 { font-size: 31px; }.admin-topbar .button { width: 100%; }.admin-panel { padding: 21px 18px; }.form-grid { grid-template-columns: 1fr; gap: 17px; }.field-wide { grid-column: auto; }.form-actions .button { width: 100%; }.list-actions { gap: 9px; flex-direction: column; align-items: flex-end; }.login-card { padding: 30px 24px 26px; }.login-card .brand { margin-bottom: 42px; } }
