.elementor-kit-7{--e-global-color-primary:#6EC1E4;--e-global-color-secondary:#54595F;--e-global-color-text:#7A7A7A;--e-global-color-accent:#61CE70;--e-global-typography-primary-font-family:"Roboto";--e-global-typography-primary-font-weight:600;--e-global-typography-secondary-font-family:"Roboto Slab";--e-global-typography-secondary-font-weight:400;--e-global-typography-text-font-family:"Roboto";--e-global-typography-text-font-weight:400;--e-global-typography-accent-font-family:"Roboto";--e-global-typography-accent-font-weight:500;}.elementor-kit-7 e-page-transition{background-color:#FFBC7D;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1140px;}.e-con{--container-max-width:1140px;}.elementor-widget:not(:last-child){--kit-widget-spacing:20px;}.elementor-element{--widgets-spacing:20px 20px;--widgets-spacing-row:20px;--widgets-spacing-column:20px;}{}h1.entry-title{display:var(--page-title-display);}@media(max-width:1024px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:1024px;}.e-con{--container-max-width:1024px;}}@media(max-width:767px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:767px;}.e-con{--container-max-width:767px;}}/* Start custom CSS */<style>
/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  /* Colors */
  --petrol:       #1E3A5F;
  --petrol-dark:  #152B47;
  --petrol-light: #2A4F7E;
  --petrol-muted: #4A6E96;
  --gold:         #C4A052;
  --gold-light:   #D4B472;
  --gold-dim:     #8B7038;
  --gold-bg:      #FBF6EC;

  --white:        #FFFFFF;
  --off-white:    #F8F7F4;
  --surface:      #F2F0EC;
  --border:       #E2DED6;
  --border-light: #EDEBE6;

  --text-primary:   #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-muted:     #8A8A8A;
  --text-inverse:   #FFFFFF;

  /* Status colors */
  --status-analysis-bg:   #EBF3FF; --status-analysis-color:   #1A56DB;
  --status-prep-bg:       #F3E8FF; --status-prep-color:       #7E22CE;
  --status-submitted-bg:  #E0E7FF; --status-submitted-color:  #3730A3;
  --status-waiting-bg:    #FEF9C3; --status-waiting-color:    #854D0E;
  --status-scheduled-bg:  #FFF7E6; --status-scheduled-color:  #92400E;
  --status-deferred-bg:   #DCFCE7; --status-deferred-color:   #166534;
  --status-done-bg:       #D1FAE5; --status-done-color:       #065F46;
  --status-refused-bg:    #FEE2E2; --status-refused-color:    #991B1B;
  --status-appeal-bg:     #FEF3C7; --status-appeal-color:     #78350F;

  /* Timeline colors */
  --tl-andamento: #1A56DB;
  --tl-esclarecimento: #C4A052;
  --tl-documento: #059669;
  --tl-decisao: #1E3A5F;
  --tl-alerta: #DC2626;

  /* Spacing (4px grid) */
  --sp-1:  4px;  --sp-2:  8px;  --sp-3:  12px; --sp-4:  16px;
  --sp-5:  20px; --sp-6:  24px; --sp-7:  28px; --sp-8:  32px;
  --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;

  /* Radii */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(30,58,95,0.08), 0 1px 2px rgba(30,58,95,0.04);
  --shadow:     0 4px 12px rgba(30,58,95,0.10), 0 2px 6px rgba(30,58,95,0.06);
  --shadow-md:  0 8px 24px rgba(30,58,95,0.12), 0 4px 12px rgba(30,58,95,0.08);
  --shadow-lg:  0 16px 48px rgba(30,58,95,0.16), 0 8px 24px rgba(30,58,95,0.10);
  --shadow-xl:  0 24px 64px rgba(30,58,95,0.20), 0 12px 32px rgba(30,58,95,0.12);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-label:   'Montserrat', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 140ms;
  --t-base: 220ms;
  --t-slow: 360ms;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--off-white);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--petrol); text-decoration: none; transition: color var(--t-fast) var(--ease-out); }
