/* users/assets/css/users.css */

/* ============ Base page shell ============ */
.users-shell {
  min-height: 100vh;
  padding: 28px 18px 44px;
}

/* Centering helper used on login */
.users-center {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 28px - 44px);
}

/* ============ Login / small card ============ */
.users-card {
  width: min(520px, 100%);
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(20, 22, 33, 0.10);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(20, 22, 33, 0.10);
  padding: 22px;
}

.users-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.users-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.users-brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
}

.users-title h1 {
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 22px;
  margin: 0;
  line-height: 1.15;
}

.users-title p {
  margin: 4px 0 0;
  opacity: 0.7;
  font-size: 14px;
}

/* ============ Forms ============ */
.form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.field { display: grid; gap: 6px; }

label { font-size: 13px; opacity: 0.8; }

input, select, textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(20, 22, 33, 0.14);
  background: rgba(246, 247, 251, 0.6);
  outline: none;
  font: inherit;
}

textarea { min-height: 92px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: rgba(20, 22, 33, 0.30);
}

.users-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Status */
.status { margin-top: 10px; font-size: 13px; opacity: 0.85; }
.status[data-kind="error"] { opacity: 1; color: #b42318; }
.status[data-kind="ok"] { opacity: 1; color: #027a48; }

/* Footer meta */
.users-meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  opacity: 0.75;
  flex-wrap: wrap;
}
.users-meta a { color: inherit; opacity: 0.9; }

/* ============ Dashboard Layout ============ */
.dash-wrap { width: min(1180px, 100%); margin-inline: auto; }

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(20, 22, 33, 0.10);
  background: rgba(255,255,255,0.75);
  box-shadow: 0 18px 60px rgba(20,22,33,0.06);
  backdrop-filter: blur(10px);
}

.dash-left { display: flex; align-items: center; gap: 12px; }

.dash-logo {
  width: 38px; height: 38px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(20,22,33,0.10);
  background: rgba(246,247,251,0.7);
}

.dash-title { display: grid; gap: 2px; }
.dash-title strong {
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
}
.dash-title span { font-size: 13px; opacity: 0.75; }

.dash-actions { display: flex; align-items: center; gap: 10px; }

/* Buttons for dashboards */
.btn-lite {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(20, 22, 33, 0.08);
  color: #141621;
}

.btn-dark {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: #141621;
  color: #fff;
}

/* cards */
.card {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(20, 22, 33, 0.10);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 18px 60px rgba(20,22,33,0.06);
  backdrop-filter: blur(10px);
  margin-top: 14px;
}

.card h2 {
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  margin: 0 0 8px;
}

/* lists */
.list { display: grid; gap: 10px; margin-top: 10px; }

.item {
  border-radius: 14px;
  border: 1px solid rgba(20, 22, 33, 0.10);
  background: rgba(246,247,251,0.55);
  padding: 12px;
  display: grid;
  gap: 4px;
}
.item strong { font-size: 14px; }

.item .meta {
  font-size: 12.5px;
  opacity: 0.75;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.item a { color: inherit; text-decoration: underline; }

/* 2-col form rows */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

/* ============ Calendar ============ */
.cal { margin-top: 10px; }

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cal-head strong {
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.cal-controls { display: flex; gap: 8px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-dow {
  font-size: 11.5px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cal-cell {
  border-radius: 14px;
  border: 1px solid rgba(20, 22, 33, 0.10);
  background: rgba(246,247,251,0.55);
  padding: 10px;
  min-height: 76px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.cal-cell.dim { opacity: 0.45; }

.cal-date { font-weight: 900; font-size: 12.5px; opacity: 0.9; }

.cal-pill {
  font-size: 11.5px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(20,22,33,0.12);
  background: rgba(255,255,255,0.7);
  line-height: 1.15;
}

/* ============ Bottom footer nav ============ */
.dash-footer {
  position: sticky;
  bottom: 16px;
  margin-top: 16px;
}

.footer-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(20,22,33,0.10);
  background: rgba(255,255,255,0.75);
  box-shadow: 0 18px 60px rgba(20,22,33,0.06);
  backdrop-filter: blur(10px);
}

.footer-chip {
  border: 1px solid rgba(20,22,33,0.12);
  background: rgba(246,247,251,0.55);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.footer-chip:hover {
  background: rgba(255,255,255,0.9);
}

.footer-chip.is-active {
  background: rgba(255,255,255,0.95);
  border-color: rgba(20,22,33,0.22);
  box-shadow: 0 10px 24px rgba(20,22,33,0.08);
}

/* =========================================
   Dashboard polish (Admin + Student)
   ========================================= */

/* Make header feel more premium + sticky */
.dash-topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
}

.dash-topbar--elevated{
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 60px rgba(20,22,33,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Title row + badge */
.dash-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  line-height:1.1;
}

.role-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.2px;
  border:1px solid rgba(20,22,33,.12);
  background: rgba(246,247,251,0.65);
}

.dash-subline{
  margin-top:4px;
  opacity:.75;
  font-size:13px;
}

/* Hero overview block */
.dash-hero{
  margin: 14px 0 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(20,22,33, 0.10);
  background: rgba(255,255,255,0.70);
  box-shadow: 0 18px 60px rgba(20,22,33,0.06);
  backdrop-filter: blur(10px);
}

.dash-hero-grid{
  display:grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}

.hero-card{
  border-radius:16px;
  border:1px solid rgba(20,22,33,0.10);
  background: rgba(246,247,251,0.55);
  padding: 14px;
}

.hero-title{
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0 0 6px;
  font-size: 14px;
  opacity: .95;
}

/* KPI tiles */
.hero-kpis{
  display:grid;
  gap: 10px;
}

.hero-kpis.kpis-3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-kpis.kpis-2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi{
  border-radius: 14px;
  border:1px solid rgba(20,22,33,0.10);
  background: rgba(255,255,255,0.70);
  padding: 12px;
  min-height: 62px;
}

.kpi .label{
  font-size: 12px;
  opacity: .75;
  margin-bottom: 4px;
}

.kpi .value{
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi .hint{
  margin-top: 4px;
  font-size: 12px;
  opacity: .70;
}

/* Section header row inside cards */
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2{
  margin: 0;
}

.section-note{
  font-size: 12px;
  opacity: .75;
  margin: 0;
  text-align:right;
  max-width: 380px;
}

/* Slightly more elegant cards (keeps your base look) */
.card{
  border-radius: 18px;
}

/* Responsive */
@media (max-width: 860px){
  .dash-hero-grid{ grid-template-columns: 1fr; }
  .hero-kpis.kpis-3{ grid-template-columns: 1fr; }
  .hero-kpis.kpis-2{ grid-template-columns: 1fr; }
  .section-note{ text-align:left; max-width:none; }
}

/* =========================================
   Management alignment polish (Admin)
   ========================================= */

/* Makes the two management cards feel equally balanced and aligns buttons */
.mgmt-card{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
}

.mgmt-actions{
  margin-top: auto;
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

/* Slightly tighter on very small screens */
@media (max-width: 560px){
  .btn-lite, .btn-dark{
    padding: 10px 11px;
  }
}
