/* public/assets/css/rims.css
   RADIO ISANGANO MANAGEMENT SYSTEM
   Theme: strict black & white — no colour badges, no tints
   -------------------------------------------------------- */

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

:root {
  --black:        #000000;
  --white:        #ffffff;
  --border:       rgba(0,0,0,0.15);
  --border-mid:   rgba(0,0,0,0.30);
  --border-strong:rgba(0,0,0,0.60);
  --hover-bg:     rgba(0,0,0,0.04);
  --active-bg:    rgba(0,0,0,0.08);
  --stripe:       rgba(0,0,0,0.025);
  --radius:       6px;
  --radius-lg:    10px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --mono:         'JetBrains Mono', 'Courier New', monospace;
  --sidebar-w:    240px;
  --topbar-h:     56px;
}

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
  font-family:    var(--font);
  color:          var(--black);
  background:     var(--white);
  line-height:    1.6;
  min-height:     100vh;
}

/* ── TYPOGRAPHY ── */
h1 { font-size: 1.5rem;  font-weight: 600; line-height: 1.25; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.05rem; font-weight: 600; }
h4 { font-size: .95rem;  font-weight: 600; }
p  { line-height: 1.7; }
small { font-size: .8rem; }
code  { font-family: var(--mono); font-size: .85em; background: var(--stripe); padding: 1px 4px; border-radius: 3px; }

/* ── LINKS ── */
a { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }
a:hover { opacity: .65; }

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

/* SIDEBAR */
.sidebar {
  width:       var(--sidebar-w);
  border-right: 1px solid var(--border);
  display:     flex;
  flex-direction: column;
  flex-shrink: 0;
  position:    sticky;
  top:         0;
  height:      100vh;
  overflow-y:  auto;
}

