/* ============================================================
   Geospatial Campus — Intern Attendance
   Branded to match draran.online (Dr. Aran Castro A J)
   ============================================================ */

:root {
  /* Brand palette — matches drarancastro-website/css/style.css */
  --navy:        #2B3381;   /* deep indigo — Geospatial Campus primary */
  --navy-dark:   #0A0D28;   /* near-black indigo */
  --indigo:      #3F3A64;   /* secondary purple */
  --pink:        #D11A6C;   /* Geospatial Campus brand / CTA */
  --pink-dark:   #b5155c;
  --teal:        #20AD96;   /* emerald accent */
  --teal-light:  #35C4AE;
  --gold:        #D4A843;
  --gold-dark:   #B8921E;
  --white:       #FFFFFF;
  --off-white:   #FAF8F6;   /* warm cream */
  --gray-100:    #F5F1ED;   /* warm beige */
  --gray-200:    #EAE1D6;
  --gray-400:    #8C89A2;
  --gray-500:    #6B6880;
  --gray-600:    #444444;
  --border:      #E8DDD4;   /* warm border */
  --text-primary:   #0A0D28;
  --text-secondary: #444444;

  --success-bg:  #E6F7F3;
  --success-fg:  #0F8B74;
  --success-border: #B0E5D9;
  --danger-bg:   #FDE8EF;
  --danger-fg:   #B81560;
  --danger-border: #F6BFD4;
  --warning-bg:  #FBF4E6;
  --warning-fg:  #8A6A1F;
  --warning-border: #ECD9A7;

  --shadow-sm:   0 1px 3px rgba(43,51,129,0.08);
  --shadow-md:   0 4px 16px rgba(43,51,129,0.10);
  --shadow-lg:   0 24px 64px rgba(10,13,40,0.18);

  --radius:      8px;
  --radius-lg:   16px;

  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:   ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --transition:  0.25s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--navy);
  font-weight: 700;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(209,26,108,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(32,173,150,0.07) 0%, transparent 55%),
    var(--off-white);
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px 26px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.brand {
  text-align: center;
  margin-bottom: 32px;
}

.brand-logo {
  display: block;
  height: 62px;
  width: auto;
  margin: 0 auto 18px;
  object-fit: contain;
}

.brand h1 {
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.tagline {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.tagline strong {
  color: var(--navy);
  font-weight: 600;
}

/* ============================================================
   FORMS
   ============================================================ */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.field input {
  font: inherit;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--off-white);
  color: var(--text-primary);
  transition: all var(--transition);
}

.field input::placeholder { color: var(--gray-400); }

.field input:focus {
  outline: none;
  border-color: var(--pink);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(209,26,108,0.12);
}

#pin {
  letter-spacing: 10px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font: inherit;
  font-family: var(--font-sans);
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 24px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--pink);
  color: var(--white);
  border-color: var(--pink);
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(209,26,108,0.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--pink-dark);
  border-color: var(--pink-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(209,26,108,0.32);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-lg {
  padding: 18px 28px;
  font-size: 1.05rem;
  width: 100%;
  border-radius: var(--radius);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
  font-size: 0.82rem;
  padding: 9px 16px;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
  border-color: var(--navy);
}

.btn-success {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(32,173,150,0.30);
}
.btn-success:hover:not(:disabled) {
  background: #1a9683;
  border-color: #1a9683;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(32,173,150,0.35);
}

.btn-warning {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-dark);
  box-shadow: 0 4px 14px rgba(212,168,67,0.32);
}
.btn-warning:hover:not(:disabled) {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(184,146,30,0.36);
}

/* ── Spinner ── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-warning .spinner { border-color: rgba(10,13,40,0.3); border-top-color: var(--navy-dark); }

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

/* ============================================================
   MESSAGES
   ============================================================ */
.msg {
  margin: 6px 0 0;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
}
.msg.error   { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-border); }
.msg.success { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-border); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  text-align: center;
  margin-top: 24px;
  color: var(--gray-500);
  font-size: 0.78rem;
}
.foot.center { padding: 24px 16px; }
.foot strong { color: var(--navy); font-weight: 600; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.page-dashboard {
  background: var(--off-white);
  padding: 0;
}

.topbar {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.topbar-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-brand img {
  height: 38px;
  width: auto;
  object-fit: contain;
  /* White logo on navy bar */
  filter: brightness(0) invert(1);
}

.topbar-brand span {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .btn-ghost {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
  background: transparent;
}
.topbar .btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

.dashboard {
  max-width: 600px;
  margin: 0 auto;
  padding: 28px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Welcome block ── */
.welcome {
  text-align: center;
  padding: 8px 0 4px;
}

.welcome .hello {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.welcome h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.6rem, 5vw, 2rem);
  letter-spacing: -0.4px;
}

.welcome .intern-id {
  margin: 0;
  color: var(--pink);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  font-weight: 600;
}

/* ── Clock ── */
.clock {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
}

.clock-time {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
}

.clock-date {
  margin-top: 8px;
  color: var(--gray-500);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Target banner (4h requirement) ── */
.target-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--indigo) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.08);
}

.target-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(212,168,67,0.18);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.target-icon svg { width: 22px; height: 22px; }

.target-content {
  flex: 1;
  min-width: 0;
}

.target-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 2px;
}

.target-text {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
}

.target-hours {
  color: var(--gold);
  font-weight: 700;
}

/* ── Status card ── */
.status-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px 18px;
  box-shadow: var(--shadow-sm);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
}

.status-block {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.status-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

.status-label {
  display: block;
  font-size: 0.68rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 6px;
}

.status-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

/* ── Progress section (hours worked / remaining) ── */
.progress-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  text-align: center;
}

.progress-label {
  display: block;
  font-size: 0.68rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 8px;
}

.progress-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.progress-value .progress-target {
  color: var(--gray-500);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 100%);
  border-radius: 99px;
  width: 0%;
  transition: width 0.6s ease;
}

.progress-fill.complete {
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 100%);
}

.progress-status {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 500;
}

.progress-status.complete {
  color: var(--success-fg);
  font-weight: 600;
}

/* ── Action area ── */
.action {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Completion info ── */
.info {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--success-fg);
}

.info-icon {
  width: 38px;
  height: 38px;
  background: var(--teal);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.info p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 480px) {
  .clock-time { font-size: 3rem; }
  .status-value { font-size: 1.5rem; }
}

@media (max-width: 380px) {
  .topbar-brand span { display: none; }
  .target-banner { padding: 14px 16px; }
  .target-icon { width: 38px; height: 38px; }
  .card { padding: 32px 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