a:hover { color: var(--petrol-light); }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* =========================================================
   VIEWS & TRANSITIONS
   ========================================================= */
.view {
  display: none;
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease-out);
  min-height: 100vh;
}
.view.active {
  display: block;
  opacity: 1;
}
.view.fade-in { animation: fadeIn var(--t-slow) var(--ease-out) forwards; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}
@keyframes badgePop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================================
   LOADING OVERLAY
   ========================================================= */
#loading-overlay {
  position: fixed; inset: 0;
  background: rgba(30, 58, 95, 0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out);
}
#loading-overlay.visible { opacity: 1; pointer-events: all; }
.loading-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-8) var(--sp-10);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-4);
  box-shadow: var(--shadow-xl);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--petrol);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loading-text {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* =========================================================
   TOAST NOTIFICATIONS
   ========================================================= */
#toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-md);
  min-width: 280px; max-width: 360px;
  animation: toastIn 0.35s var(--ease-out) forwards;
  pointer-events: all;
  border-left: 4px solid transparent;
}
.toast.success { border-left-color: #059669; }
.toast.error   { border-left-color: #DC2626; }
.toast.info    { border-left-color: var(--petrol); }
.toast.warning { border-left-color: var(--gold); }
.toast-icon { font-size: 18px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-family: var(--font-label); font-size: 13px; font-weight: 600; color: var(--text-primary); }
.toast-msg   { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.toast-close {
  flex-shrink: 0; color: var(--text-muted); font-size: 18px; line-height: 1;
  cursor: pointer; padding: 0 2px;
  transition: color var(--t-fast) var(--ease-out);
}
.toast-close:hover { color: var(--text-primary); }
.toast.removing { animation: toastOut 0.3s var(--ease-in-out) forwards; }

/* =========================================================
   LOGIN VIEW
   ========================================================= */
#view-login {
  background: linear-gradient(135deg, var(--petrol-dark) 0%, var(--petrol) 50%, #1E4A7A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}
#view-login::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FFFFFF' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-wrapper {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

/* Login Brand */
.login-brand {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.login-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold), var(--gold-light));
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-4);
  box-shadow: 0 4px 16px rgba(196, 160, 82, 0.4);
}
.login-logo svg { width: 32px; height: 32px; }
.login-brand h1 {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.login-brand p {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: var(--sp-2);
}

/* Login Card */
.login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-8);
  box-shadow: var(--shadow-xl);
}
.login-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--petrol-dark);
  margin-bottom: var(--sp-2);
}
.login-card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
}

/* Form Fields */
.form-group { margin-bottom: var(--sp-5); }
.form-label {
  display: block;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--petrol);
  margin-bottom: var(--sp-2);
}
.form-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--petrol);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}
.form-input.error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}
.form-input::placeholder { color: var(--text-muted); }

.password-wrapper { position: relative; }
.toggle-password {
  position: absolute; right: var(--sp-3); top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px; line-height: 1;
  cursor: pointer; padding: var(--sp-1);
  transition: color var(--t-fast) var(--ease-out);
  background: none; border: none;
}
.toggle-password:hover { color: var(--petrol); }

/* Error Message */
.error-message {
  display: none;
  align-items: center; gap: var(--sp-2);
  background: #FEE2E2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-5);
  font-size: 13px;
  color: #991B1B;
  animation: fadeInUp 0.25s var(--ease-out);
}
.error-message.visible { display: flex; }

/* Forgot Password */
.forgot-row {
  display: flex; justify-content: flex-end;
  margin-top: calc(-1 * var(--sp-3));
  margin-bottom: var(--sp-5);
}
.forgot-link {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 500;
  color: var(--petrol-muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out);
}
.forgot-link:hover { color: var(--petrol); }

/* Forgot Notice */
.forgot-notice {
  display: none;
  background: var(--gold-bg);
  border: 1px solid rgba(196, 160, 82, 0.3);
  border-radius: var(--radius);
  padding: var(--sp-4);
  margin-bottom: var(--sp-5);
  font-size: 13px;
  color: var(--petrol-dark);
  line-height: 1.5;
  animation: fadeInUp 0.25s var(--ease-out);
}
.forgot-notice.visible { display: block; }

