/* Tactical / Cobre: shared visual system for all existing panel workflows. */
:root {
  --dark-bg:#121210; --surface:#1b1b18; --surface-raised:#22221e;
  --line:#383830; --copper:#f3934e; --copper-soft:#38271d;
  --text-gray:#aaa99f; --cyan:var(--copper); --gold:#e5b56d;
  --developer-blue:#e8ba8f; --history-blue:#aaaec0; --audit-purple:#c7ab91;
  --primary-neon:#8ecf9a; --accent-red:#f17f79; color-scheme:dark;
}
body { font-family:'Inter',Arial,sans-serif; background-color:var(--dark-bg); color:#f3f0e8; line-height:1.55; }
body.tactical-theme * { text-shadow:none !important; }
body.tactical-theme :is(button,a,input,select,textarea) { transition:background-color .16s,border-color .16s,color .16s; }
body.tactical-theme :is(h1,h2,h3,h4,.top-title,.cosmic-title,.logo-text h1,.kpi-value) {
  font-family:'Rajdhani','Arial Narrow',Arial,sans-serif !important; letter-spacing:.025em;
}
body.tactical-theme :is(h2,h3,h4) { line-height:1.2; }
body.tactical-theme :is(button,input,select,textarea,label,th,.side-link) { font-family:'Inter',Arial,sans-serif !important; }
body.tactical-theme :is(.space-backdrop,.complex-color,.constellation-glyphs,.star-field) { display:none; }
body.tactical-theme :is(.rgb-flow,.deep-breath,.active-color-shifting,.animate-fade-up,.enhanced-vibrancy,.badge-anim-hover) { animation:none !important; filter:none !important; }
body.tactical-theme :is(.btn-action,.btn-liquid-launch,.cosmic-login-card,.glass-panel)::before,
body.tactical-theme :is(.btn-action,.btn-liquid-launch,.cosmic-login-card,.glass-panel)::after { display:none !important; }
body.tactical-theme [style*="box-shadow"] { box-shadow:none !important; }
body.tactical-theme [style*="font-family"] { font-family:inherit !important; }
body.tactical-theme :focus-visible { outline:2px solid #ffb67e !important; outline-offset:4px; }
::selection { background:#7c4626; color:#fff; }
::-webkit-scrollbar-track { background:#151512; }
::-webkit-scrollbar-thumb { background:#4b4b41; border-radius:2px; }

/* Public page: a quiet city backdrop with the login and public register. */
.cosmic-gamer-theme { padding:56px 28px; background:#121210; }
.cosmic-viewport { max-width:1400px; display:grid; grid-template-columns:minmax(0,1fr) 400px; gap:32px; align-items:start; }
.cosmic-header { grid-column:1; text-align:left; padding:48px 36px; min-height:328px; border:1px solid var(--line); border-left:3px solid var(--copper); background:linear-gradient(90deg,#151512 12%,#151512a6 70%),url('../assets/tactical-city.svg') center/cover; }
.cosmic-header::before { content:'COMUNIDAD / DISCIPLINA / JUEGO LIMPIO'; display:block; color:var(--copper); font-size:11px; font-weight:700; letter-spacing:.18em; margin-bottom:22px; }
.cosmic-title { font-size:clamp(28px,3vw,46px); color:#f3f0e8 !important; background:none !important; -webkit-text-fill-color:currentColor !important; }
.cosmic-title span { color:var(--copper); }
.deep-breath { font-size:24px; color:#d7d3c9; margin-top:12px; }
.breathing-description { color:#b9b5a9; margin:16px 0 24px; max-width:520px; font-size:14px; }
.cosmic-status-panel { justify-content:flex-start; gap:10px; flex-wrap:wrap; }
.status-indicator { background:#1d1d18; color:#c2beb3; border:1px solid var(--line); padding:7px 10px; border-radius:3px; }
.pulse-dot { box-shadow:none !important; }
.cosmic-login-card { grid-column:2; grid-row:1; max-width:none; margin:0; padding:28px; border:1px solid var(--line); border-top:3px solid var(--copper); border-radius:4px; background:#1b1b18; box-shadow:none; }
.cosmic-emblem-wrapper { position:static; transform:none; width:42px; height:42px; border:1px solid #775035; border-radius:3px; background:#302219; box-shadow:none; margin-bottom:20px; }
.cosmic-emblem { color:var(--copper); font-family:'Rajdhani',sans-serif; }
.cosmic-card-header { text-align:left; margin:0 0 20px; }
.cosmic-card-header h3 { font-size:15px; color:var(--text-gray); }
.cosmic-card-header p { font-family:'Rajdhani',sans-serif; font-size:28px; }
.cosmic-form { gap:16px; }
.cosmic-card-footer { border-top:1px solid var(--line); margin-top:18px; padding-top:16px; text-align:left; }
.cosmic-card-footer a { color:#c2beb3; font-size:13px; cursor:pointer; }
.cosmic-viewport > section { grid-column:1/-1; width:100%; max-width:none; }
#maintenanceBanner { grid-column:1/-1; grid-row:auto; max-width:none !important; border-radius:4px !important; }
.cosmic-public-panel { background:var(--surface); border:1px solid var(--line); border-radius:4px; }

/* Main navigation and operational banner. */
.dashboard-root { height:100dvh; background:#121210e8; }
.side-nav { width:240px; min-width:240px; height:100dvh; background:#171714; backdrop-filter:none; border-right:1px solid var(--line); }
.side-logo { padding:26px 20px; gap:12px; min-height:92px; }
.v-emblem-small { border:1px solid #795538; border-radius:3px; background:var(--copper-soft); color:var(--copper); box-shadow:none; }
.logo-text h1 { font-size:20px; }
.logo-text > span { font-size:10px; letter-spacing:.14em; }
.side-menu { padding:22px 12px; gap:4px; }
.sidebar-menu-gamer { display:flex; flex-direction:column; gap:4px; }
.side-link { font-size:12px; font-weight:600; text-transform:none; padding:14px 12px; min-height:46px; border-left:2px solid transparent; gap:12px; border-radius:0 3px 3px 0; color:#afaea3; letter-spacing:.015em; justify-content:flex-start; }
.side-link i { font-size:15px; }
.side-link:hover { background:#24241f; color:#fff; }
.side-link.active { background:linear-gradient(90deg,#35261b,#201d17); border-left-color:var(--copper); color:var(--copper); }
.side-footer { padding:14px; }
.user-badge-container { background:#20201b; border:1px solid var(--line); border-radius:4px; padding:12px 8px; }
.user-badge-container:hover { box-shadow:none; }
.user-avatar { width:34px; height:34px; border:1px solid #795538; }
.user-info-text .role { font-family:inherit; font-size:10px; letter-spacing:.08em; }
.profile-menu-content { background:#24241f; border:1px solid #795538; border-radius:4px; box-shadow:0 16px 40px #0008; }
.profile-menu-content button:hover { background:var(--copper-soft); }
.dashboard-main { min-width:0; height:100dvh; }
.top-bar.glass-panel { background:#171714f5; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:18px 28px; margin:0; box-shadow:none; min-height:80px; }
.top-title { font-size:23px; }
.top-bar-right { width:min(420px,45%); }
.tactical-banner { position:relative; isolation:isolate; margin:24px 28px; padding:30px; min-height:170px; border:1px solid var(--line); border-left:3px solid var(--copper); overflow:hidden; background:#191813 url('../assets/tactical-city.svg') right center/auto 100% no-repeat; }
.tactical-banner::before { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#191813 10%,#191813ef 35%,#19181320); }
.tactical-eyebrow { color:var(--copper); font-size:10px; font-weight:700; letter-spacing:.2em; text-transform:uppercase; }
.tactical-banner h1 { margin:8px 0; font-size:clamp(30px,3vw,44px); line-height:1; max-width:650px; }
.tactical-banner p { font-size:13px; color:#c1bcaf; max-width:480px; }
.content-grid { grid-template-columns:360px minmax(0,1fr); gap:20px; padding:0 28px 28px; }
.content-full { padding:0 28px 28px; }
.tables-col { gap:20px; }
.glass-panel,.modal-content,.sub-panel,.chart-container,.kpi-card,.det-box,.fama-card,.podio-box { background:var(--surface) !important; border:1px solid var(--line) !important; border-radius:4px !important; box-shadow:none !important; backdrop-filter:none; }
.glass-panel { padding:22px; }
.side-nav.glass-panel { padding:0; border:0 !important; border-right:1px solid var(--line) !important; border-radius:0 !important; background:#171714 !important; margin:0 !important; }
.cosmic-table-card { background:var(--surface); border:1px solid var(--line); border-radius:4px; padding:24px; box-shadow:none; backdrop-filter:none; }
.cosmic-table-header { padding-bottom:18px; margin-bottom:18px; border-bottom:1px solid var(--line); }
.cosmic-table-header h3 { color:#ede7db; font-size:24px; }
.cosmic-data-table { width:100%; border-collapse:collapse; min-width:650px; text-align:left; }
body.tactical-theme :is(h1,h2,h3,h4,p,span,label)[style*="color: #6272a4"] { color:var(--text-gray) !important; }
body.tactical-theme :is(h1,h2,h3,h4,p,span,label)[style*="color: #06b6d4"] { color:var(--copper) !important; }
body.tactical-theme :is(div,section,details)[style*="background: rgba(6,"] { background:#241f18 !important; border-color:#55432f !important; }
body.tactical-theme :is(div,section,details)[style*="background: rgba(168,"] { background:#252019 !important; border-color:#55432f !important; }
.card-header-gamer { border-bottom:1px solid var(--line); padding-bottom:16px; gap:10px; flex-wrap:wrap; }
.card-header-gamer h3 { font-size:22px !important; letter-spacing:.025em; color:#f3f0e8 !important; }
.card-header-gamer > i { color:var(--copper) !important; }
.sub-panel { padding:18px; background:#181815 !important; }
.kpi-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.kpi-card { text-align:left; padding:22px; border-top:2px solid #795538 !important; }
.kpi-card:hover,.fama-card:hover { transform:none; }
.kpi-title { font-size:11px; color:#b8b4a9; }
.kpi-value { font-size:44px; color:#f3f0e8; line-height:1.15; font-variant-numeric:tabular-nums; }
.kpi-desc { color:var(--text-gray); font-size:12px; }
.chart-container h4 { text-align:left; font-size:19px; color:#e8e1d4; }
.chart-grid-perfect { gap:18px; }

/* Form controls and action hierarchy. Inline layout sizes remain intact. */
body.tactical-theme :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {
  color:#eeeae1 !important; background:#131310 !important; border:1px solid #48483d !important;
  border-radius:3px !important; font-size:14px !important; box-shadow:none !important; min-height:40px; padding:10px 12px;
}
body.tactical-theme :is(input,select,textarea):focus { border-color:var(--copper) !important; }
body.tactical-theme input::placeholder,body.tactical-theme textarea::placeholder { color:#918f82; opacity:1; }
body.tactical-theme :is(input[type=checkbox],input[type=radio]) { accent-color:var(--copper) !important; }
body.tactical-theme input[type=file]::file-selector-button { background:#33291f; border:1px solid #795538; color:#f4d5b8; border-radius:3px; padding:6px 10px; margin-right:12px; }
.form-group label,.cosmic-input-wrapper label { color:#b8b4a9; font-weight:500; font-size:12px; text-transform:none; }
.form-group { margin-bottom:18px; }
.cosmic-search-wrapper input,#searchDirectorioInput { padding-left:42px !important; }
.cosmic-search-results { background:#24241f; border-color:#795538; border-radius:4px; }
body.tactical-theme :is(.btn-action,.btn-outline-white,.btn-liquid-launch,.btn-hero-red) {
  background:#292921 !important; border:1px solid #555345 !important; color:#ede9df !important; border-radius:3px !important;
  font-size:12px !important; font-weight:600; text-transform:none; letter-spacing:.01em; padding:10px 15px; min-height:40px; box-shadow:none !important;
}
body.tactical-theme :is(.btn-action,.btn-outline-white,.btn-liquid-launch,.btn-hero-red):hover { background:#38372c !important; border-color:#8d7c61 !important; transform:none !important; }
body.tactical-theme :is(.btn-action.cyan,.btn-action.gold,.btn-liquid-launch) { background:var(--copper) !important; color:#20160e !important; border-color:var(--copper) !important; }
body.tactical-theme :is(.btn-action.cyan,.btn-action.gold,.btn-liquid-launch):hover { background:#ffac70 !important; }
body.tactical-theme :is(.btn-action.red,.btn-action.outline-red,.btn-hero-red,.btn-history-del) { background:#37201c !important; border-color:#88534a !important; color:#ffb2a6 !important; }
body.tactical-theme :is(.btn-action.red,.btn-action.outline-red,.btn-hero-red,.btn-history-del):hover { background:#542b23 !important; }
body.tactical-theme button:disabled { cursor:not-allowed; opacity:.5; }
.btn-liquid-launch { width:100%; min-height:46px !important; }
.cosmic-pw-toggle { color:var(--copper); }
body.tactical-theme .cosmic-pw-container input { width:100%; padding-right:48px; }

/* Tables: consistent type, restrained borders, readable row actions. */
.table-wrapper-internal,.table-wrapper,.table-responsive { border-radius:3px; border:1px solid var(--line); max-width:100%; }
body.tactical-theme :is(.cosmic-data-table-staff,.gamer-table) th { background:#24241e !important; color:#bcb9ac; border-bottom:1px solid #514733; font-size:11px !important; letter-spacing:.06em; padding:14px; }
body.tactical-theme :is(.cosmic-data-table-staff,.gamer-table) td { padding:14px; border-bottom:1px solid #303029; font-size:13px !important; font-variant-numeric:tabular-nums; }
body.tactical-theme .cosmic-data-table-staff td span { font-size:12px !important; }
body.tactical-theme :is(.cosmic-data-table-staff,.gamer-table) tr:hover td { background:#26251e; }
body.tactical-theme .cosmic-data-table-staff button { font-family:'Inter',sans-serif !important; font-size:11px !important; font-weight:600 !important; letter-spacing:0 !important; text-transform:none !important; background:#24241d !important; box-shadow:none !important; min-height:34px; padding:6px 10px !important; border-radius:3px !important; }
.cosmic-data-table-staff button:hover { border-color:var(--copper) !important; }
.rango-badge { box-shadow:none !important; border-radius:3px; }
.rango-progress-bg { background:#343329; border-radius:2px; }
.rango-progress-fill { background:var(--copper); border-radius:2px; }

/* Dialogs, permissions and profile controls. */
.modal-overlay { background:#000b; backdrop-filter:blur(5px); padding:20px; }
.modal-content { padding:26px !important; border-top:3px solid var(--copper) !important; max-height:90dvh; }
.modal-header { border-bottom:1px solid var(--line); padding-bottom:18px; gap:16px; }
.modal-header h2 { color:#eee7db !important; font-size:27px; }
.close-modal,.btn-close { display:inline-grid; place-items:center; flex-shrink:0; width:36px; min-height:36px; border:1px solid #4c4a3f; border-radius:3px; color:#ccc4b7; background:#24241e; }
.close-modal:hover { transform:none; color:#fff; background:#383128; }
.perm-box { border-radius:4px; background:#191915 !important; border-color:var(--line) !important; }
.perm-toggle { font-size:13px; font-weight:500; gap:14px; }
.modal-hr { background:var(--line) !important; box-shadow:none !important; }
.det-label { font-size:11px; color:#aaa496; letter-spacing:.05em; }
.det-value { font-size:14px; }
.input-group-flex { flex-wrap:wrap; }
.input-group-flex > input { flex:1 1 160px; min-width:0; }
#notification { background:#26251d; color:#eee7da; border:1px solid #6c5139; border-left:3px solid var(--copper); border-radius:4px; box-shadow:0 12px 30px #0007; max-width:calc(100vw - 32px); }
#notifTitle { color:var(--copper); font-size:12px; letter-spacing:.06em; }

@media(min-width:1500px) { .content-grid { grid-template-columns:390px minmax(0,1fr); } }
@media(max-width:1200px) {
  .side-nav { width:205px; min-width:205px; }
  .logo-text,.user-info-text { display:flex; }
  .content-grid { grid-template-columns:1fr; }
  .form-internal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
  .form-internal-grid > :last-child { grid-column:1/-1; }
  .side-link { justify-content:flex-start; }
}
@media(max-width:900px) {
  .cosmic-viewport { grid-template-columns:1fr; max-width:720px; }
  .cosmic-header { grid-column:1; min-height:250px; }
  .cosmic-login-card { grid-column:1; grid-row:auto; }
  .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .chart-grid-perfect,.actividad-sub-grid { grid-template-columns:1fr; }
}
@media(max-width:768px) {
  .dashboard-root { height:auto; min-height:100dvh; overflow:visible; }
  .side-nav { position:relative; width:100%; min-width:0; height:auto; display:grid; grid-template-columns:1fr auto; padding:0; z-index:25; }
  .side-logo { padding:14px 16px; min-height:70px; border:0; }
  .logo-text { display:flex; }
  .side-footer { display:block; padding:12px; border:0; grid-row:1; grid-column:2; }
  .user-badge-container { width:54px; padding:8px; }
  .user-info-text,.dropdown-arrow { display:none; }
  .profile-menu-content { top:100%; bottom:auto; right:12px; left:auto; width:230px; }
  .side-menu { grid-column:1/-1; display:flex; flex-direction:row; overflow-x:auto; padding:8px 12px; border-top:1px solid var(--line); gap:4px; }
  .sidebar-menu-gamer { display:contents; }
  .side-link { flex:0 0 auto; width:auto; white-space:nowrap; padding:10px 12px; min-height:40px; font-size:11px; border-left:0; border-bottom:2px solid transparent; }
  .side-link.active { border-bottom-color:var(--copper); }
  body.tactical-theme .side-link.active { background:var(--copper-soft) !important; }
  body.tactical-theme .card-header-gamer .input-group-flex { flex-wrap:wrap !important; }
  body.tactical-theme .tables-col { gap:16px !important; }
  body.tactical-theme .glass-panel { margin-bottom:0 !important; }
  body.tactical-theme .content-grid { padding-top:0 !important; gap:16px !important; }
  body.tactical-theme .side-footer { padding:12px !important; border:0 !important; }
  body.tactical-theme .profile-menu-content { position:absolute !important; top:100% !important; right:12px !important; width:230px !important; }
  .side-link i { width:14px; }
  .dashboard-main { height:auto; overflow:visible; }
  .top-bar.glass-panel { display:flex; position:relative; padding:14px 16px; min-height:64px; gap:10px; }
  .top-title { display:none; }
  .top-bar-right { width:100%; }
  .cosmic-search-wrapper { min-width:0; }
  .tactical-banner { margin:16px; padding:24px 20px; min-height:154px; }
  .tactical-banner p { max-width:260px; font-size:12px; }
  .content-grid,.content-full { padding:0 16px 24px; gap:16px; }
  .glass-panel { padding:16px; }
  .form-internal-grid { display:flex; }
  .cosmic-gamer-theme { padding:24px 16px; }
  .cosmic-header { padding:30px 24px; }
  .cosmic-login-card { padding:24px; }
  .modal-overlay { padding:8px; }
  .modal-content { padding:18px !important; width:calc(100vw - 16px) !important; margin:0; }
  .modal-header h2 { font-size:23px; }
  .det-grid { grid-template-columns:1fr; }
  .kpi-card { padding:16px; }
  .kpi-value { font-size:36px; }
  .kpi-grid { gap:10px; }
}
