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

:root {
    --bg-dark: #07111f;
    --bg-card: rgba(11, 22, 42, 0.82);
    --bg-card-hover: rgba(14, 28, 54, 0.92);
    --bg-input: rgba(8, 16, 32, 0.95);
    --border-glass: rgba(0, 212, 255, 0.14);
    --border-card: rgba(0, 212, 255, 0.1);
    --border-focus: rgba(0, 200, 255, 0.7);
    --primary: #00c8ff;
    --primary-dark: #0099cc;
    --primary-dim: rgba(0, 200, 255, 0.15);
    --primary-glow: rgba(0, 200, 255, 0.28);
    --secondary: #00e5c8;
    --success: #00e5a0;
    --success-glow: rgba(0, 229, 160, 0.25);
    --danger: #ff4d6d;
    --warning: #ffb800;
    --purple: #a78bfa;
    --text-main: #dff0ff;
    --text-muted: #5a7a99;
    --text-label: #7bacc8;
    --sidebar-w: 272px;
    --radius: 18px;
    --radius-sm: 13px;
    --radius-xs: 9px;
    --transition: .22s cubic-bezier(.4,0,.2,1);
    --font: 'Inter', system-ui, sans-serif;
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00c8ff 100%);
    --gradient-primary-soft: linear-gradient(135deg, rgba(0,102,255,0.12) 0%, rgba(0,200,255,0.08) 100%);
    --gradient-success: linear-gradient(135deg, #00c896, #00e5a0);
    --gradient-purple: linear-gradient(135deg, #7c3aed, #a78bfa);
    --gradient-warning: linear-gradient(135deg, #e08000, #ffb800);
    --shadow-card: 0 4px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(0,200,255,.07), 0 1px 0 rgba(255,255,255,.04);
    --shadow-btn: 0 6px 32px rgba(0,150,255,.5);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,100,220,.22) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(0,180,120,.1) 0%, transparent 65%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== ANIMATED BG ===== */
.bg-animation { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orb {
    position: absolute; border-radius: 50%; filter: blur(130px); opacity: .18;
    animation: orbFloat 22s ease-in-out infinite;
}
.bg-orb-1 { width: 700px; height: 700px; background: #0050cc; top: -20%; left: -14%; animation-delay: 0s; }
.bg-orb-2 { width: 500px; height: 500px; background: #007777; bottom: -18%; right: -12%; animation-delay: -8s; }
.bg-orb-3 { width: 420px; height: 420px; background: #6600cc; top: 35%; left: 46%; animation-delay: -16s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(50px,-40px) scale(1.06); }
    66% { transform: translate(-38px,24px) scale(.96); }
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); z-index: 100;
    background:
        linear-gradient(180deg, rgba(3,8,28,.90) 0%, rgba(1,6,22,.93) 100%),
        url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?w=600&q=80') center/cover no-repeat;
    border-right: 1px solid rgba(0,200,255,.13);
    display: flex; flex-direction: column;
    transition: transform var(--transition);
    box-shadow: 4px 0 40px rgba(0,0,0,.5);
}
.sidebar::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-primary);
    box-shadow: 0 0 20px rgba(0,200,255,.6);
}
.sidebar-header { padding: 30px 24px 22px; border-bottom: 1px solid var(--border-glass); }
.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
    width: 44px; height: 44px; border-radius: 13px;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: #fff;
    box-shadow: 0 4px 18px rgba(37,99,235,.45);
    flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text span:first-child {
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em;
}
.logo-text span:last-child {
    font-size: .68rem; font-weight: 500; color: var(--text-muted); margin-top: 3px;
    text-transform: uppercase; letter-spacing: .08em;
}

.sidebar-menu { list-style: none; padding: 20px 14px; flex: 1; }
.menu-item {
    display: flex; align-items: center; gap: 14px; padding: 13px 18px;
    border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted);
    font-weight: 500; font-size: .9rem; transition: all var(--transition); margin-bottom: 6px;
    position: relative;
}
.menu-item::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 0; border-radius: 0 3px 3px 0;
    background: var(--gradient-primary); transition: height var(--transition);
}
.menu-item:hover { background: rgba(0,200,255,.07); color: var(--text-main); }
.menu-item:hover::before { height: 55%; }
.menu-item.active { background: linear-gradient(90deg, rgba(0,120,255,.16), rgba(0,200,255,.07)); color: var(--primary); }
.menu-item.active::before { height: 65%; box-shadow: 0 0 12px var(--primary-glow); }
.menu-item i { width: 20px; text-align: center; font-size: 1rem; }