/* Login Button */
.btn-primary {
  width: 100%;
  padding: var(--sp-4) var(--sp-6);
  background: linear-gradient(135deg, var(--petrol-light), var(--petrol));
  color: var(--white);
  border-radius: var(--radius);
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), opacity var(--t-fast);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.30);
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(30, 58, 95, 0.36);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-primary .btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-primary.loading .btn-spinner { display: block; }
.btn-primary.loading .btn-text { opacity: 0.7; }

/* Login Footer */
.login-footer {
  text-align: center;
  margin-top: var(--sp-8);
}
.login-footer-main {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-label);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--sp-3);
}
.ssl-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 5px var(--sp-3);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.03em;
}
.ssl-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px #4ADE80;
}
.data-protection {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: var(--sp-3);
  line-height: 1.5;
}

/* =========================================================
   PORTAL LAYOUT (Dashboard + Case Detail)
   ========================================================= */
#view-dashboard,
#view-case-detail {
  min-height: 100vh;
  background: var(--off-white);
  display: flex;
  flex-direction: column;
}

/* Fixed Header */
.portal-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--petrol-dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 64px;
  display: flex; align-items: center; gap: var(--sp-4);
}
.header-logo {
  display: flex; align-items: center; gap: var(--sp-3);
  flex-shrink: 0;
}
.header-logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.header-logo-icon svg { width: 18px; height: 18px; }
.header-logo-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}
.header-logo-text span {
  display: block;
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: -2px;
}

.header-spacer { flex: 1; }

.header-client {
  display: flex; align-items: center; gap: var(--sp-3);
}
.client-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--petrol-muted), var(--petrol-light));
  border: 2px solid rgba(196, 160, 82, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.client-name {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Notification Bell */
.notif-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.75);
  font-size: 18px;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast);
  cursor: pointer;
}
.notif-btn:hover { background: rgba(255,255,255,0.14); color: var(--white); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: #EF4444;
  border-radius: 100px;
  border: 2px solid var(--petrol-dark);
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  animation: badgePop 0.4s var(--ease-out);
  display: none;
}
.notif-badge.visible { display: flex; }

/* Logout Button */
.logout-btn {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 7px var(--sp-4);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast);
}
.logout-btn:hover { background: rgba(255,255,255,0.14); color: var(--white); }

/* Notification Dropdown */
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  z-index: 200;
  display: none;
  animation: slideDown 0.25s var(--ease-out);
  overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-light);
}
.notif-header-title {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  color: var(--petrol-dark);
  letter-spacing: 0.02em;
}
.mark-all-btn {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  color: var(--petrol-muted);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color var(--t-fast);
}
.mark-all-btn:hover { color: var(--petrol); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface); }
.notif-item.unread { background: rgba(30, 58, 95, 0.03); }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--petrol);
  flex-shrink: 0; margin-top: 5px;
}
.notif-item.unread .notif-dot { background: var(--petrol); }
.notif-item:not(.unread) .notif-dot { background: transparent; }
.notif-content { flex: 1; }
.notif-text { font-size: 13px; color: var(--text-primary); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; font-family: var(--font-label); }
.notif-empty {
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* =========================================================
   DASHBOARD CONTENT
   ========================================================= */
.portal-body {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-16);
}

/* Welcome Section */
.welcome-section {
  margin-bottom: var(--sp-8);
}
.welcome-greeting {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 600;
  color: var(--petrol-dark);
  letter-spacing: -0.02em;
}
.welcome-greeting span { color: var(--gold-dim); }
.welcome-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: var(--sp-2);
}
.section-divider {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
  margin-top: var(--sp-4);
}

/* Section Header */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-6);
}
.section-title {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--petrol-muted);
}

/* Case Grid */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-5);
}

