:root {
  --brand-bg: #0a2540; /* deep corporate navy */
  --brand-accent: #1f6feb; /* interactive blue */
  --brand-accent-2: #22c55e; /* success */
  --brand-text: #0b132b;
  --brand-muted: #6b7280;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface-2); color: var(--brand-text); }
.container { width: 90%; max-width: 1400px; margin: 0 auto; padding: 24px; }
.card { background: var(--surface); border: 1px solid #e6eaf1; border-radius: 14px; padding: 28px; box-shadow: 0 8px 24px rgba(10,37,64,0.06); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.col { flex: 1; min-width: 200px; }
label { display: block; font-weight: 600; margin: 12px 0 6px; color: #0f172a; }
input, select, textarea { width: 100%; padding: 14px 16px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; transition: box-shadow .2s, border-color .2s; font-size: 15px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(31,111,235,.15); }
button { background: var(--brand-accent); color: #fff; border: none; padding: 14px 20px; border-radius: 10px; cursor: pointer; font-weight: 700; letter-spacing: .2px; box-shadow: 0 6px 18px rgba(31,111,235,.25); transition: transform .05s ease, box-shadow .2s; font-size: 15px; }
button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(31,111,235,.30); }
button:disabled { opacity: 0.6; cursor: not-allowed; }
button.secondary { background: #e5e7eb; color: #0f172a; box-shadow: none; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #e8eefc; color: #1d4ed8; font-size: 12px; font-weight: 700; }
.space { height: 16px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--brand-accent); }

.header { background: var(--brand-bg); color: #fff; }
.header-inner { width: 90%; max-width: 1400px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  font-weight: 800; 
  letter-spacing: .3px; 
  color: #fff; 
  text-decoration: none;
  transition: opacity 0.2s;
}
.brand:hover { opacity: 0.9; }
.brand img { 
  height: 36px; 
  width: auto; 
  border-radius: 6px; 
  background: rgba(255, 255, 255, 0.95); 
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.brand span {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.hero { background: linear-gradient(180deg, rgba(10,37,64,1) 0%, rgba(10,37,64,.85) 100%); color: #fff; padding: 32px 24px; }
.hero-inner { width: 90%; max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero h1 { margin: 0; font-size: 28px; }
.hero p { margin: 6px 0 0; color: #cbd5e1; }
.cta-group { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
  align-items: center;
}
.cta-group button {
  white-space: nowrap;
}

/* Form Styles */
.form-section { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid #e6eaf1; }
.form-section:last-of-type { border-bottom: none; }
.section-title { 
  margin: 0 0 24px; 
  font-size: 22px; 
  font-weight: 700; 
  color: var(--brand-text);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--brand-accent);
  border-radius: 2px;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.form-field { margin-bottom: 24px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 10px; color: #0f172a; font-size: 14px; }
.form-field .required { color: #dc2626; }
.form-field input, .form-field textarea { margin: 0; }
.form-field textarea { resize: vertical; min-height: 120px; }

.checkbox-group { display: flex; flex-direction: column; gap: 16px; }
.checkbox-label { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 14px; background: #f8fafc; border-radius: 10px; transition: background .2s; }
.checkbox-label:hover { background: #f1f5f9; }
.checkbox-label input[type="checkbox"] { width: auto; margin: 0; cursor: pointer; accent-color: var(--brand-accent); width: 18px; height: 18px; }
.checkbox-label span { font-weight: 500; color: #334155; font-size: 15px; }

.upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.upload-field { }
.upload-field label { display: block; font-weight: 600; margin-bottom: 10px; color: #0f172a; font-size: 14px; }
.file-upload { position: relative; }
.file-input { position: absolute; opacity: 0; width: 0; height: 0; }
.file-label { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  gap: 8px; 
  padding: 20px 16px; 
  background: #f8fafc; 
  border: 2px dashed #cbd5e1; 
  border-radius: 10px; 
  text-align: center; 
  cursor: pointer; 
  font-weight: 600; 
  color: var(--brand-accent); 
  transition: all .2s; 
  font-size: 14px; 
  min-height: 100px; 
}
.file-label:hover { background: #f1f5f9; border-color: var(--brand-accent); border-style: solid; }
.file-label:has(.file-input:focus) { border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(31,111,235,.15); }
.file-label.selected { background: #e8eefc; border-color: var(--brand-accent); border-style: solid; }
.file-label .file-icon { font-size: 24px; opacity: 0.7; }
.file-label .file-name { font-size: 12px; color: #64748b; font-weight: 500; margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-label .upload-status { font-size: 11px; color: var(--brand-accent); margin-top: 4px; }
.file-label.uploading { opacity: 0.7; pointer-events: none; }
.file-label.uploading .upload-status::after { content: '...'; animation: dots 1.5s steps(4, end) infinite; }
@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

.form-actions { display: flex; gap: 12px; margin-top: 36px; padding-top: 28px; border-top: 1px solid #e6eaf1; flex-wrap: wrap; }
.submit-btn { flex: 1; min-width: 200px; }

/* Error States */
input.error, textarea.error, select.error { border-color: #dc2626; }
input.error:focus, textarea.error:focus, select.error:focus { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
.error-message { color: #dc2626; font-size: 13px; margin-top: 6px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.error-message::before { content: '⚠'; font-size: 14px; }

/* Responsive Design */
@media (max-width: 768px) {
  .container { width: 95%; padding: 16px; }
  .card { padding: 20px; }
  .header-inner, .hero-inner { width: 95%; padding: 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 20px; }
  .upload-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-section { margin-bottom: 28px; padding-bottom: 20px; }
  .form-field { margin-bottom: 20px; }
  .hero h1 { font-size: 24px; }
  .hero-inner { flex-direction: column; text-align: center; }
  .cta-group { width: 100%; }
  .cta-group button { flex: 1; min-width: 120px; }
  .form-actions { flex-direction: column; }
  .form-actions button { width: 100%; }
}

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

@media (max-width: 480px) {
  .container { width: 100%; padding: 12px; }
  .card { padding: 16px; border-radius: 12px; }
  .header-inner, .hero-inner { width: 100%; padding: 12px; }
  .brand span { font-size: 14px; }
  .hero h1 { font-size: 20px; }
  .hero p { font-size: 14px; }
  .section-title { font-size: 18px; }
  input, select, textarea { padding: 12px 14px; font-size: 14px; }
  button { padding: 12px 16px; font-size: 14px; }
}

/* Admin Grid Responsive */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) {
  .admin-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Cogniware badge */
.partner-badge { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  padding: 6px 12px; 
  background: rgba(255, 255, 255, 0.1); 
  border-radius: 8px;
  backdrop-filter: blur(4px);
}
.partner-badge span { 
  font-size: 12px; 
  color: rgba(255, 255, 255, 0.9); 
  font-weight: 600; 
  white-space: nowrap;
}
.partner-badge img { 
  height: 20px; 
  width: auto; 
  opacity: 0.95;
  filter: brightness(0) invert(1);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 1000px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .modal-content {
    padding: 20px;
    max-width: 100%;
    margin: 10px;
  }
  .modal-overlay {
    padding: 10px;
  }
}

