/* Netwiz Web - Main Stylesheet */
:root {
  --primary: #0052cc;
  --primary-dark: #003d99;
  --primary-light: #e8f0fe;
  --secondary: #f4f5f7;
  --success: #00875a;
  --warning: #ff8b00;
  --danger: #de350b;
  --text: #172b4d;
  --text-light: #5e6c84;
  --border: #dfe1e6;
  --bg: #f4f5f7;
  --white: #ffffff;
  --sidebar-w: 240px;
  --sidebar-bg: #0a1929;
  --sidebar-text: #b0bec5;
  --sidebar-active: #1565c0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* LOGIN PAGE */
.login-page { background: linear-gradient(135deg, #0a1929 0%, #0052cc 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-container { width: 100%; max-width: 420px; padding: 20px; }
.login-card { background: var(--white); border-radius: 16px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-logo { text-align: center; margin-bottom: 32px; }
.logo-placeholder { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.logo-icon { font-size: 32px; }
.login-logo h1 { font-size: 28px; font-weight: 700; color: var(--text); }
.login-logo h1 span { color: var(--primary); }
.login-logo p { color: var(--text-light); font-size: 13px; }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.login-form input { width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius); font-size: 14px; transition: border-color 0.2s; outline: none; }
.login-form input:focus { border-color: var(--primary); }
.login-footer { text-align: center; margin-top: 24px; color: var(--text-light); }

/* APP LAYOUT */
.app-wrapper { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; }
.sidebar-logo { padding: 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.logo-mark { font-size: 24px; }
.logo-text { font-size: 16px; font-weight: 600; color: var(--white); }
.nav-section { padding: 16px 0 8px; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.3); padding: 0 16px; display: block; margin-bottom: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--sidebar-text); text-decoration: none; transition: all 0.2s; font-size: 13px; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.nav-item.active { background: var(--sidebar-active); color: var(--white); border-left-color: #64b5f6; }
.nav-item.disabled { opacity: 0.4; pointer-events: none; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; }
.user-info { flex: 1; overflow: hidden; }
.user-avatar { width: 32px; height: 32px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 14px; }
.user-details strong { display: block; font-size: 13px; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-details small { color: var(--sidebar-text); font-size: 11px; }
.btn-logout { color: var(--sidebar-text); text-decoration: none; font-size: 18px; transition: color 0.2s; }
.btn-logout:hover { color: var(--danger); }

/* MAIN CONTENT */
.main-content { margin-left: var(--sidebar-w); flex: 1; padding: 24px; }
.content-wrapper { max-width: 1400px; margin: 0 auto; }

/* PAGE HEADER */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: var(--text); }
.page-subtitle { color: var(--text-light); font-size: 13px; margin-top: 4px; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.back-link { color: var(--text-light); text-decoration: none; font-size: 13px; display: block; margin-bottom: 4px; }
.back-link:hover { color: var(--primary); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; border: none; transition: all 0.2s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--secondary); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 6px 8px; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary-light); }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.stat-icon { font-size: 32px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--primary-light); }
.stat-info h3 { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-info p { color: var(--text-light); font-size: 13px; margin-top: 4px; }

/* DASHBOARD GRID */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* MODULES GRID */
.modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 4px 0; }
.module-card { background: var(--secondary); border-radius: var(--radius); padding: 20px 16px; text-decoration: none; color: var(--text); transition: all 0.2s; border: 2px solid transparent; text-align: center; }
.module-card:hover { border-color: var(--primary); background: var(--primary-light); }
.module-card.disabled { opacity: 0.5; pointer-events: none; }
.module-icon { font-size: 28px; margin-bottom: 8px; }
.module-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.module-card p { font-size: 12px; color: var(--text-light); }

/* CARDS */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h2 { font-size: 16px; font-weight: 600; }

/* STATS PILLS */
.stats-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 12px; font-weight: 500; transition: all 0.2s; cursor: pointer; }
.pill a { color: var(--text); text-decoration: none; }
.pill.active, .pill.active a { background: var(--primary); border-color: var(--primary); color: white; }
.pill:hover { border-color: var(--primary); }

/* TABLES */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); background: var(--secondary); border-bottom: 2px solid var(--border); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.row-inactive td { opacity: 0.6; }
.actions-cell { display: flex; gap: 4px; }
.empty-state { text-align: center; color: var(--text-light); padding: 32px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: capitalize; }
.badge-ativo, .badge-aprovado, .badge-publicado { background: #e3fcef; color: var(--success); }
.badge-inativo, .badge-recusado { background: #ffebe6; color: var(--danger); }
.badge-draft, .badge-rascunho, .badge-pendente, .badge-fechada { background: #fff4e6; color: var(--warning); }
.badge-aberta { background: #e3fcef; color: var(--success); }
.badge-admin { background: #e8f0fe; color: var(--primary); }
.badge-editor { background: #f3f0ff; color: #5e35b1; }
.badge-viewer { background: var(--secondary); color: var(--text-light); }
.badge-ciclo, .badge-tipo { background: var(--primary-light); color: var(--primary); }
.badge-role { padding: 4px 12px; font-size: 12px; }
.badge-you { background: var(--primary-light); color: var(--primary); border-radius: 20px; padding: 2px 8px; font-size: 11px; margin-left: 6px; }

/* FORMS */
.form-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.span-2 { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text); }
.form-group input, .form-group select, .form-group textarea { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: inherit; color: var(--text); outline: none; transition: border-color 0.2s; background: var(--white); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,82,204,0.1); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group .field-meta { font-size: 11px; color: var(--text-light); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 20px; border-top: 1px solid var(--border); margin-top: 20px; }
.form-actions.sticky-bottom { position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--border); padding: 16px 24px; margin: 0 -24px -24px; border-radius: 0 0 var(--radius) var(--radius); }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input, .search-form select { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.inline-form { display: inline; }
.inline-form select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #ffebe6; color: var(--danger); border: 1px solid #ff8f73; }
.alert-success { background: #e3fcef; color: var(--success); border: 1px solid #79f2c0; }

/* ACTIVITY LIST */
.activity-list { padding: 0 4px; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 20px; width: 36px; }
.activity-info { flex: 1; }
.activity-info p { font-size: 13px; margin: 0; }
.activity-info small { color: var(--text-light); font-size: 12px; }

/* TABS */
.tabs-container { margin-bottom: 16px; }
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); }
.tab { padding: 10px 20px; color: var(--text-light); text-decoration: none; font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* FASES GRID */
.fases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 20px; }
.fase-card { background: var(--secondary); border-radius: var(--radius); padding: 16px; border: 2px solid var(--border); }
.fase-card.aberta { border-color: var(--success); background: #e3fcef; }
.fase-card.fechada { border-color: var(--border); opacity: 0.8; }
.fase-card.vazia { border-style: dashed; opacity: 0.7; }
.fase-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.fase-num { font-weight: 700; font-size: 15px; }
.fase-dates { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.date-row { display: flex; justify-content: space-between; font-size: 12px; }
.date-row span { color: var(--text-light); }
.fase-empty { color: var(--text-light); font-size: 12px; text-align: center; margin: 8px 0; }
.fase-actions { display: flex; gap: 6px; }
.section-title { padding: 16px 20px 0; font-size: 16px; font-weight: 600; }
.concurso-selector { display: flex; flex-direction: column; gap: 8px; }
.concurso-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.concurso-pills .pill { font-size: 11px; }

/* USER CELL */
.user-cell { display: flex; align-items: center; gap: 8px; }
.user-avatar-sm { width: 28px; height: 28px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 12px; flex-shrink: 0; }

/* SYNC STATUS */
.sync-ok { color: var(--success); font-size: 12px; }
.sync-pending { color: var(--warning); font-size: 12px; }
.ext-link { color: var(--text-light); text-decoration: none; margin-left: 4px; font-size: 11px; }

/* MODAL */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal-content { background: var(--white); border-radius: 12px; padding: 24px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-light); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .logo-text, .nav-label, .user-details, .btn-logout { display: none; }
  .main-content { margin-left: 60px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid, .form-grid { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: 1fr 1fr; }
  .fases-grid { grid-template-columns: 1fr 1fr; }
}

/* ===================== NETWIZ WEB 2026 DESIGN SYSTEM ===================== */

/* PrimeIcons fallback (loaded via CDN in header) */
.pi { font-family: primeicons, sans-serif; font-style: normal; }

/* Page header bar */
.page-header-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-header-left { display: flex; align-items: center; gap: 14px; }
.page-icon-wrap { width: 44px; height: 44px; background: linear-gradient(135deg, #0052cc 0%, #0077ff 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; flex-shrink: 0; }
.page-title { font-size: 22px; font-weight: 700; color: #172b4d; line-height: 1.2; }
.page-subtitle { font-size: 13px; color: #5e6c84; margin-top: 2px; }
.page-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sync-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #5e6c84; background: #f4f5f7; padding: 6px 12px; border-radius: 20px; }
.back-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: #f4f5f7; color: #5e6c84; text-decoration: none; flex-shrink: 0; transition: all 0.2s; }
.back-btn:hover { background: #e8f0fe; color: #0052cc; }
.btn-ghost { background: transparent; color: #5e6c84; border: 1px solid #dfe1e6; }
.btn-ghost:hover { background: #f4f5f7; }

/* Cycle Tabs */
.cycle-tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 2px; }
.cycle-tab { display: flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 8px; text-decoration: none; color: #5e6c84; font-size: 13px; font-weight: 500; transition: all 0.2s; white-space: nowrap; border: 2px solid transparent; background: white; }
.cycle-tab:hover { background: #e8f0fe; color: #0052cc; }
.cycle-tab.active { background: #0052cc; color: white; border-color: #0052cc; }
.ct-count { font-size: 11px; font-weight: 700; background: rgba(0,0,0,0.12); padding: 1px 7px; border-radius: 10px; }
.cycle-tab.active .ct-count { background: rgba(255,255,255,0.25); }
.cycle-ctesp.active { background: #5e35b1; border-color: #5e35b1; }
.cycle-licenciatura.active { background: #0052cc; border-color: #0052cc; }
.cycle-mestrado.active { background: #00796b; border-color: #00796b; }
.cycle-pos_graduacao.active { background: #e65100; border-color: #e65100; }

/* Filters bar */
.filters-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; background: white; padding: 12px 16px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #5e6c84; font-size: 14px; }
.search-wrap input { width: 100%; padding: 8px 36px 8px 36px; border: 1px solid #dfe1e6; border-radius: 8px; font-size: 13px; outline: none; transition: border-color 0.2s; }
.search-wrap input:focus { border-color: #0052cc; box-shadow: 0 0 0 3px rgba(0,82,204,0.1); }
.clear-search { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 18px; color: #5e6c84; cursor: pointer; }
.filter-selects { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select { padding: 7px 12px; border: 1px solid #dfe1e6; border-radius: 8px; font-size: 13px; color: #172b4d; background: white; outline: none; cursor: pointer; }
.filter-select:focus { border-color: #0052cc; }
.results-count { font-size: 12px; color: #5e6c84; white-space: nowrap; margin-left: auto; }

/* Courses Table */
.cursos-table-wrap { background: white; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; }
.cursos-table { width: 100%; border-collapse: collapse; }
.cursos-table thead { background: #f8fafc; }
.cursos-table th { padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: #5e6c84; border-bottom: 2px solid #e8ecf1; }
.cursos-table td { padding: 13px 16px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.curso-row { cursor: pointer; transition: background 0.15s; }
.curso-row:hover td { background: #f8faff; }
.curso-row.row-inactive td { opacity: 0.55; }
.curso-info { display: flex; align-items: center; gap: 12px; }
.curso-thumb { width: 40px; height: 40px; border-radius: 8px; background-size: cover; background-position: center; flex-shrink: 0; }
.curso-thumb-empty { background: #e8f0fe; display: flex; align-items: center; justify-content: center; color: #0052cc; font-size: 16px; }
.curso-text .curso-nome { font-weight: 600; font-size: 13px; color: #172b4d; line-height: 1.3; }
.curso-text .curso-curto { font-size: 11px; color: #5e6c84; }
.curso-link { font-size: 11px; color: #0052cc; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; }
.curso-link:hover { text-decoration: underline; }
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.tag-ctesp { background: #ede7f6; color: #5e35b1; }
.tag-lic { background: #e3f2fd; color: #1565c0; }
.tag-mest { background: #e8f5e9; color: #2e7d32; }
.tag-pos { background: #fff3e0; color: #e65100; }
.campus-badge { font-size: 12px; color: #5e6c84; }
.area-text { font-size: 12px; color: #5e6c84; max-width: 130px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nivel-badge { font-size: 11px; color: #5e6c84; }
.status-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.status-active { background: #e3fcef; color: #00875a; }
.status-inactive { background: #ffebe6; color: #de350b; }
.status-draft { background: #fff4e6; color: #ff8b00; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; background: #f4f5f7; color: #5e6c84; text-decoration: none; transition: all 0.15s; font-size: 13px; }
.action-btn:hover { background: #e8f0fe; color: #0052cc; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-icon { font-size: 40px; color: #dfe1e6; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: #172b4d; margin-bottom: 8px; }
.empty-state p { color: #5e6c84; font-size: 13px; }

/* Sync Toast */
.sync-toast { position: fixed; bottom: 24px; right: 24px; z-index: 9999; animation: slideUp 0.3s ease; }
.sync-toast.hidden { display: none; }
.sync-toast-inner { background: #172b4d; color: white; padding: 14px 20px; border-radius: 10px; display: flex; align-items: center; gap: 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===================== CURSOS EDITAR 2026 ===================== */
.form-cols { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.form-main { display: flex; flex-direction: column; gap: 20px; }
.form-section { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.section-header { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: #f8fafc; border-bottom: 1px solid #e8ecf1; }
.section-icon { width: 36px; height: 36px; background: #e8f0fe; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #0052cc; font-size: 16px; flex-shrink: 0; }
.section-header h2 { font-size: 15px; font-weight: 600; color: #172b4d; line-height: 1.2; }
.section-header p { font-size: 12px; color: #5e6c84; margin-top: 2px; }
.section-body { padding: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Field variants */
.field { display: flex; flex-direction: column; gap: 5px; }
.field-full { grid-column: 1 / -1; }
.field-half { grid-column: span 2; }
.field-quarter { grid-column: span 1; }
.field label { font-size: 12px; font-weight: 600; color: #5e6c84; text-transform: uppercase; letter-spacing: 0.5px; }
.field input, .field select, .field textarea { padding: 9px 12px; border: 1.5px solid #dfe1e6; border-radius: 8px; font-size: 14px; font-family: inherit; color: #172b4d; outline: none; transition: all 0.2s; background: white; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #0052cc; box-shadow: 0 0 0 3px rgba(0,82,204,0.08); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field .req { color: #de350b; }
.field .opt { color: #5e6c84; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; }
.field-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #0052cc; text-decoration: none; margin-top: 4px; }
.img-preview { width: 100%; height: 80px; border-radius: 8px; background-size: cover; background-position: center; margin-top: 8px; border: 1px solid #dfe1e6; }

/* Sidebar cards */
.form-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
.sidebar-card { background: white; border-radius: 12px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.sidebar-card h3 { font-size: 14px; font-weight: 600; color: #172b4d; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.sidebar-card .field { margin-bottom: 12px; }
.sidebar-card .field:last-child { margin-bottom: 0; }
.save-card { border: 2px solid #e8f0fe; }
.save-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.save-meta { border-top: 1px solid #f0f2f5; padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.meta-row { display: flex; justify-content: space-between; font-size: 12px; }
.meta-row span:first-child { color: #5e6c84; }
.meta-row span:last-child { font-weight: 500; color: #172b4d; }

/* Toggles */
.toggle-list { display: flex; flex-direction: column; gap: 10px; }
.toggle-item { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-item input[type="checkbox"] { display: none; }
.toggle-switch { width: 36px; height: 20px; background: #dfe1e6; border-radius: 10px; position: relative; transition: background 0.2s; flex-shrink: 0; }
.toggle-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: white; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-item input:checked + .toggle-switch { background: #0052cc; }
.toggle-item input:checked + .toggle-switch::after { transform: translateX(16px); }
.toggle-item > span:last-child { font-size: 13px; color: #172b4d; }

/* Tech data */
.tech-data { display: flex; flex-direction: column; gap: 8px; }
.tech-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.tech-row span { color: #5e6c84; }
.tech-row code { background: #f4f5f7; padding: 2px 8px; border-radius: 4px; font-family: monospace; font-size: 12px; color: #172b4d; }

/* Nav improvements */
.nav-section-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.3); padding: 16px 16px 6px; }
.sidebar-nav .nav-item { font-size: 13px; border-radius: 0; border-left: 3px solid transparent; }
.pi-spin { animation: pi-spin 1s linear infinite; }
@keyframes pi-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Candidaturas module improvements */
.page-candidaturas .stat-cards-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.mini-stat { background: white; border-radius: 10px; padding: 14px 18px; flex: 1; min-width: 120px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.mini-stat .ms-label { font-size: 11px; color: #5e6c84; text-transform: uppercase; letter-spacing: 0.5px; }
.mini-stat .ms-value { font-size: 28px; font-weight: 700; color: #172b4d; line-height: 1.2; margin-top: 4px; }
.mini-stat.ms-open .ms-value { color: #00875a; }
.mini-stat.ms-closed .ms-value { color: #de350b; }

/* Better data table for candidaturas */
.data-table-modern { width: 100%; border-collapse: collapse; }
.data-table-modern th { padding: 12px 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: #5e6c84; background: #f8fafc; border-bottom: 2px solid #e8ecf1; text-align: left; }
.data-table-modern td { padding: 12px 16px; border-bottom: 1px solid #f0f2f5; font-size: 13px; vertical-align: middle; }
.data-table-modern tr:hover td { background: #f8faff; }

/* Date display */
.date-display { display: flex; flex-direction: column; }
.date-display .dd-date { font-size: 13px; font-weight: 500; color: #172b4d; }
.date-display .dd-label { font-size: 11px; color: #5e6c84; }
.date-display-empty { color: #5e6c84; font-size: 12px; }

/* Candidaturas stats row */
.cand-stats-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.mini-stat { background: white; border-radius: 10px; padding: 16px 20px; flex: 1; min-width: 120px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border-left: 4px solid #dfe1e6; }
.mini-stat.ms-open { border-left-color: #00875a; }
.mini-stat.ms-closed { border-left-color: #de350b; }
.mini-stat.ms-total { border-left-color: #0052cc; }
.mini-stat .ms-label { font-size: 11px; color: #5e6c84; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.mini-stat .ms-value { font-size: 30px; font-weight: 700; color: #172b4d; line-height: 1.1; margin-top: 4px; }
.mini-stat.ms-open .ms-value { color: #00875a; }
.mini-stat.ms-closed .ms-value { color: #de350b; }
.mini-stat.ms-total .ms-value { color: #0052cc; }
