/* ── HEC Alumni inspired design ─────────────────────────────── */
:root {
  --navy: #1B2A4A;
  --navy-light: #2C3E6B;
  --red: #C8102E;
  --red-hover: #A80D25;
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #EBEDF0;
  --gray-200: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-600: #6B7280;
  --gray-800: #374151;
  --gray-900: #111827;
  --radius: 8px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,.07), 0 10px 15px rgba(0,0,0,.1);
}

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

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ──────────────────────────────────────────────── */
h1, h2 { font-family: var(--font-serif); font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; margin-bottom: .5rem; }
code {
  font-size: .875em;
  padding: .125em .375em;
  background: var(--gray-100);
  border-radius: 4px;
}

/* ── Login ───────────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 380px;
  max-width: 94vw;
  overflow: hidden;
}

.login-header {
  background: var(--navy);
  color: var(--white);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
}

.login-header .logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: .05em;
  margin-bottom: .5rem;
  opacity: .85;
}

.login-header h1 {
  color: var(--white);
  font-size: 1.5rem;
  margin: 0;
}

.login-header .subtitle {
  font-size: .85rem;
  opacity: .7;
  margin-top: .25rem;
}

.login-form {
  padding: 1.5rem 2rem 2rem;
}

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: .35rem;
}
.field input {
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  transition: border-color .15s;
  outline: none;
}
.field input:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(27,42,74,.12);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1.25rem;
  font-size: .9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-full { width: 100%; }
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: var(--red-hover); }
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
}
.btn-secondary:hover:not(:disabled) { background: var(--gray-200); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover:not(:disabled) {
  background: var(--navy);
  color: var(--white);
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  background: var(--navy);
  color: var(--white);
  padding: 0 1.5rem;
  height: 56px;
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.topbar-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}
.topbar .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,.5);
}
.topbar .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.1); }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: 740px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.help-text {
  color: var(--gray-600);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

/* ── Drop zone ───────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: var(--gray-50);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--red);
  background: #FFF5F5;
}
.drop-icon {
  width: 40px;
  height: 40px;
  color: var(--gray-400);
  margin-bottom: .5rem;
}
.drop-text {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: .25rem;
}
.drop-subtext {
  font-size: .85rem;
  color: var(--gray-400);
  margin-bottom: .75rem;
}

/* ── File list ───────────────────────────────────────────────── */
.file-list {
  margin-top: 1rem;
}
.file-list-title {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-400);
  margin-bottom: .5rem;
}
.file-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .6rem;
  background: var(--gray-50);
  border-radius: 6px;
  margin-bottom: .3rem;
  font-size: .875rem;
}
.file-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-item-size {
  color: var(--gray-400);
  font-size: .8rem;
  flex-shrink: 0;
}
.file-item-remove {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0 .15rem;
  line-height: 1;
}
.file-item-remove:hover { color: var(--red); }

/* ── Actions ─────────────────────────────────────────────────── */
.actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
}

/* ── Result ──────────────────────────────────────────────────── */
.result-area {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
}
.result-success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}
.result-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}
.result-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* ── Alert ───────────────────────────────────────────────────── */
.alert {
  padding: .6rem .85rem;
  border-radius: var(--radius);
  font-size: .85rem;
  margin-bottom: .85rem;
}
.alert.error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* ── Loader ──────────────────────────────────────────────────── */
.btn-loader {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
