:root {
  --brand-900: #0e2f4f;
  --brand-700: #1f4f7a;
  --brand-600: #2a6c99;
  --brand-100: #eaf4fb;
  --ink-900: #17212b;
  --ink-700: #3b4754;
  --ink-500: #667482;
  --surface-100: #f4f8fb;
  --surface-0: #ffffff;
  --line-200: #d9e4ee;
  --accent-600: #157f6b;
  --danger-600: #b93838;
  --shadow-soft: 0 16px 40px rgba(23, 33, 43, 0.08);
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(1200px 500px at 15% -20%, #d7e9f9 0%, rgba(215, 233, 249, 0) 70%),
    radial-gradient(1000px 420px at 90% -10%, #dcefe7 0%, rgba(220, 239, 231, 0) 72%),
    var(--surface-100);
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

.app-navbar {
  background: linear-gradient(95deg, var(--brand-900), var(--brand-700));
  box-shadow: 0 6px 20px rgba(14, 47, 79, 0.35);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .navbar-text {
  color: #f1f6fc;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
  color: #ffffff;
}

.brand-app {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.88;
  display: block;
  line-height: 1.05;
}

.brand-institution {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  display: block;
  line-height: 1.1;
}

.institution-banner {
  background: linear-gradient(110deg, #f2f8ff, #ecf8f2);
  border: 1px solid #d6e7f6;
  color: #0f3150;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  margin-bottom: 0.9rem;
}

.institution-banner .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4c677d;
}

.institution-banner .name {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.page-heading-sm {
  font-size: 1.65rem;
}

.app-shell {
  padding-top: 1.4rem;
  padding-bottom: 2.8rem;
}

.page-card,
.card {
  border: 1px solid var(--line-200);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.card-header {
  border-bottom: 1px solid var(--line-200);
}

.section-title {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--ink-500);
  font-size: 0.95rem;
}

.hero-panel {
  background: linear-gradient(130deg, var(--brand-900), var(--brand-600));
  color: #fff;
  border: none;
}

.quick-tile {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line-200);
  border-radius: 12px;
  padding: 0.95rem 0.8rem;
  text-align: center;
  color: var(--ink-900);
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(23, 33, 43, 0.09);
  color: var(--ink-900);
}

.quick-tile .label {
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-primary {
  background-color: var(--brand-700);
  border-color: var(--brand-700);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-900);
  border-color: var(--brand-900);
}

.btn-success {
  background-color: var(--accent-600);
  border-color: var(--accent-600);
}

.btn-outline-danger {
  color: var(--danger-600);
  border-color: var(--danger-600);
}

.form-control,
.form-select,
textarea {
  border-radius: 10px;
  border-color: #c8d6e3;
  padding: 0.62rem 0.78rem;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 0.18rem rgba(42, 108, 153, 0.18);
}

table.table {
  margin-bottom: 0;
}

table.table thead th {
  font-weight: 600;
  background: #edf3f8;
  color: var(--ink-700);
}

.auth-shell {
  min-height: calc(100vh - 110px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: 100%;
  max-width: 520px;
}

.auth-header {
  background: linear-gradient(130deg, var(--brand-900), var(--brand-600));
  color: #fff;
  border-radius: 14px 14px 0 0;
}

.attendance-grid th,
.attendance-grid td {
  vertical-align: middle;
  min-width: 130px;
}

.attendance-grid td:first-child,
.attendance-grid th:first-child {
  min-width: 200px;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
}

.btn-check:checked + .btn-outline-success {
  background-color: #198754;
  color: #fff;
}

.btn-check:checked + .btn-outline-danger {
  background-color: #dc3545;
  color: #fff;
}

@media (max-width: 768px) {
  .app-shell {
    padding-top: 1rem;
  }

  .quick-tile {
    padding: 0.75rem;
  }
}

.clock-widget {
  background: linear-gradient(145deg, #0d1f33, #123a5b);
  color: #e8f4ff;
  border-radius: 12px;
  padding: 0.9rem;
}

.clock-time {
  font-family: "IBM Plex Sans", monospace;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.clock-date {
  font-size: 0.92rem;
  color: #b5d4ed;
}

.weather-widget {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #eef7ff;
  border: 1px solid #d5e8f8;
}

.weather-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.weather-controls {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.weather-controls .form-control {
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
}

.cloud-float {
  animation: cloudFloat 3.5s ease-in-out infinite;
}

@keyframes cloudFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}