/* Case Card */
.case-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-base);
  cursor: pointer;
  position: relative;
}
.case-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(30, 58, 95, 0.20);
}
.case-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--petrol), var(--petrol-light));
}
.case-card.status-deferido .case-card-accent { background: linear-gradient(90deg, #059669, #34D399); }
.case-card.status-concluido .case-card-accent { background: linear-gradient(90deg, #065F46, #059669); }
.case-card.status-indeferido .case-card-accent { background: linear-gradient(90deg, #DC2626, #F87171); }
.case-card.status-aguarda_resposta .case-card-accent { background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }

.case-card-body { padding: var(--sp-5); }
.case-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.case-ref {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.case-title-row {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-1);
}
.case-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.case-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--petrol-dark);
  line-height: 1.3;
}

/* Status Badge */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px var(--sp-3);
  border-radius: 100px;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-badge .badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge-em_analise         { background: var(--status-analysis-bg); color: var(--status-analysis-color); }
.badge-em_analise .badge-dot { background: var(--status-analysis-color); }
.badge-em_preparacao      { background: var(--status-prep-bg); color: var(--status-prep-color); }
.badge-em_preparacao .badge-dot { background: var(--status-prep-color); }
.badge-submetido          { background: var(--status-submitted-bg); color: var(--status-submitted-color); }
.badge-submetido .badge-dot { background: var(--status-submitted-color); }
.badge-aguarda_resposta   { background: var(--status-waiting-bg); color: var(--status-waiting-color); }
.badge-aguarda_resposta .badge-dot { background: var(--gold); animation: pulse 1.5s ease infinite; }
.badge-agendado           { background: var(--status-scheduled-bg); color: var(--status-scheduled-color); }
.badge-agendado .badge-dot { background: var(--gold-dim); }
.badge-deferido           { background: var(--status-deferred-bg); color: var(--status-deferred-color); }
.badge-deferido .badge-dot { background: #059669; }
.badge-concluido          { background: var(--status-done-bg); color: var(--status-done-color); }
.badge-concluido .badge-dot { background: #065F46; }
.badge-indeferido         { background: var(--status-refused-bg); color: var(--status-refused-color); }
.badge-indeferido .badge-dot { background: #DC2626; }
.badge-recurso            { background: var(--status-appeal-bg); color: var(--status-appeal-color); }
.badge-recurso .badge-dot { background: var(--gold-dim); animation: pulse 2s ease infinite; }

/* Progress Bar */
.progress-wrap {
  margin: var(--sp-4) 0 var(--sp-3);
}
.progress-label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.progress-bar-bg {
  height: 6px;
  background: var(--surface);
  border-radius: 100px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--petrol), var(--petrol-light));
  transition: width 0.8s var(--ease-out);
}
.progress-bar-fill.red { background: linear-gradient(90deg, #DC2626, #EF4444); }
.progress-bar-fill.amber { background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }
.progress-bar-fill.green { background: linear-gradient(90deg, #059669, #10B981); }

/* Case Card Footer */
.case-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border-light);
  background: var(--off-white);
}
.case-update-date {
  font-size: 12px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
}
.case-actions {
  display: flex; align-items: center; gap: var(--sp-3);
}
.case-msg-badge {
  display: none;
  align-items: center; gap: 4px;
  background: #EF4444;
  color: white;
  border-radius: 100px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
}
.case-msg-badge.visible { display: flex; }
.ver-detalhes {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--petrol);
  display: flex; align-items: center; gap: 4px;
  transition: color var(--t-fast), gap var(--t-fast);
}
.ver-detalhes:hover { color: var(--petrol-light); gap: 7px; }

/* Skeleton Loaders */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--border-light) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  to { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  padding: var(--sp-5);
}
.sk-line { height: 12px; margin-bottom: 10px; }
.sk-title { height: 20px; width: 65%; margin-bottom: 16px; }
.sk-progress { height: 6px; border-radius: 100px; }
.sk-footer { height: 36px; margin-top: 16px; }

/* =========================================================
   CASE DETAIL VIEW
   ========================================================= */
.case-detail-body {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-6) var(--sp-16);
}

/* Back Button */
.back-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--petrol-muted);
  cursor: pointer;
  margin-bottom: var(--sp-6);
  transition: color var(--t-fast), gap var(--t-fast);
}
.back-btn:hover { color: var(--petrol); gap: 10px; }

/* Case Detail Header */
.case-detail-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: var(--sp-6) var(--sp-7);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.case-detail-meta {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}
.case-detail-left {}
.case-detail-ref {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.case-detail-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--petrol-dark);
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: var(--sp-3);
}

/* =========================================================
   TABS
   ========================================================= */
.tabs-nav {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: var(--sp-6);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: calc(var(--radius) - 3px);
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast);
  cursor: pointer;
  border: none;
  background: none;
}
.tab-btn:hover:not(.active) { color: var(--petrol); background: rgba(30,58,95,0.05); }
.tab-btn.active {
  background: var(--white);
  color: var(--petrol-dark);
  box-shadow: var(--shadow-sm);
}
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  background: var(--petrol);
  color: white;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
}
.tab-btn.active .tab-badge { background: var(--petrol); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.3s var(--ease-out); }