.sidebar-footer {
    padding: 20px 24px; border-top: 1px solid var(--border-glass);
    display: flex; align-items: center; gap: 12px;
}
.sidebar-footer-info { flex: 1; }
.sidebar-footer-info p:first-child { font-size: .8rem; font-weight: 600; color: var(--text-main); }
.sidebar-footer-info p:last-child { font-size: .71rem; color: var(--text-muted); margin-top: 2px; }
.sidebar-status {
    width: 9px; height: 9px; border-radius: 50%; background: var(--success);
    box-shadow: 0 0 10px var(--success); flex-shrink: 0; animation: pulse-dot 2.5s ease infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); }
    50% { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

.sidebar-portal-btn {
    display: flex; align-items: center; gap: 12px;
    margin: 0 14px 14px; padding: 12px 16px;
    border-radius: var(--radius-sm); text-decoration: none;
    background: rgba(0,212,164,.08); border: 1px solid rgba(0,212,164,.18);
    color: #00d4a4; font-size: .875rem; font-weight: 600;
    transition: all var(--transition);
}
.sidebar-portal-btn:hover {
    background: rgba(0,212,164,.15); border-color: rgba(0,212,164,.35);
    box-shadow: 0 0 20px rgba(0,212,164,.1);
}

/* ===== SIDEBAR LOGOUT BTN ===== */
.sidebar-logout-btn {
    display: flex; align-items: center; gap: 12px;
    margin: 0 14px 14px; padding: 11px 16px;
    border-radius: var(--radius-sm); border: 1px solid rgba(255,77,109,.15);
    background: rgba(255,77,109,.06); color: rgba(255,77,109,.65);
    font-size: .875rem; font-weight: 600; font-family: var(--font);
    cursor: pointer; transition: all var(--transition); width: calc(100% - 28px);
}
.sidebar-logout-btn:hover {
    background: rgba(255,77,109,.14); border-color: rgba(255,77,109,.32); color: var(--danger);
}
.sidebar-suporte-btn {
    display: flex; align-items: center; gap: 12px;
    margin: 0 14px 10px; padding: 11px 16px;
    border-radius: var(--radius-sm); text-decoration: none;
    background: rgba(100,120,180,.07); border: 1px solid rgba(100,160,255,.15);
    color: rgba(160,190,255,.65);
    font-size: .875rem; font-weight: 600;
    transition: all var(--transition);
}
.sidebar-suporte-btn:hover { background: rgba(100,140,255,.12); border-color: rgba(100,160,255,.3); color: rgba(190,210,255,.9); }
.sidebar-brand {
    text-align: center; font-size: .68rem; font-weight: 700;
    color: var(--text-muted); padding: 0 14px 18px;
    letter-spacing: .04em; text-transform: uppercase; opacity: .5;
}

/* ===== LOGIN OVERLAY (GESTOR) ===== */
.login-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: stretch;
    animation: fadeOverlay .28s ease;
}
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.login-split { display: flex; width: 100%; height: 100%; }

.login-img-panel {
    flex: 1; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-end;
    background: url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?w=1600&q=85') center/cover no-repeat;
}
.login-img-panel::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(2,8,28,.45) 0%, rgba(0,10,60,.92) 100%);
}
.login-img-content {
    position: relative; z-index: 1; padding: 56px 52px;
}
.login-img-brand {
    font-size: 3.2rem; font-weight: 800; letter-spacing: -.06em;
    color: #fff; margin-bottom: 14px; line-height: 1;
    text-shadow: 0 2px 32px rgba(0,0,0,.5);
}
.login-img-tagline {
    font-size: 1rem; color: rgba(255,255,255,.58); line-height: 1.7;
    max-width: 360px; margin-bottom: 36px;
}
.login-img-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 22px; border-radius: 50px;
    background: rgba(0,200,255,.12); border: 1px solid rgba(0,200,255,.28);
    color: #00c8ff; font-size: .8rem; font-weight: 700; letter-spacing: .03em;
    backdrop-filter: blur(8px);
}

