@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap");

:root {
  --bg: #dcecff;
  --bg-soft: #eef5ff;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --line: rgba(47, 102, 176, 0.18);
  --line-strong: rgba(37, 89, 166, 0.34);
  --text: #0f2950;
  --muted: #4f6f98;
  --accent: #2e7dd7;
  --accent-strong: #175bb7;
  --accent-soft: rgba(46, 125, 215, 0.16);
  --teal: #3f8be0;
  --teal-soft: rgba(63, 139, 224, 0.16);
  --gold: #8ebfff;
  --danger: #c64968;
  --success: #17738f;
  --shadow: 0 26px 70px rgba(28, 82, 156, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans Thai", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(65, 135, 230, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(32, 106, 203, 0.18), transparent 24%),
    linear-gradient(180deg, #eef6ff 0%, #dfeeff 46%, #d1e5ff 100%);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, .brand-title {
  font-family: "Sora", "Noto Sans Thai", sans-serif;
  letter-spacing: -0.03em;
}

a {
  color: var(--teal);
}

.app-page {
  padding: 32px 18px 60px;
}

.app-container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.auth-shell {
  width: min(860px, calc(100% - 32px));
  margin: 48px auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}

.auth-shell-compact {
  width: min(460px, calc(100% - 32px));
  margin: 72px auto;
}

.auth-story,
.auth-card,
.surface-card,
.table-shell,
.hero-card,
.stat-card,
.dashboard-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.auth-story {
  border-radius: 34px 34px 0 0;
  padding: 42px 42px 28px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  background:
    linear-gradient(135deg, #2d81d9 0%, #1758b1 100%);
  color: #ffffff;
  border-color: rgba(43, 105, 191, 0.22);
  box-shadow: 0 26px 70px rgba(26, 78, 150, 0.24);
}

.auth-story::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 68%);
}

.auth-badge,
.micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-strong);
  border: 1px solid rgba(56, 113, 194, 0.18);
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-title,
.page-title {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
  margin: 18px 0 12px;
}

.auth-copy,
.page-subtitle {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 54ch;
}

.auth-story .auth-copy,
.auth-story .page-subtitle,
.auth-story .feature-card,
.auth-story .feature-card span,
.auth-story .feature-card strong {
  color: rgba(255, 255, 255, 0.94);
}

.feature-grid,
.stat-grid {
  display: grid;
  gap: 16px;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 32px;
}

.feature-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 18px;
}

.auth-story .feature-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.feature-card strong,
.stat-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.auth-card {
  border-radius: 0 0 34px 34px;
  padding: 40px 42px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
  border-top: 0;
}

.auth-card-compact {
  border-radius: 34px;
  padding: 24px 24px 28px;
}

.auth-login-header {
  text-align: center;
  margin-bottom: 18px;
}

.auth-logo-wrap {
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
  padding: 6px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(235, 244, 255, 0.98), rgba(214, 230, 252, 0.94));
  border: 1px solid rgba(57, 112, 187, 0.16);
  box-shadow: 0 10px 18px rgba(24, 78, 150, 0.12);
}

.auth-college-logo {
  width: 116px !important;
  height: 116px !important;
  max-width: 116px !important;
  max-height: 116px !important;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 18px;
}

