/* d1-OL-Operations Exception Form — styles.css */

/* ── Roche Sans font faces ── */
@font-face {
  font-family: 'Roche Sans';
  src: url('fonts/RocheSans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roche Sans';
  src: url('fonts/RocheSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roche Sans';
  src: url('fonts/RocheSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roche Sans';
  src: url('fonts/RocheSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --blue:      #0B41CD;
  --blue-dark: #082fa0;
  --blue-soft: #eff6ff;
  --gray-50:   #f9fafb;
  --gray-100:  #f4f6f9;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-600:  #4b5563;
  --gray-800:  #1f2937;
  --red:       #dc2626;
  --green:     #16a34a;
  --radius:    10px;
  --shadow:    0 1px 6px rgba(0,0,0,.07);
  --font:      'Roche Sans', 'Segoe UI', Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Top nav ── */
.topbar {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-brand { display: flex; align-items: center; gap: 14px; }
.roche-logo { height: 28px; width: auto; filter: brightness(0) invert(1); display: block; }
.topbar-divider { width: 1px; height: 20px; background: rgba(255,255,255,.35); display: inline-block; }
.topbar-product { font-size: 0.88rem; font-weight: 500; letter-spacing: 0.2px; color: rgba(255,255,255,.9); }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: rgba(255,255,255,.85); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
  text-transform: uppercase; flex-shrink: 0;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0B41CD 0%, #1a5cf5 60%, #2d6fff 100%);
  color: #fff;
  padding: 44px 24px 48px;
  position: relative;
  overflow: hidden;
}
.hero-inner { max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }
.hero-decoration {
  position: absolute; right: -60px; top: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,.06); pointer-events: none;
}
.hero-pill {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-title { font-size: 1.85rem; font-weight: 700; line-height: 1.2; margin-bottom: 8px; letter-spacing: -0.3px; }
.hero-welcome { font-size: 0.95rem; color: rgba(255,255,255,.8); font-weight: 400; }

/* ── Content ── */
.content { max-width: 1080px; margin: 0 auto; padding: 28px 24px 48px; flex: 1; width: 100%; }

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(0,0,0,.04);
}
.card-center { text-align: center; padding: 56px 24px; }
.table-card { padding: 0; overflow: hidden; }
.form-card { padding: 28px; }

/* ── Loading / empty states ── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state-label { color: var(--gray-600); font-size: 0.9rem; }
.empty-icon { font-size: 2.5rem; margin-bottom: 16px; }
.empty-msg { font-size: 1rem; font-weight: 500; margin-bottom: 8px; color: var(--gray-800); }
.empty-hint { font-size: 0.88rem; color: var(--gray-600); max-width: 480px; margin: 0 auto; line-height: 1.6; }

/* ── Step headers ── */
.step-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.step-title { font-size: 0.95rem; font-weight: 600; color: var(--gray-800); margin-bottom: 2px; }
.step-sub { font-size: 0.8rem; color: var(--gray-600); }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead { background: var(--gray-50); }
th {
  text-align: left; padding: 11px 16px;
  font-size: 0.72rem; font-weight: 600; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { cursor: pointer; transition: background 0.12s; }
tbody tr:hover td { background: var(--blue-soft); }
tbody tr.selected td { background: #dbeafe; }

.radio-cell { text-align: center; width: 44px; }
input[type="radio"] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  background: var(--gray-100); padding: 2px 7px;
  border-radius: 4px; border: 1px solid var(--gray-200); color: var(--gray-600);
}

.status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 0.72rem; font-weight: 600;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
}
.status-deferred { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.status-confirmed { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.status-in-progress { background: #fff3e0; color: #e65100; border-color: #ffcc80; }
.row-deferred td { opacity: 0.8; cursor: default; }
.row-deferred:hover td { background: inherit; }

/* ── Contacts detail row ── */
.contacts-row td { padding: 0 16px 10px; border-bottom: 1px solid var(--gray-200); background: var(--gray-50); }
.contacts-row:hover td { background: var(--gray-50); }
.contacts-detail { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 0.75rem; color: var(--gray-600); line-height: 1.5; }
.contacts-detail strong { color: var(--gray-800); font-weight: 500; }
.contact-sep { margin: 0 10px; color: var(--gray-300); }
.contacts-row { cursor: default; }

/* ── Form fields ── */
.field-row { display: flex; gap: 16px; }
.form-group { margin-bottom: 20px; flex: 1; }
label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--gray-600); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.req { color: var(--red); }

/* ── Calendar date picker ── */
.date-input-wrap { position: relative; }
.date-input-wrap input[type="date"] {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  cursor: pointer;
}
.date-input-wrap input[type="date"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11,65,205,.10);
}
.date-hint { font-size: 0.73rem; color: var(--gray-400); margin-top: 5px; }

textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  resize: vertical;
  line-height: 1.6;
  min-height: 100px;
}
textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,65,205,.10); }

/* ── Alerts ── */
.alert {
  padding: 13px 16px; border-radius: 8px;
  font-size: 0.88rem; line-height: 1.5;
  margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-error  { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }

/* ── Submit button ── */
.form-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-primary {
  background: var(--blue); color: #fff; border: none;
  border-radius: 8px; padding: 11px 28px;
  font-size: 0.9rem; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(11,65,205,.22);
  white-space: nowrap; letter-spacing: 0.2px;
}
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 4px 12px rgba(11,65,205,.30); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.form-note { font-size: 0.78rem; color: var(--gray-400); line-height: 1.5; flex: 1; }

/* ── Footer ── */
.footer {
  background: #fff; border-top: 1px solid var(--gray-200);
  text-align: center; padding: 16px 24px;
  font-size: 0.75rem; color: var(--gray-400);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.footer a { color: var(--blue); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.sep { opacity: 0.5; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero-title { font-size: 1.4rem; }
  .content { padding: 20px 16px 40px; }
  .field-row { flex-direction: column; }
  .form-actions { flex-direction: column; align-items: flex-start; }
  .topbar-user span:not(.user-avatar) { display: none; }
}