.login-form-panel {
    width: 500px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 44px; overflow-y: auto;
    background: rgba(3,7,18,.99);
    border-left: 1px solid rgba(0,200,255,.08);
}

.login-card {
    width: 100%;
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius); box-shadow: var(--shadow-card);
    padding: 40px 36px; position: relative; overflow: hidden;
    animation: slideUp .34s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.login-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-primary); box-shadow: 0 0 20px var(--primary-glow);
}

@media (max-width: 860px) {
    .login-img-panel { display: none; }
    .login-form-panel { width: 100%; padding: 32px 24px; }
}
.login-card-logo {
    display: flex; align-items: center; gap: 14px; margin-bottom: 32px;
}
.login-card-logo .logo-icon {
    width: 44px; height: 44px; border-radius: 13px; font-size: 1.1rem; flex-shrink: 0;
}
.login-card-title {
    font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px;
    color: var(--text-main);
}
.login-card-sub {
    color: var(--text-muted); font-size: .875rem; margin-bottom: 28px; line-height: 1.55;
}
.login-card .form-group label {
    font-size: .76rem; font-weight: 700; color: var(--text-label);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; display: block;
}
.login-card .form-group input {
    width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
    background: var(--bg-input); border: 1px solid var(--border-glass);
    color: var(--text-main); font-size: .92rem; font-family: var(--font);
    outline: none; transition: all var(--transition);
    box-shadow: inset 0 1px 4px rgba(0,0,0,.3);
}
.login-card .form-group input:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim), inset 0 1px 4px rgba(0,0,0,.2);
}
.login-card .form-group .error-msg {
    font-size: .77rem; color: var(--danger); margin-top: 5px; display: block; min-height: 18px;
}
.login-portal-link {
    text-align: center; margin-top: 20px; font-size: .84rem; color: var(--text-muted);
}
.login-portal-link a { color: var(--primary); text-decoration: none; font-weight: 600; }
.login-portal-link a:hover { text-decoration: underline; }

/* ===== MOBILE HEADER ===== */
.mobile-header {
    display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 99;
    background: rgba(5,9,22,.98); backdrop-filter: blur(24px);
    padding: 14px 20px; border-bottom: 1px solid var(--border-glass);
    align-items: center; gap: 16px;
}
.menu-toggle { background: none; border: none; color: var(--text-main); font-size: 1.25rem; cursor: pointer; }

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-w); padding: 44px 52px;
    position: relative; z-index: 1; min-height: 100vh;
}

