:root {
  --citius-green: #315d0c;
  --citius-green-2: #4e7d1b;
  --citius-green-soft: #f3f8ef;
  --citius-border: #d9e7ca;
  --citius-gold: #c59c1c;
  --citius-bg: #f7faf5;
  --citius-text: #25351d;
}

html, body { min-height: 100%; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--citius-text); background: var(--citius-bg); }
.login-page { background: radial-gradient(circle at top left, #fff 0, #f6fbf2 45%, #eef7e7 100%); }
.citius-login-card { border: 1px solid var(--citius-border) !important; }
.brand-mark { align-items: center; justify-content: center; min-width: 110px; min-height: 52px; border: 1px solid var(--citius-border); border-radius: 14px; color: var(--citius-gold); font-weight: 700; letter-spacing: .04em; background: #fff; }
.login-logo-wrap img { max-width: 210px; max-height: 76px; object-fit: contain; }
.brand-panel { display: inline-flex; align-items: center; justify-content: center; width: 176px; height: 66px; border: 1px solid var(--citius-border); border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(49,93,12,.07); }
.brand-panel img { max-width: 156px; max-height: 56px; object-fit: contain; }
.brand-title { font-size: 1.08rem; font-weight: 800; color: var(--citius-green); }
.app-header { background: rgba(255,255,255,.94); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 100; }
.user-box { color: #34412b; }
.app-layout { min-height: calc(100vh - 83px); }
.app-sidebar { min-height: calc(100vh - 83px); background: rgba(248,252,246,.96); }
.app-main { min-height: calc(100vh - 83px); overflow: auto; }
.content-card { min-height: calc(100vh - 122px); margin: 0 12px; border: 1px solid var(--citius-border); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(49,93,12,.04); }
.sidebar-nav .section-title { font-size: .92rem; font-weight: 800; color: var(--citius-green); padding: .85rem 1rem; margin: .35rem 0; border-bottom: 1px solid var(--citius-border); cursor: pointer; border-radius: 12px; }
.sidebar-nav .section-title:hover { background: #edf6e8; }
.sidebar-nav ul.menu { list-style: none; margin: 0 0 .55rem; padding: 0; display: block; }
.sidebar-nav ul.menu:not(.show) { display: none; }
.sidebar-nav li a, .sidebar-nav li span { display: block; padding: .62rem .75rem; margin: .1rem .25rem; color: #3b4d32; text-decoration: none; border-radius: 12px; border-left: 4px solid transparent; }
.sidebar-nav li a:hover, .sidebar-nav li.active a { background: #eff7ea; border-left-color: var(--citius-green-2); color: var(--citius-green); transform: translateX(2px); }

.btn-primary { --bs-btn-bg: #1f7a3d; --bs-btn-border-color: #1f7a3d; --bs-btn-hover-bg: #186633; --bs-btn-hover-border-color: #186633; }
.btn-outline-primary { --bs-btn-color: #1f7a3d; --bs-btn-border-color: #1f7a3d; --bs-btn-hover-bg: #1f7a3d; --bs-btn-hover-border-color: #1f7a3d; }

#seccion, .page-title { color: var(--citius-green); font-weight: 800; font-size: 1.15rem; padding-bottom: .8rem; margin-bottom: 1rem; border-bottom: 1px solid var(--citius-border); }
#panel, #texto { width: 100%; }
#texto { overflow: visible !important; }

.table-citius, #texto table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.table-citius thead th, #texto table th { background: #f3f8ef; color: #163907; font-weight: 800; border-bottom: 1px solid var(--citius-border); padding: .75rem .65rem; vertical-align: middle; }
.table-citius tbody td, #texto table td { padding: .7rem .65rem; border-bottom: 1px solid #edf2e8; vertical-align: middle; }
.table-citius tbody tr:hover, #texto table tr:hover td { background: #fbfdf9; }
.table-citius .text-end, #texto table .text-end { text-align: right; }

.acta-page .summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat-card { border: 1px solid var(--citius-border); border-radius: 14px; background: #fbfdf9; padding: .8rem .9rem; }
.stat-card .label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #64745b; font-weight: 800; }
.stat-card .value { display: block; font-size: 1.3rem; font-weight: 900; color: var(--citius-green); line-height: 1.1; }
.acta-alert { border: 1px solid #f0dd99; background: #fffdf4; color: #604500; border-radius: 14px; padding: .9rem 1rem; }
.acta-status { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.acta-status.open { background: #eaf8ee; color: #0d6d2d; border: 1px solid #c9ebd2; }
.acta-status.closed { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.acta-status.manual { background: #fff5d6; color: #745100; border: 1px solid #efd48a; }
.badge-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; padding: .32rem .55rem; border-radius: 999px; font-weight: 800; font-size: .78rem; }
.badge-grade.ok { background: #dcfce7; color: #166534; }
.badge-grade.ko { background: #fee2e2; color: #991b1b; }
.badge-grade.np { background: #ffedd5; color: #9a3412; }
.badge-grade.pending { background: #f3f4f6; color: #4b5563; }

.acta-form-table input[type="number"], .acta-form-table input[type="text"] { max-width: 92px; text-align: center; }
.acta-form-table input.form-control-sm { min-height: 34px; }
.acta-form-table .hours-cell { white-space: nowrap; }
.acta-save-state { min-width: 104px; display: inline-block; font-size: .78rem; }

.ui-dialog { border: 0 !important; border-radius: 16px !important; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.22) !important; z-index: 2000 !important; }
.ui-widget-overlay { background: rgba(19,31,15,.45) !important; opacity: 1 !important; z-index: 1990 !important; }
.ui-dialog .ui-dialog-titlebar { background: var(--citius-green); color: #fff; border: 0; padding: .8rem 1rem; }
.ui-dialog .ui-dialog-title { font-weight: 800; }
.ui-dialog .ui-dialog-titlebar-close { border-radius: 999px; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.16); right: .8rem; top: 50%; transform: translateY(-50%); }
.ui-dialog .ui-dialog-titlebar-close:after { content: '×'; color: #fff; font-size: 20px; line-height: 16px; position: absolute; left: 6px; top: 0; }
.ui-dialog .ui-dialog-buttonpane button { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid #cbd5c0; border-radius: 10px; background: #fff; padding: .45rem .8rem; color: #25351d; }
.ui-dialog .ui-dialog-buttonpane button:hover { background: #f3f8ef; }

.legacy-note { color: #607056; font-size: .82rem; }
.loading-box { width: 280px; text-align: left; padding: 18px; margin: 40px auto; background: white; border: 1px solid var(--citius-border); border-radius: 14px; box-shadow: 0 8px 24px rgba(49,93,12,.08); }

@media (max-width: 991.98px) {
  .brand-panel { width: 142px; height: 56px; }
  .brand-panel img { max-width: 125px; max-height: 46px; }
  .brand-title { font-size: 1rem; }
  .content-card { margin: 0; min-height: calc(100vh - 112px); border-radius: 14px; }
  .acta-page .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .user-box { display: none; }
  .acta-page .summary-grid { grid-template-columns: 1fr; }
  .table-responsive { font-size: .86rem; }
}