/* =========================================================
   TIMELINE (Andamentos)
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute; left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--petrol) 0%, var(--border) 100%);
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  margin-bottom: var(--sp-6);
  animation: fadeInUp 0.4s var(--ease-out) both;
}
.timeline-dot {
  position: absolute; left: -26px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px currentColor;
  flex-shrink: 0;
}
.tl-andamento .timeline-dot  { color: var(--tl-andamento); background: var(--tl-andamento); }
.tl-esclarecimento .timeline-dot { color: var(--tl-esclarecimento); background: var(--tl-esclarecimento); }
.tl-documento .timeline-dot { color: var(--tl-documento); background: var(--tl-documento); }
.tl-decisao .timeline-dot   { color: var(--tl-decisao); background: var(--tl-decisao); }
.tl-alerta .timeline-dot    { color: var(--tl-alerta); background: var(--tl-alerta); }

.timeline-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-fast);
}
.timeline-card:hover { box-shadow: var(--shadow); }
.timeline-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}
.timeline-type-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px var(--sp-3);
  border-radius: 100px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tl-andamento .timeline-type-badge  { background: rgba(26,86,219,0.10); color: var(--tl-andamento); }
.tl-esclarecimento .timeline-type-badge { background: rgba(196,160,82,0.15); color: var(--gold-dim); }
.tl-documento .timeline-type-badge { background: rgba(5,150,105,0.10); color: var(--tl-documento); }
.tl-decisao .timeline-type-badge   { background: rgba(30,58,95,0.10); color: var(--tl-decisao); }
.tl-alerta .timeline-type-badge    { background: rgba(220,38,38,0.10); color: var(--tl-alerta); }

.timeline-date {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.timeline-title {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 700;
  color: var(--petrol-dark);
  margin-bottom: 5px;
}
.timeline-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-note {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  background: var(--gold-bg);
  border: 1px solid rgba(196,160,82,0.25);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-4);
  font-size: 13px;
  color: #5C4A1E;
  line-height: 1.5;
}
.timeline-note-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* =========================================================
   DOCUMENTS TAB
   ========================================================= */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-4);
}
.doc-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base), border-color var(--t-base), transform var(--t-base) var(--ease-out);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.doc-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: rgba(30,58,95,0.15); }
.doc-icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
}
.doc-icon-pdf { background: #FEE2E2; }
.doc-icon-doc { background: #DBEAFE; }
.doc-icon-img { background: #DCFCE7; }
.doc-icon-other { background: var(--surface); }
.doc-name {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  color: var(--petrol-dark);
  line-height: 1.3;
}
.doc-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.doc-meta {
  display: flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-label);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.doc-meta span { display: flex; align-items: center; gap: 4px; }
.doc-download-btn {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--petrol);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  margin-top: auto;
}
.doc-download-btn:hover {
  background: var(--petrol);
  border-color: var(--petrol);
  color: var(--white);
}

/* =========================================================
   MESSAGES TAB (Chat)
   ========================================================= */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 520px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.chat-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-light);
  background: var(--petrol-dark);
  display: flex; align-items: center; gap: var(--sp-3);
}
.chat-header-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.chat-header-text .title {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
}
.chat-header-text .subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.date-separator {
  display: flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: var(--sp-3) 0;
}
.date-separator::before, .date-separator::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border-light);
}