/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: 36px; }
.page-header-inner { display: flex; align-items: flex-start; gap: 18px; }
.page-header-icon {
    width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0;
    background: var(--gradient-primary-soft); border: 1px solid rgba(59,130,246,.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1.3rem;
}
.page-header h1 {
    font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em;
    line-height: 1.1; margin-bottom: 7px;
}
.page-header h1 i { display: none; }
.page-header p { color: var(--text-muted); font-size: .92rem; line-height: 1.55; }

.view { display: none; animation: fadeSlideIn .38s ease; }
.view.active { display: block; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== STEPS INDICATOR ===== */
.steps-indicator {
    display: flex; align-items: center; justify-content: center; gap: 0;
    margin-bottom: 28px; padding: 18px 32px;
    background: linear-gradient(135deg, rgba(0,60,140,.35), rgba(0,40,100,.25));
    border-radius: var(--radius);
    border: 1px solid rgba(0,200,255,.16); backdrop-filter: blur(20px);
    box-shadow: 0 4px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(0,200,255,.06);
}
.step {
    display: flex; align-items: center; gap: 12px; padding: 8px 22px;
    border-radius: 50px; transition: all var(--transition); cursor: pointer;
}
.step-number {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .82rem;
    background: rgba(0,180,255,.1); color: var(--text-muted);
    border: 2px solid rgba(0,180,255,.18); transition: all var(--transition);
}
.step-label { font-size: .85rem; font-weight: 600; color: var(--text-muted); transition: color var(--transition); }
.step.active .step-number {
    background: var(--gradient-primary); color: #fff; border-color: transparent;
    box-shadow: 0 0 24px rgba(0,180,255,.6), 0 0 0 4px rgba(0,180,255,.15);
}
.step.active .step-label { color: #fff; font-weight: 700; }
.step.active { background: rgba(0,120,255,.15); }
.step.completed .step-number {
    background: var(--gradient-success); color: #07111f; border-color: transparent;
    box-shadow: 0 0 18px var(--success-glow);
}
.step.completed .step-label { color: var(--success); }
.step-line { flex: 1; max-width: 64px; height: 2px; background: rgba(0,200,255,.14); margin: 0 2px; border-radius: 2px; }

/* ===== GLASS CARD ===== */
.card.glass-card, .glass-card {
    background: var(--bg-card); backdrop-filter: blur(24px);
    border: 1px solid var(--border-card); border-radius: var(--radius);
    box-shadow: var(--shadow-card); transition: all var(--transition);
    position: relative; overflow: hidden;
}
.card.glass-card::before, .glass-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,200,255,.5), transparent);
    pointer-events: none;
}
.card-header {
    padding: 22px 28px; font-size: 1rem; font-weight: 700;
    border-bottom: 1px solid rgba(0,200,255,.09);
    display: flex; align-items: center; gap: 12px;
    letter-spacing: -.01em; color: var(--text-main);
    background: rgba(0,100,200,.04);
}
.card-header i {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, rgba(0,100,220,.2), rgba(0,200,255,.12));
    border: 1px solid rgba(0,200,255,.25);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: .9rem; flex-shrink: 0;
    box-shadow: 0 0 12px rgba(0,200,255,.15);
}

/* ===== FORM ===== */
.form-step { display: none; animation: fadeSlideIn .3s ease; }
.form-step.active { display: block; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 28px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
    display: block; font-size: .78rem; font-weight: 700; color: var(--text-label);
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em;
}
.required { color: var(--danger); }

.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 13px 18px; border-radius: var(--radius-sm);
    background: var(--bg-input); border: 1px solid rgba(0,180,255,.16);
    color: var(--text-main); font-size: .925rem; font-family: var(--font);
    transition: all var(--transition); outline: none;
    box-shadow: inset 0 1px 4px rgba(0,0,0,.3);
}
.form-group input::placeholder { color: var(--text-muted); opacity: .55; }
.form-group input:hover, .form-group select:hover { border-color: rgba(0,200,255,.32); }
.form-group input:focus, .form-group select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,200,255,.12), inset 0 1px 4px rgba(0,0,0,.2);
    background: rgba(4,14,32,.98);
}
.form-group input.invalid, .form-group select.invalid {
    border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255,77,109,.1);
}
.error-msg { font-size: .78rem; color: var(--danger); margin-top: 5px; display: block; min-height: 18px; font-weight: 500; }

.form-group select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}

