/* GWDemTC Clinicals — Student Portal Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@400;500;600&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --ink: #0f172a;
  --ink-heading: #020617;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(224, 231, 255, 0.4) 0px, transparent 50%),
                 radial-gradient(at 100% 0%, rgba(207, 250, 254, 0.4) 0px, transparent 50%),
                 radial-gradient(at 50% 100%, rgba(238, 242, 255, 0.5) 0px, transparent 50%);
  
  --card: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.88);
  --card-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --card-shadow-hover: 0 20px 35px -10px rgba(15, 23, 42, 0.08), 0 8px 16px -4px rgba(15, 23, 42, 0.04);
  
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --accent-light: #eff6ff;
  --accent-ring: rgba(37, 99, 235, 0.18);
  
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  
  --bad: #dc2626;
  --bad-bg: #fef2f2;
  --bad-border: #fecaca;
  
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

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

body {
  font-family: var(--font-main);
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page header & navbar */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

header.site .brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink-heading);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

header.site .brand::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--accent-gradient);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M12 8v8'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M12 8v8'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Layout container */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Navigation tabs */
nav.tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(226, 232, 240, 0.5);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  margin: 0 0 28px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

nav.tabs a {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: calc(var(--radius) - 4px);
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.tabs a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

nav.tabs a.active {
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Headings & typography */
h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-heading);
  margin: 0 0 6px;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-heading);
  margin: 32px 0 14px;
}

p.lede {
  color: var(--muted);
  font-size: 1.02rem;
  margin-top: 0;
  margin-bottom: 24px;
  font-weight: 400;
}

/* Cards */
.card {
  background: var(--card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card + .card {
  margin-top: 16px;
}

/* Form fields */
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin: 16px 0 6px;
}

label:first-child {
  margin-top: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2064748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

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

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

@media (max-width: 540px) {
  .row2 { grid-template-columns: 1fr; }
}

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

button:active, .btn:active {
  transform: translateY(0);
}

button:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

button.secondary, .btn.secondary {
  background: #ffffff;
  color: var(--accent);
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

button.secondary:hover, .btn.secondary:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

button.link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
  box-shadow: none;
  cursor: pointer;
}

.actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Feedback messages & alerts */
.msg {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg.error {
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid var(--bad-border);
}

.msg.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}

.msg.info {
  background: #f0f7ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}

.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn-border);
}

.badge.bad {
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid var(--bad-border);
}

.badge.neutral {
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid #e2e8f0;
}

/* List items & cards for documents and shifts */
.item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--card-shadow-hover);
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.item-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-heading);
}

.item-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.reasons {
  color: var(--bad);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bad-bg);
  border-radius: 8px;
}

.warnings {
  color: var(--warn);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--warn-bg);
  border-radius: 8px;
}

.comments {
  font-size: 0.9rem;
  margin-top: 12px;
  background: #f8fafc;
  border-left: 3.5px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  color: #334155;
}

/* Consent scroll box */
.consent-body {
  max-height: 280px;
  overflow-y: auto;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  background: #f8fafc;
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.6;
}

.progress {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Animated Loading Spinner */
.spinner-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 32px 0;
}

.spinner-text::before {
  content: '';
  width: 22px;
  height: 22px;
  border: 3.5px solid #e2e8f0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-row label {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}

footer.hint {
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}
