/* ── Catedre Online – color system matching desktop app ── */
:root {
  --bg:        #F0F2FA;
  --surface:   #FFFFFF;
  --surface2:  #E8ECF8;
  --border:    #C8D0E8;
  --accent:    #3451C7;
  --accent-lt: #E0E7FF;
  --text:      #1A1D2E;
  --text2:     #3D4466;
  --text3:     #7A80A0;
  --green:     #0A9654;
  --green-lt:  #C8F5DC;
  --red:       #D92020;
  --red-lt:    #FFD6D6;
  --orange:    #E06000;
  --orange-lt: #FFE0A0;
  --hdr-bg:    #3451C7;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
}

/* ── Navbar / Header ── */
.navbar-catedre {
  background: var(--hdr-bg);
  min-height: 58px;
}
.navbar-brand-logo {
  width: 34px; height: 34px;
  background: #fff; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: var(--hdr-bg);
  margin-right: 8px;
}
.nav-tabs-main {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
}
.nav-tabs-main .nav-link {
  color: var(--text2);
  border: none;
  border-radius: 0;
  padding: 10px 16px;
  font-size: 13px;
}
.nav-tabs-main .nav-link:hover {
  background: var(--accent-lt);
  color: var(--accent);
}
.nav-tabs-main .nav-link.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── Cards & surfaces ── */
.card-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ── Table ── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  background: var(--hdr-bg);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 10px;
  white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
.tbl td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tbody tr:nth-child(odd)  { background: #E8EDFF; }
.tbl tbody tr:nth-child(even) { background: var(--surface); }
.tbl tbody tr:hover           { background: var(--accent-lt); }

/* ── Badges ── */
.badge-active   { background: var(--green-lt);  color: var(--green);  border:1px solid var(--green); }
.badge-inactive { background: var(--surface2);  color: var(--text3);  border:1px solid var(--border); }
.badge-unass    { background: var(--orange-lt); color: var(--orange); border:1px solid var(--orange);}
tr.unassigned   { background: var(--orange-lt) !important; }
.badge-over     { background: var(--red-lt);    color: var(--red);    border:1px solid var(--red);   }
.badge-ok       { background: var(--green-lt);  color: var(--green);  border:1px solid var(--green); }

/* ── Buttons ── */
.btn-primary-c {
  background: var(--accent); color: #fff; border: none;
  padding: 6px 14px; border-radius: 4px; font-weight: 600;
  cursor: pointer; font-size: 13px;
}
.btn-primary-c:hover { background: #2F4AC8; }
.btn-secondary-c {
  background: var(--surface2); color: var(--text2); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 4px; font-size: 13px; cursor: pointer;
}
.btn-secondary-c:hover { background: var(--border); }
.btn-danger-c {
  background: #FA5252; color: #fff; border: none;
  padding: 6px 14px; border-radius: 4px; font-weight: 600;
  font-size: 13px; cursor: pointer;
}
.btn-danger-c:hover { background: var(--red); }

/* ── Pill toggle (active/inactive class) ── */
.pill-active   { display:inline-block; padding:2px 10px; border-radius:20px;
                  font-size:12px; font-weight:700; cursor:pointer;
                  background:var(--green-lt); color:var(--green); border:1px solid var(--green);}
.pill-inactive { display:inline-block; padding:2px 10px; border-radius:20px;
                  font-size:12px; cursor:pointer;
                  background:var(--surface2); color:var(--text3); border:1px solid var(--border);}

/* ── Summary cards ── */
.stat-card {
  display:inline-flex; flex-direction:column; align-items:center;
  padding:12px 20px; border-radius:8px; border:1px solid var(--border);
  min-width:110px; margin-right:10px; margin-bottom:8px;
}
.stat-card .stat-val { font-size:24px; font-weight:700; line-height:1; }
.stat-card .stat-lbl { font-size:11px; color:var(--text2); margin-top:4px; text-align:center;}

/* ── Scrollable table wrapper ── */
.tbl-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* ── Split layout (pregătire) ── */
.split-left  { width: 300px; min-width:260px; flex-shrink:0; }
.split-right { flex: 1; min-width:0; }
.split-wrap  { display:flex; gap:16px; align-items:flex-start; }

/* ── Flash messages ── */
.flash-success { background:var(--green-lt);  color:var(--green);  border:1px solid var(--green);  padding:10px 16px; border-radius:6px; margin-bottom:12px; }
.flash-info    { background:var(--accent-lt); color:var(--accent); border:1px solid var(--accent); padding:10px 16px; border-radius:6px; margin-bottom:12px; }
.flash-danger  { background:var(--red-lt);    color:var(--red);    border:1px solid var(--red);    padding:10px 16px; border-radius:6px; margin-bottom:12px; }
.flash-warning { background:var(--orange-lt); color:var(--orange); border:1px solid var(--orange); padding:10px 16px; border-radius:6px; margin-bottom:12px; }

/* ── Norma colors ── */
.norma-over  { color:var(--red);    font-weight:700; }
.norma-under { color:var(--orange); }
.norma-ok    { color:var(--green);  font-weight:600; }

/* ── Search bar ── */
.search-bar {
  display:flex; align-items:center;
  border:1px solid var(--border); border-radius:6px;
  background:var(--surface); padding:0 10px; height:36px;
}
.search-bar input {
  border:none; outline:none; background:transparent;
  font-size:13px; width:200px; color:var(--text);
}

/* ── Modal overrides ── */
.modal-header { background:var(--accent); color:#fff; }
.modal-header .btn-close { filter: invert(1); }