/* ===== CHECKBOX GRID ===== */
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
.checkbox-card {
    display: flex; align-items: center; gap: 10px; padding: 13px 16px;
    background: var(--bg-input); border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
    font-size: .875rem; color: var(--text-muted); user-select: none;
}
.checkbox-card:hover { border-color: rgba(0,200,255,.4); background: rgba(0,150,255,.07); }
.checkbox-card input { display: none; }
.checkmark {
    width: 20px; height: 20px; border-radius: 6px; border: 2px solid rgba(0,200,255,.22);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: all var(--transition);
}
.checkmark::after { content: '✓'; font-size: .72rem; color: transparent; transition: color var(--transition); font-weight: 800; }
.checkbox-card input:checked ~ .checkmark {
    background: var(--gradient-primary); border-color: transparent;
    box-shadow: 0 2px 14px rgba(0,180,255,.45);
}
.checkbox-card input:checked ~ .checkmark::after { color: #fff; }
.checkbox-card input:checked ~ span:last-child { color: var(--text-main); font-weight: 500; }
.checkbox-card:has(input:checked) { border-color: rgba(0,200,255,.38); background: rgba(0,120,255,.09); }

/* ===== FORM ACTIONS ===== */
.form-actions {
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px 28px; border-top: 1px solid var(--border-glass);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px;
    border: none; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 600;
    font-family: var(--font); cursor: pointer; transition: all var(--transition);
    letter-spacing: -.01em;
}
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: 0 2px 22px rgba(0,150,255,.35); }
.btn-primary:hover { box-shadow: 0 8px 36px rgba(0,150,255,.55); transform: translateY(-2px); filter: brightness(1.1); }
.btn-secondary { background: rgba(0,180,255,.09); color: var(--primary); border: 1px solid rgba(0,200,255,.22); }
.btn-secondary:hover { background: rgba(0,180,255,.17); border-color: rgba(0,200,255,.4); }
.btn-success { background: var(--gradient-success); color: #07111f; font-weight: 700; box-shadow: 0 2px 22px rgba(0,220,160,.3); }
.btn-success:hover { box-shadow: 0 8px 36px rgba(0,220,160,.5); transform: translateY(-2px); filter: brightness(1.08); }
.btn-danger { background: linear-gradient(135deg, #cc1a36, #ff4d6d); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text-muted); border: 1px solid rgba(0,180,255,.18); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,200,255,.07); box-shadow: 0 0 16px rgba(0,200,255,.1); }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.btn-icon { padding: 8px 10px; border-radius: 10px; }

/* ===== LIST / TABLE ===== */
.list-toolbar {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 20px 24px; border-bottom: 1px solid var(--border-glass); flex-wrap: wrap;
}
.search-box {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-input); padding: 11px 18px;
    border-radius: var(--radius-sm); border: 1px solid rgba(0,180,255,.18);
    flex: 1; max-width: 420px; transition: all var(--transition);
}
.search-box:focus-within { border-color: rgba(0,200,255,.45); box-shadow: 0 0 0 4px rgba(0,200,255,.09); }
.search-box i { color: var(--text-muted); font-size: .9rem; }
.search-box input { background: none; border: none; outline: none; color: var(--text-main); font-size: .9rem; font-family: var(--font); width: 100%; }
.search-box input::placeholder { color: var(--text-muted); opacity: .5; }

.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    padding: 14px 20px; text-align: left; font-size: .72rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em;
    border-bottom: 1px solid var(--border-glass); white-space: nowrap;
    background: rgba(5,10,24,.5);
}
tbody td {
    padding: 15px 20px; font-size: .875rem;
    border-bottom: 1px solid rgba(70,120,255,.05); white-space: nowrap;
}
tbody td strong { color: var(--text-main); font-weight: 600; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: rgba(37,99,235,.04); }

.badge {
    display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 50px;
    font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.badge-primary { background: rgba(0,180,255,.1); color: #00c8ff; border: 1px solid rgba(0,200,255,.25); }
.badge-success { background: rgba(0,220,160,.1); color: #00e5a0; border: 1px solid rgba(0,229,160,.25); }
.badge-warning { background: rgba(255,184,0,.1); color: #ffb800; border: 1px solid rgba(255,184,0,.25); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 72px 20px; }
.empty-state i { font-size: 3.5rem; color: var(--text-muted); opacity: .22; margin-bottom: 20px; display: block; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; font-weight: 700; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; font-size: .9rem; }

/* ===== DASHBOARD ===== */
.dashboard-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px;
}
.stat-card {
    display: flex; align-items: center; gap: 20px; padding: 26px;
    position: relative; overflow: hidden;
}
.stat-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card:nth-child(1)::after { background: var(--gradient-primary); }
.stat-card:nth-child(2)::after { background: var(--gradient-purple); }
.stat-card:nth-child(3)::after { background: var(--gradient-warning); }
.stat-card:nth-child(4)::after { background: var(--gradient-success); }
.stat-icon {
    width: 62px; height: 62px; border-radius: 18px; display: flex; align-items: center;
    justify-content: center; font-size: 1.4rem; flex-shrink: 0;
    background: var(--gradient-primary); color: #fff;
    box-shadow: 0 6px 28px rgba(0,150,255,.45), 0 0 0 1px rgba(0,200,255,.2);
}
.stat-icon.specialists { background: var(--gradient-purple); box-shadow: 0 6px 28px rgba(124,58,237,.45), 0 0 0 1px rgba(167,139,250,.2); }
.stat-icon.residents { background: var(--gradient-warning); box-shadow: 0 6px 28px rgba(220,130,0,.45), 0 0 0 1px rgba(255,184,0,.2); }
.stat-icon.hospitals { background: var(--gradient-success); box-shadow: 0 6px 28px rgba(0,200,140,.45), 0 0 0 1px rgba(0,229,160,.2); }
.stat-value { font-size: 2.2rem; font-weight: 800; display: block; line-height: 1; letter-spacing: -.04em; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 5px; display: block; font-weight: 500; }

.dashboard-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-bars { padding: 24px; }
.chart-bar-item { margin-bottom: 18px; }
.chart-bar-label { display: flex; justify-content: space-between; font-size: .84rem; margin-bottom: 7px; font-weight: 500; }
.chart-bar-label span:last-child { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-bar-track { height: 10px; background: rgba(37,99,235,.08); border-radius: 50px; overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: 50px; transition: width .9s cubic-bezier(.4,0,.2,1); background: var(--gradient-primary); }
.chart-bar-item:nth-child(2) .chart-bar-fill { background: var(--gradient-purple); }
.chart-bar-item:nth-child(3) .chart-bar-fill { background: var(--gradient-success); }
.chart-bar-item:nth-child(4) .chart-bar-fill { background: var(--gradient-warning); }
.chart-bar-item:nth-child(5) .chart-bar-fill { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.chart-bar-item:nth-child(6) .chart-bar-fill { background: linear-gradient(90deg, #ec4899, #f472b6); }
.chart-bar-item:nth-child(7) .chart-bar-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(8px);
    z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal { width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto; animation: modalIn .28s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px 28px; border-bottom: 1px solid var(--border-glass);
}
.modal-header h2 { font-size: 1.15rem; font-weight: 700; }
.modal-close {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 1rem; padding: 6px; transition: all var(--transition); border-radius: 8px;
}
.modal-close:hover { color: var(--text-main); background: rgba(255,255,255,.06); }
.modal-body { padding: 28px; }
.modal-footer { padding: 18px 28px; border-top: 1px solid var(--border-glass); display: flex; justify-content: flex-end; gap: 12px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; font-weight: 700; }
.detail-value { font-size: .925rem; font-weight: 500; color: var(--text-main); }
.detail-item.full { grid-column: 1 / -1; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 12px; padding: 14px 20px;
    background: rgba(7,14,32,.98); backdrop-filter: blur(18px);
    border: 1px solid var(--border-glass); border-radius: var(--radius-sm);
    font-size: .875rem; animation: toastIn .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 8px 36px rgba(0,0,0,.55); min-width: 260px;
    transition: opacity .3s, transform .3s;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.success i { color: var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.error i { color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: translateX(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .mobile-header { display: flex; }
    .main-content { margin-left: 0; padding: 80px 16px 40px; }
    .form-grid { grid-template-columns: 1fr; }
    .steps-indicator { flex-wrap: wrap; gap: 8px; padding: 16px; }
    .step-line { display: none; }
    .dashboard-charts { grid-template-columns: 1fr; }
    .list-toolbar { flex-direction: column; align-items: stretch; }
    .search-box { max-width: 100%; }
    .detail-grid { grid-column: 1 / -1; grid-template-columns: 1fr; }
}
