/* SYEMFIT Identity Protocol: ZIMA/CASA AESTHETIC (Glassmorphism) */
:root {
    /* --- TYPOGRAPHY --- */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* --- COLOR PALETTE: Minimalist Dark --- */
    --bg-app: #0f1219;
    /* Clean dark base */

    /* Fallback */

    /* Main Accent (Zima Green/Teal) */
    --accent-color: #2ff5a5;
    --accent-glow: rgba(47, 245, 165, 0.4);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.45);

    /* --- GLASS VARIABLES (Visible "Discs") --- */
    --glass-surface: rgba(255, 255, 255, 0.06);
    /* Visible tint */
    --glass-border: rgba(255, 255, 255, 0.18);
    /* Crisp edge */
    --glass-highlight: rgba(255, 255, 255, 0.3);
    /* Shiny top */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    /* Clean shadow */

    --blur-strong: 24px;
    --blur-light: 10px;

    /* --- SHAPES --- */
    --radius-xl: 24px;
    /* Main Cards */
    --radius-lg: 16px;
    /* Panels / Buttons */
    --radius-md: 12px;
    /* Inputs */
    --radius-sm: 8px;
    /* Tags */

    --border-width: 1px;
    --field-focus: rgba(47, 245, 165, 0.35);
    --field-error: #ff6b6b;
    --field-error-glow: rgba(255, 107, 107, 0.28);
}

/* --- GLOBAL LAYOUT --- */
body {
    background-color: var(--bg-app);
    /* Subtle Minimalist Gradient */
    background-image: linear-gradient(to bottom, #151b26 0%, #0f1219 100%);
    background-attachment: fixed;
    background-size: cover;

    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    padding-left: 280px;
    /* Fixed Sidebar Space */
}

/* --- SCROLLBARS (Floating) --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0;
}

/* Reverting the "Industrial" UPPERCASE obsession to Sentence case for friendliness */
.page-title,
.section-title,
.card-label {
    text-transform: none;
    letter-spacing: -0.01em;
}

.font-mono {
    font-family: var(--font-mono);
}

/* --- GLASS CARD COMPONENT --- */
.card,
.panel,
.box {
    background: var(--glass-surface) !important;
    backdrop-filter: blur(var(--blur-strong));
    -webkit-backdrop-filter: blur(var(--blur-strong));

    border: 1px solid var(--glass-border) !important;
    border-top: 1px solid var(--glass-highlight) !important;
    /* Top light highlight */

    border-radius: var(--radius-xl) !important;
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover Effect for Interactive Cards */
.card.interactive:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* --- BUTTONS: Soft & Rounded --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    /* Contrast on bright teal */
    box-shadow: 0 4px 15px var(--accent-glow);
    font-weight: 600;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.btn-secondary {
    /* Glass Button */
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- INPUTS --- */
input,
select,
textarea {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px;
    font-family: var(--font-sans);
    transition: border 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 0 0 3px var(--field-focus);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
.is-error {
    border-color: var(--field-error) !important;
    box-shadow: 0 0 0 3px var(--field-error-glow);
}

.field-error-msg {
    display: none;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--field-error);
}

.is-error + .field-error-msg,
input[aria-invalid="true"] + .field-error-msg,
select[aria-invalid="true"] + .field-error-msg,
textarea[aria-invalid="true"] + .field-error-msg {
    display: block;
}

.form-feedback {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.form-feedback.is-success {
    color: #2ff5a5;
    border-color: rgba(47, 245, 165, 0.35);
    background: rgba(47, 245, 165, 0.08);
}

.form-feedback.is-error {
    color: #ff9f9f;
    border-color: rgba(255, 107, 107, 0.35);
    background: rgba(255, 107, 107, 0.08);
}

/* --- SIDEBAR (Floating Glass Pane) --- */
/* --- SIDEBAR (Floating Glass Pane) --- */
.sidebar {
    background: rgba(22, 27, 34, 0.75) !important;
    /* Slightly lighter for contrast */
    backdrop-filter: blur(var(--blur-strong));
    -webkit-backdrop-filter: blur(var(--blur-strong));
    border-right: 1px solid var(--glass-border);

    /* Fixed Positioning Behavior */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    /* Allow internal scroll if needed */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    z-index: 1000;
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

  /* NAV ITEMS (REFATORADO) */
  .nav-item {
      display: flex;
      align-items: center;
      padding: 10px 16px;
      border-radius: 12px;
      color: var(--text-primary);
      opacity: 0.85;
      transition: all 0.2s ease;
      margin-bottom: 4px;
      text-decoration: none;
      border-left: 2px solid transparent;
  }

  /* RESET BASE (evita herança antiga) */
  .nav a {
    background: transparent;
    border-left: none;  
  }
  
  .nav-item:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #fff;
      opacity: 1;  
  }

  .nav-item.active {
      background: var(--accent-color);
      color: #09090b;
      font-weight: 600;
      box-shadow: 0 6px 18px var(--accent-glow);
      border-left: none;
  }

  /* NAV SECTIONS (LABELS) */
  .nav-section {
      font-size: 0.65rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-tertiary);
      margin: 20px 0 8px 10px;
      font-weight: 600;
      opacity: 0.6;
      pointer-events: none;
  }

/* --- UTILITIES --- */
.text-muted {
    color: var(--text-secondary) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

/* Status Pills */
.status-pill {
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-pill.success {
    background: rgba(47, 245, 165, 0.15);
    color: #2ff5a5;
    border: 1px solid rgba(47, 245, 165, 0.3);
}

.status-pill.danger {
    background: rgba(255, 93, 93, 0.15);
    color: #ff5d5d;
    border: 1px solid rgba(255, 93, 93, 0.3);
}

/* Logo Fix */
.brand-logo,
.logo {
    filter: invert(1) brightness(2);
    /* Make logo white */
}

.brand-logo-img {
    filter: none !important;
}


/* --- TABLES --- */
.table thead th {
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
}

.table tbody td {
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.table tr:last-child td {
    border-bottom: none;
}

/* --- SIDEBAR DOMAIN BLOCK DIFFERENTIATION (MVP) --- */
.nav > .nav-section {
    padding: 6px 10px;
    margin: 16px 0 8px 4px;
    border-left: 3px solid var(--domain-accent, rgba(255, 255, 255, 0.35));
    background: var(--domain-bg, rgba(255, 255, 255, 0.03));
    border-radius: 10px;
    color: var(--text-primary);
}

.nav > .nav-section:nth-of-type(1) {
    --domain-accent: #5eead4;
    --domain-bg: rgba(94, 234, 212, 0.09);
}

.nav > .nav-section:nth-of-type(2) {
    --domain-accent: #93c5fd;
    --domain-bg: rgba(147, 197, 253, 0.09);
}

.nav > .nav-section:nth-of-type(3) {
    --domain-accent: #fca5a5;
    --domain-bg: rgba(252, 165, 165, 0.09);
}

.nav > .nav-section:nth-of-type(4) {
    --domain-accent: #c4b5fd;
    --domain-bg: rgba(196, 181, 253, 0.09);
}

.nav > .nav-section:nth-of-type(5) {
    --domain-accent: #fcd34d;
    --domain-bg: rgba(252, 211, 77, 0.10);
}

.nav > .nav-section:nth-of-type(6) {
    --domain-accent: #86efac;
    --domain-bg: rgba(134, 239, 172, 0.09);
}