.sidebar-brand {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sidebar-brand img {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
}
.sidebar-brand-text { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.sidebar-brand-sub  { font-size: .72rem; opacity: .55; }

.nav-section { padding: 1rem 0 .5rem; }
.nav-section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .4;
  padding: 0 1rem .35rem;
}
.nav-item {
  display:     flex;
  align-items: center;
  gap:         .6rem;
  padding:     .5rem 1rem;
  font-size:   .875rem;
  cursor:      pointer;
  border-radius: 0;
  text-decoration: none;
  color:       var(--black);
  border-left: 2px solid transparent;
  transition:  background .12s, border-color .12s;
}
.nav-item:hover { background: var(--hover-bg); }
.nav-item.active {
  background:   var(--active-bg);
  border-left-color: var(--black);
  font-weight: 600;
}
.nav-item i { font-size: 16px; flex-shrink: 0; opacity: .75; }
.nav-item.active i { opacity: 1; }

/* MAIN AREA */
.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height:       var(--topbar-h);
  border-bottom: 1px solid var(--border);
  display:      flex;
  align-items:  center;
  justify-content: space-between;
  padding:      0 1.5rem;
  gap:          1rem;
  position:     sticky;
  top:          0;
  background:   var(--white);
  z-index:      10;
}
.topbar-title { font-weight: 600; font-size: 1rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-user  { font-size: .8rem; opacity: .6; }

.page-content { padding: 1.5rem; flex: 1; }

/* ── CARDS ── */
.card {
  border:       1px solid var(--border);
  border-radius: var(--radius-lg);
  background:   var(--white);
  overflow:     hidden;
}
.card-header {
  padding:      1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display:      flex;
  align-items:  center;
  justify-content: space-between;
  gap:          1rem;
}
.card-body   { padding: 1.25rem; }
.card-footer {
  padding:      .875rem 1.25rem;
  border-top:   1px solid var(--border);
  background:   var(--stripe);
}

/* ── FORMS ── */
.form-group  { margin-bottom: 1rem; }
.form-label  { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .35rem; }
.form-label .req { color: var(--black); }

.form-control {
  display:      block;
  width:        100%;
  padding:      .5rem .75rem;
  font-size:    .875rem;
  font-family:  var(--font);
  color:        var(--black);
  background:   var(--white);
  border:       1px solid var(--border-mid);
  border-radius: var(--radius);
  outline:      none;
  transition:   border-color .15s;
  line-height:  1.5;
}
.form-control:focus { border-color: var(--black); }
.form-control:disabled { background: var(--stripe); opacity: .65; cursor: not-allowed; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint { font-size: .75rem; opacity: .55; margin-top: .25rem; }
.form-error { font-size: .75rem; color: var(--black); margin-top: .25rem; font-weight: 600; }

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }

/* ── BUTTONS ── */
.btn {
  display:      inline-flex;
  align-items:  center;
  gap:          .4rem;
  padding:      .45rem 1rem;
  font-size:    .85rem;
  font-family:  var(--font);
  font-weight:  600;
  cursor:       pointer;
  border-radius: var(--radius);
  border:       1.5px solid var(--black);
  background:   var(--white);
  color:        var(--black);
  text-decoration: none;
  transition:   background .12s, opacity .12s;
  white-space:  nowrap;
  line-height:  1;
}
.btn:hover    { background: var(--hover-bg); }
.btn:active   { background: var(--active-bg); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn i        { font-size: 15px; }

.btn-primary  { background: var(--black); color: var(--white); }
.btn-primary:hover { background: #222; }

.btn-sm  { padding: .3rem .7rem; font-size: .78rem; }
.btn-lg  { padding: .6rem 1.3rem; font-size: .95rem; }
.btn-icon { padding: .4rem; border-radius: var(--radius); }

.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ── TABLES ── */
.table-wrap  { overflow-x: auto; }
table.tbl {
  width:           100%;
  border-collapse: collapse;
  font-size:       .85rem;
}
table.tbl thead th {
  text-align:    left;
  font-size:     .75rem;
  font-weight:   700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding:       .6rem .75rem;
  border-bottom: 2px solid var(--black);
  white-space:   nowrap;
}
table.tbl tbody td {
  padding:    .55rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.tbl tbody tr:nth-child(even) { background: var(--stripe); }
table.tbl tbody tr:hover           { background: var(--hover-bg); }
table.tbl tbody tr:last-child td   { border-bottom: none; }

/* ── STATUS PILLS (text-only, no colour) ── */
.status-pill {
  display:      inline-block;
  padding:      .15rem .55rem;
  font-size:    .72rem;
  font-weight:  700;
  letter-spacing: .03em;
  text-transform: uppercase;
  border:       1.5px solid var(--black);
  border-radius: 30px;
}
.status-pill.active     { border-style: solid; }
.status-pill.inactive   { opacity: .45; border-style: dashed; }
.status-pill.pending    { border-style: dotted; }

/* ── BADGES ── */
.badge {
  display:     inline-block;
  padding:     .1rem .45rem;
  font-size:   .7rem;
  font-weight: 700;
  border-radius: 4px;
  border:      1px solid var(--border-strong);
}

/* ── ALERTS ── */
.alert {
  padding:      .75rem 1rem;
  border-radius: var(--radius);
  font-size:    .875rem;
  border:       1.5px solid var(--black);
  margin-bottom: 1rem;
}

/* ── MODAL ── */
.modal-backdrop {
  display:    flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  background: rgba(0,0,0,0.45);
  padding:    2rem 1rem;
}
.modal {
  background:    var(--white);
  border:        1.5px solid var(--black);
  border-radius: var(--radius-lg);
  width:         100%;
  max-width:     600px;
}
.modal-header {
  padding:       1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display:       flex;
  align-items:   center;
  justify-content: space-between;
}
.modal-body   { padding: 1.25rem; }
.modal-footer {
  padding:    .875rem 1.25rem;
  border-top: 1px solid var(--border);
  display:    flex;
  justify-content: flex-end;
  gap:        .6rem;
}

/* ── LOGIN PAGE ── */
.login-page {
  min-height:  100vh;
  display:     flex;
  align-items: center;
  justify-content: center;
  background:  var(--white);
  padding:     1rem;
}
.login-box {
  width:         100%;
  max-width:     400px;
  border:        1.5px solid var(--black);
  border-radius: var(--radius-lg);
  overflow:      hidden;
}
.login-header {
  padding:       2rem 2rem 1.5rem;
  text-align:    center;
  border-bottom: 1px solid var(--border);
}
.login-header img {
  width:  64px; height: 64px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: .75rem;
}
.login-header h1 { font-size: 1.25rem; }
.login-header p  { font-size: .82rem; opacity: .55; margin-top: .25rem; }
.login-form  { padding: 1.75rem 2rem; }
.login-form .form-group { margin-bottom: 1.1rem; }
.login-error {
  padding:       .65rem .875rem;
  border:        1.5px solid var(--black);
  border-radius: var(--radius);
  font-size:     .82rem;
  font-weight:   500;
  margin-bottom: 1rem;
  display:       none;
}
.login-footer {
  padding:    .875rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size:  .72rem;
  opacity:    .4;
}

/* ── FUNCTION ASSIGNMENT GRID ── */
.func-module { margin-bottom: 1.25rem; }
.func-module-title {
  font-size:   .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding:     .4rem 0;
  border-bottom: 1.5px solid var(--black);
  margin-bottom: .6rem;
}
.func-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap:                   .4rem;
}
.func-item {
  display:     flex;
  align-items: flex-start;
  gap:         .5rem;
  padding:     .4rem .5rem;
  border:      1px solid var(--border);
  border-radius: var(--radius);
  cursor:      pointer;
  transition:  background .1s, border-color .1s;
  font-size:   .8rem;
}
.func-item:hover              { background: var(--hover-bg); border-color: var(--border-mid); }
.func-item.selected           { background: var(--active-bg); border-color: var(--black); font-weight: 600; }
.func-item input[type=checkbox] { margin-top: 2px; accent-color: var(--black); flex-shrink: 0; }
.func-item-name   { font-weight: 500; }
.func-item-code   { font-family: var(--mono); font-size: .7rem; opacity: .5; }

/* ── UTILITIES ── */
.d-flex  { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1   { gap: .5rem; }
.gap-2   { gap: 1rem; }
.mb-1    { margin-bottom: .5rem; }
.mb-2    { margin-bottom: 1rem; }
.mb-3    { margin-bottom: 1.5rem; }
.mt-1    { margin-top: .5rem; }
.mt-2    { margin-top: 1rem; }
.text-muted   { opacity: .55; }
.text-small   { font-size: .8rem; }
.text-mono    { font-family: var(--mono); }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.fw-bold      { font-weight: 700; }
.w-100        { width: 100%; }
.hidden       { display: none !important; }

/* ── SPINNER ── */
.spinner {
  width:  20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.open {
    display: flex;
    position: fixed;
    z-index:  100;
    top: 0; left: 0; bottom: 0;
  }
  .form-row { flex-direction: column; }
}