.msg-row {
  display: flex; align-items: flex-end; gap: var(--sp-2);
}
.msg-row.client { flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-label);
  font-size: 11px; font-weight: 700;
  color: var(--white);
}
.msg-avatar.admin-av { background: linear-gradient(135deg, var(--petrol-muted), var(--petrol-light)); }
.msg-avatar.client-av { background: linear-gradient(135deg, var(--gold-dim), var(--gold)); }
.msg-bubble {
  max-width: 70%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.msg-row.admin .msg-bubble {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}
.msg-row.client .msg-bubble {
  background: var(--petrol);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.msg-time {
  font-family: var(--font-label);
  font-size: 10px;
  color: var(--text-muted);
  padding: 0 2px;
  flex-shrink: 0;
  margin-bottom: 2px;
}
.msg-row.client .msg-time { text-align: right; }

.chat-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--sp-4) var(--sp-5);
  background: var(--off-white);
}
.chat-response-note {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
  font-family: var(--font-label);
}
.chat-input-row {
  display: flex; align-items: flex-end; gap: var(--sp-3);
}
.chat-textarea-wrap { flex: 1; position: relative; }
.chat-textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  padding-right: 60px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--white);
  resize: none;
  min-height: 48px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  overflow-y: auto;
}
.chat-textarea:focus {
  border-color: var(--petrol);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.10);
}
.chat-char-count {
  position: absolute; bottom: var(--sp-2); right: var(--sp-3);
  font-family: var(--font-label);
  font-size: 10px;
  color: var(--text-muted);
}
.chat-char-count.near-limit { color: #EF4444; }
.chat-send-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--petrol);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 18px;
  transition: background var(--t-fast), transform var(--t-fast) var(--ease-out), opacity var(--t-fast);
  cursor: pointer;
  border: none;
}
.chat-send-btn:hover:not(:disabled) { background: var(--petrol-light); transform: scale(1.05); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Empty States */
.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-8);
}
.empty-icon { font-size: 48px; line-height: 1; margin-bottom: var(--sp-4); opacity: 0.5; }
.empty-title {
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}
.empty-desc { font-size: 14px; color: var(--text-muted); }

/* =========================================================
   UTILITY
   ========================================================= */
.card-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); border: 0;
}

/* Header notif wrapper */
.notif-wrapper { position: relative; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .header-inner { padding: 0 var(--sp-4); gap: var(--sp-2); }
  .client-name { display: none; }
  .logout-btn span { display: none; }
  .logout-btn { padding: 7px var(--sp-3); }
  .portal-body { padding: var(--sp-5) var(--sp-4) var(--sp-12); }
  .case-detail-body { padding: var(--sp-4) var(--sp-4) var(--sp-12); }
  .case-grid { grid-template-columns: 1fr; }
  .msg-bubble { max-width: 85%; }
  .notif-dropdown { width: calc(100vw - 32px); right: -8px; }
  .login-card { padding: var(--sp-6) var(--sp-5); }
  .case-detail-header { padding: var(--sp-5); }
  .case-detail-title { font-size: 18px; }
  #toast-container { left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4); }
  .toast { min-width: unset; width: 100%; }
}

@media (max-width: 480px) {
  .tabs-nav { gap: 1px; padding: 2px; }
  .tab-btn { padding: var(--sp-3) var(--sp-3); font-size: 12px; }
  .doc-grid { grid-template-columns: 1fr; }
  .chat-container { height: 460px; }
}

/* =========================================================
   PRINT STYLES
   ========================================================= */
@media print {
  .portal-header, .tabs-nav, .back-btn, .chat-container { display: none !important; }
  .timeline-card { box-shadow: none; border: 1px solid #ddd; }
  .timeline::before { background: #ccc; }
  body { background: white; }
  .case-detail-body { padding: 0; }
}
</style>/* End custom CSS */