/* Tokens e componentes do design system CEE 01 do Gama.
   Cores extraídas por pixel direto da logo (logo-cee-gama-01-v4.png). */

:root {
    --navy: #12224E;
    --navy-soft: #626E93;
    --blue: #0040D8;
    --blue-dark: #0033AD;
    --green: #17A83B;
    --green-dark: #128F32;
    --yellow: #F6C500;
    --orange: #F85800;
    --red: #EF3B3B;
    --brown: #6B3A16;

    --blue-tint: #E4ECFC;
    --green-tint: #E1F7E4;
    --yellow-tint: #FFF6D6;
    --orange-tint: #FFE8D6;
    --brown-tint: #F1E7DC;
    --neutral-tint: #E7EAF3;

    --surface: #F5F7FC;
    --border: #EAEDF6;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--surface);
    color: var(--navy);
}

.heading, h1, h2, h3, h4, h5, h6 {
    font-family: 'Baloo 2', sans-serif;
}

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

/* ---------- pagina de login ---------- */

.login-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #CFEAF7 0%, #FBF3D6 46%, #DCF3E1 100%);
}

.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 24px 60px rgba(18, 34, 78, 0.18);
    padding: 44px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card img { width: 150px; height: auto; margin-bottom: 6px; }

.login-subtitle {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .4px;
    color: var(--navy-soft);
    margin-bottom: 28px;
}

.field-group { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.field-label { font-family: 'Baloo 2', sans-serif; font-size: 13px; font-weight: 700; color: var(--navy); }

.field-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    background: #FAFBFE;
}
.field-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint); }
.field-box input, .field-box select, .field-box textarea {
    border: none; background: transparent; outline: none;
    font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 600;
    color: var(--navy); width: 100%;
}
.field-box select { appearance: auto; cursor: pointer; }
.field-box.field-box-textarea { align-items: flex-start; }
.field-box textarea { resize: vertical; min-height: 80px; font-weight: 500; }

/* ---------- formulario em secoes ---------- */