.auth-kicker {
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-login-title {
  font-family: "Sora", "Noto Sans Thai", sans-serif;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: 1.2;
  margin: 8px 0 6px;
  color: #103562;
}

.auth-login-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.auth-form-panel {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
  border: 1px solid rgba(57, 112, 187, 0.12);
}

.auth-form-heading {
  margin-bottom: 16px;
}

.auth-form-heading p {
  color: var(--muted);
  line-height: 1.65;
}

.auth-input-group .form-control {
  border-left: 0 !important;
}

.auth-input-icon {
  min-height: 50px;
  border-radius: 14px 0 0 14px !important;
  border: 1px solid var(--line-strong) !important;
  border-right: 0 !important;
  background: rgba(227, 238, 254, 0.92) !important;
  color: var(--accent-strong) !important;
  padding-inline: 16px !important;
}

.auth-submit-btn {
  min-height: 54px;
  font-size: 1rem;
  box-shadow: 0 14px 28px rgba(23, 91, 183, 0.24) !important;
}

.form-label-inline {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.app-input,
.app-select,
.app-textarea,
.app-file,
.form-control,
.form-control-file,
select.form-control {
  border-radius: 14px !important;
  border: 1px solid var(--line-strong) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  color: var(--text) !important;
  min-height: 50px;
  box-shadow: none !important;
}

.app-textarea,
textarea.form-control {
  min-height: 132px;
  padding-top: 14px;
}

.form-control:focus,
.app-input:focus,
.app-select:focus,
.app-textarea:focus {
  border-color: rgba(46, 125, 215, 0.52) !important;
  box-shadow: 0 0 0 4px rgba(46, 125, 215, 0.16) !important;
}

.btn,
.app-btn {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 12px 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  box-shadow: none !important;
}

.btn-primary,
.btn-success,
.btn-info,
.app-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important;
  color: #fff !important;
}

.btn-secondary {
  background: rgba(35, 103, 191, 0.12) !important;
  color: #1f56a2 !important;
}

.btn-danger {
  background: linear-gradient(135deg, #e56f8c, #c45472) !important;
  color: #fff !important;
}

.btn-warning {
  background: linear-gradient(135deg, #b7d7ff, #6ca5ef) !important;
  color: #113761 !important;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  width: min(1320px, calc(100% - 36px));
  margin: 24px auto 60px;
}

.app-sidebar {
  border-radius: 30px;
  padding: 22px 18px;
  align-self: start;
  position: sticky;
  top: 22px;
}

.brand-block {
  padding: 14px 14px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.brand-title {
  font-size: 1.3rem;
  margin: 0;
}

.brand-subtitle {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 0.92rem;
}

.nav-stack {
  display: grid;
  gap: 8px;
}

.nav-stack a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  transition: 0.2s ease;
}

.nav-stack a:hover,
.nav-stack a.is-active {
  background: linear-gradient(135deg, rgba(18, 72, 159, 0.2), rgba(41, 118, 213, 0.14));
  transform: translateX(3px);
}

.dashboard-main {
  display: grid;
  gap: 20px;
}

.app-topbar,
.hero-card,
.surface-card,
.table-shell,
.dashboard-panel {
  border-radius: 28px;
}

.app-topbar {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-card {
  padding: 28px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(228, 240, 255, 0.99), rgba(197, 221, 252, 0.97)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 56%);
  color: #113867;
  border-color: rgba(52, 111, 194, 0.24);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(52, 132, 228, 0.2), transparent 46%),
    linear-gradient(210deg, rgba(158, 201, 255, 0.24), transparent 50%);
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card .page-title,
.hero-card .page-subtitle,
.hero-card .section-caption,
.hero-card .micro-badge,
.hero-card .topbar-meta,
.hero-card a:not(.btn) {
  color: #113867;
}

.hero-card .page-subtitle {
  color: #486990;
}

.hero-card .micro-badge {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(72, 135, 212, 0.18);
}

.hero-actions,
.action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
  border-radius: 24px;
  padding: 20px;
  background:
    linear-gradient(155deg, rgba(234, 244, 255, 0.98), rgba(208, 228, 255, 0.96));
  color: #113867;
  border-color: rgba(69, 131, 210, 0.24);
}

.stat-label {
  color: #56759b;
  font-size: 0.92rem;
}

.stat-value {
  font-family: "Sora", "Noto Sans Thai", sans-serif;
  font-size: 2.15rem;
  margin-top: 10px;
  color: #113867;
}

.surface-card,
.table-shell {
  padding: 24px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h3,
.section-heading h4 {
  margin: 0;
}

.section-caption {
  color: var(--muted);
  margin-top: 6px;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  border-top: 0;
  border-bottom: 1px solid var(--line) !important;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table td,
.table th {
  vertical-align: middle !important;
  border-color: var(--line) !important;
  background: transparent;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.58);
}

.progress {
  height: 12px !important;
  border-radius: 999px !important;
  background: rgba(21, 89, 193, 0.13) !important;
}

.progress-bar {
  border-radius: 999px !important;
}

.alert {
  border: 0 !important;
  border-radius: 18px !important;
}

.empty-state {
  padding: 24px;
  border-radius: 20px;
  background: var(--bg-soft);
  color: var(--muted);
  text-align: center;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-list {
  display: grid;
  gap: 14px;
}

.notification-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.notification-card.tone-danger {
  border-color: rgba(198, 73, 104, 0.22);
  background: linear-gradient(135deg, rgba(255, 239, 243, 0.98), rgba(255, 248, 250, 0.96));
}

.notification-card.tone-warning {
  border-color: rgba(240, 163, 50, 0.22);
  background: linear-gradient(135deg, rgba(255, 248, 229, 0.98), rgba(255, 252, 243, 0.96));
}

.notification-card.tone-info {
  border-color: rgba(86, 165, 230, 0.2);
  background: linear-gradient(135deg, rgba(237, 246, 255, 0.98), rgba(248, 252, 255, 0.96));
}

.notification-card.tone-success {
  border-color: rgba(29, 139, 155, 0.2);
  background: linear-gradient(135deg, rgba(234, 249, 248, 0.98), rgba(246, 255, 253, 0.96));
}

.notification-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  font-size: 1.2rem;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.notification-title {
  font-weight: 700;
  font-size: 1rem;
}

.notification-project {
  font-family: "Sora", "Noto Sans Thai", sans-serif;
  font-size: 1.15rem;
  margin-top: 4px;
}

.notification-text {
  margin: 12px 0 0;
  color: var(--muted);
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.94rem;
}

.notification-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(86, 165, 230, 0.12);
  color: #2f6ca9;
  font-size: 0.9rem;
  font-weight: 600;
}

.metric-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel-strong) 0 52%, transparent 53%),
    conic-gradient(var(--teal) 0deg, var(--teal) var(--progress-angle, 0deg), rgba(21, 89, 193, 0.18) var(--progress-angle, 0deg));
  box-shadow: inset 0 0 0 1px rgba(21, 89, 193, 0.12);
}

.metric-ring span {
  font-family: "Sora", "Noto Sans Thai", sans-serif;
  font-size: 1.4rem;
}

@media (max-width: 991px) {
  .dashboard-layout,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
  }

  .app-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .notification-card {
    grid-template-columns: 1fr;
  }

  .notification-header {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .app-page {
    padding-inline: 12px;
  }

  .surface-card,
  .table-shell,
  .hero-card,
  .auth-card,
  .auth-story {
    padding: 20px;
    border-radius: 22px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-card-compact {
    padding: 20px;
  }

  .auth-form-panel {
    padding: 18px;
  }

  .auth-logo-wrap {
    width: 104px;
    height: 104px;
    padding: 5px;
  }

  .auth-college-logo {
    width: 92px !important;
    height: 92px !important;
    max-width: 92px !important;
    max-height: 92px !important;
  }
}