.form-section { display: flex; flex-direction: column; gap: 18px; background: #fff; border-radius: 20px; padding: 26px 28px; }
.form-section-title { font-family: 'Baloo 2', sans-serif; font-size: 17px; font-weight: 700; color: var(--navy); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-grid .field-group.span-2 { grid-column: span 2; }

.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input[type="checkbox"] {
    width: 20px; height: 20px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0;
}
.checkbox-row label { font-size: 14px; font-weight: 700; color: var(--navy); cursor: pointer; }

.field-errors { color: var(--red); font-size: 12px; font-weight: 700; margin-top: 2px; }

.required-mark { color: var(--red); margin-left: 2px; }

.btn-app {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 14px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.btn-app-blue { background: var(--blue); color: #fff; }
.btn-app-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-app-green { background: var(--green); color: #fff; }
.btn-app-green:hover { background: var(--green-dark); color: #fff; }
.btn-app-red { background: var(--red); color: #fff; }
.btn-app-red:hover { background: #D62828; color: #fff; }
.btn-app-outline { background: #fff; color: var(--navy); border: 2px solid var(--border); }
.btn-app-outline:hover { background: var(--surface); color: var(--navy); }

/* ---------- shell autenticado (sidebar + topbar) ---------- */

.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: 240px;
    flex-shrink: 0;
    /* !important necessário: acima do breakpoint lg, o Bootstrap forca
       background-color: transparent !important no .offcanvas-lg pra virar
       sidebar estatica (ver regra responsiva do offcanvas). */
    background: var(--navy) !important;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
}
.app-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 26px; }
.app-sidebar-brand img { width: 32px; height: auto; }
.app-sidebar-brand span { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.15; flex: 1; }

.sidebar-close-btn, .hamburger-btn {
    background: none; border: none; padding: 4px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,0.1); }
.hamburger-btn:hover { background: var(--neutral-tint); }

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 12px;
    color: #C6CCE3; font-size: 14px; font-weight: 700;
    text-decoration: none;
}
.sidebar-nav-item svg { flex-shrink: 0; }
.sidebar-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.sidebar-nav-item.active { background: var(--blue); color: #fff; box-shadow: 0 6px 14px rgba(0,64,216,0.4); }

.app-topbar {
    display: flex; align-items: center; justify-content: space-between;
    height: 76px; padding: 0 40px; background: #fff; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.avatar-circle {
    font-family: 'Baloo 2', sans-serif;
    border-radius: 50%; background: var(--blue); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0;
}

.app-content { flex: 1; padding: 40px 56px; display: flex; flex-direction: column; gap: 34px; min-width: 0; }

/* ---------- cards de atalho ---------- */

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

.shortcut-card {
    border-radius: 20px; padding: 22px;
    display: flex; flex-direction: column; gap: 14px;
    text-decoration: none; color: inherit;
    transition: box-shadow .15s, transform .15s;
}
.shortcut-card:hover { box-shadow: 0 14px 30px rgba(18,34,78,0.14); transform: translateY(-2px); color: inherit; text-decoration: none; }

.shortcut-icon {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
}

.shortcut-title { font-family: 'Baloo 2', sans-serif; font-size: 18px; font-weight: 700; color: var(--navy); }
.shortcut-desc { font-size: 13px; font-weight: 600; color: var(--navy-soft); margin-top: 2px; }

/* ---------- lista "usado recentemente" ---------- */

.recent-list { background: #fff; border-radius: 20px; padding: 6px; display: flex; flex-direction: column; }
.recent-item {
    display: flex; align-items: center; gap: 16px; padding: 14px 16px;
    border-bottom: 1px solid #F0F2F8; text-decoration: none; color: inherit;
}
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { background: #FAFBFE; color: inherit; text-decoration: none; }
.recent-item-icon {
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.recent-item-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.recent-item-sub { font-size: 12px; font-weight: 600; color: var(--navy-soft); }

/* ---------- badges / pilulas de status ---------- */

.badge-pill {
    font-family: 'Baloo 2', sans-serif;
    font-size: 12px; font-weight: 700;
    padding: 5px 12px; border-radius: 20px;
    display: inline-block;
}
.badge-green { background: var(--green-tint); color: var(--green-dark); }
.badge-yellow { background: var(--yellow-tint); color: #8A6D00; }
.badge-neutral { background: var(--neutral-tint); color: var(--navy-soft); }

/* ---------- tabela ---------- */

.table-clean-wrap { background: #fff; border-radius: 20px; overflow-x: auto; box-shadow: 0 2px 10px rgba(18,34,78,0.05); }
.table-clean { width: 100%; min-width: 640px; border-collapse: collapse; }
.table-clean th {
    font-family: 'Baloo 2', sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: var(--navy-soft); text-align: left; padding: 14px 24px; border-bottom: 1px solid #EEF0F7;
}
.table-clean td { padding: 14px 24px; border-bottom: 1px solid #F5F6FA; font-size: 14px; font-weight: 600; color: var(--navy); }
.table-clean tr:last-child td { border-bottom: none; }
.table-clean tr:hover td { background: #FAFBFE; }

.messages { display: flex; flex-direction: column; gap: 10px; }

/* ---------- acoes de tabela / detalhe ---------- */

.icon-btn { color: #8B93AC; cursor: pointer; text-decoration: none; display: inline-flex; }
.icon-btn:hover { color: var(--blue); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.info-item-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--navy-soft); }
.info-item-value { font-size: 15px; font-weight: 700; color: var(--navy); margin-top: 2px; }

.tag-pill {
    font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 20px;
    background: var(--neutral-tint); color: var(--navy); display: inline-block;
}

/* ---------- responsivo ---------- */

@media (max-width: 991.98px) {
    .app-topbar { padding: 0 20px; }
    .app-content { padding: 24px 20px; gap: 24px; }
    .shortcut-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 575.98px) {
    .shortcut-grid { grid-template-columns: 1fr; }
    .login-card { padding: 32px 24px 28px; }
    .table-clean th, .table-clean td { padding: 12px 16px; }
}
