:root {
  --bg-top: #f5efe5;
  --bg-bottom: #e6edf2;
  --paper: #fcfaf6;
  --paper-strong: #fffdf9;
  --outline: #d9cfbf;
  --outline-soft: #ebe3d6;
  --ink: #1f2b3a;
  --muted: #5f6976;
  --navy: #19354b;
  --navy-soft: #32536f;
  --gold: #b08a4d;
  --forest: #496852;
  --amber: #9a6b22;
  --rose: #8f4a4f;
  --shadow: 0 18px 40px rgba(31, 43, 58, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Cambria, Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.2)),
    linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
}

body {
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient-one {
  width: 320px;
  height: 320px;
  top: -120px;
  right: -100px;
  background: rgba(176, 138, 77, 0.22);
}

.ambient-two {
  width: 380px;
  height: 380px;
  left: -140px;
  bottom: -150px;
  background: rgba(25, 53, 75, 0.14);
}

.app-shell {
  width: min(1320px, calc(100% - 40px));
  margin: 20px auto;
  padding: 20px;
}

.welcome-panel,
.dashboard {
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 253, 249, 0.96));
  border: 1px solid var(--outline);
  box-shadow: var(--shadow);
}

.welcome-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 24px;
  padding: 28px;
}

.welcome-copy,
.auth-card,
.panel,
.stat-card {
  background: var(--paper);
  border: 1px solid var(--outline-soft);
  box-shadow: var(--shadow);
}

.welcome-copy {
  padding: 34px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--gold);
}

.welcome-copy::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius-xl) - 4px);
  border: 1px solid rgba(176, 138, 77, 0.18);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(25, 53, 75, 0.08);
  color: var(--navy);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
  border: 1px solid rgba(25, 53, 75, 0.1);
}

.welcome-copy h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.6rem, 4vw, 4.9rem);
  line-height: 0.98;
  max-width: 11ch;
  letter-spacing: -0.03em;
}

.lead,
.panel-heading p,
.info-card p,
.demo-box p,
.auth-status,
.submission-abstract,
.submission-meta,
.guidance-list,
.dashboard-subtitle {
  color: var(--muted);
  line-height: 1.7;
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.info-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  border-top: 3px solid rgba(176, 138, 77, 0.42);
}

.info-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.demo-box {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(25, 53, 75, 0.05), rgba(176, 138, 77, 0.08));
  border: 1px solid rgba(176, 138, 77, 0.22);
}

.demo-box code {
  font-family: "Consolas", monospace;
  font-size: 0.93rem;
}

.auth-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  align-self: stretch;
  border-top: 4px solid var(--navy);
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.tab-button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.link-button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy-soft);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--navy);
}

.tab-button {
  padding: 11px 16px;
  background: rgba(25, 53, 75, 0.08);
  color: var(--ink);
  border: 1px solid rgba(25, 53, 75, 0.08);
}

.tab-button.active {
  background: var(--navy);
  color: #fff;
}

.auth-form {
  display: none;
  gap: 16px;
}

.auth-form.active {
  display: grid;
}

.auth-form h2,
.dashboard-header h2,
.panel h3,
.submission-card h3 {
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.96rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(31, 43, 58, 0.14);
  background: #fffefb;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(176, 138, 77, 0.22);
  border-color: rgba(25, 53, 75, 0.38);
}

.primary-button,
.secondary-button {
  padding: 13px 18px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(180deg, var(--navy-soft), var(--navy));
  color: #fff;
  box-shadow: 0 12px 24px rgba(25, 53, 75, 0.16);
}

.secondary-button {
  background: rgba(25, 53, 75, 0.08);
  color: var(--ink);
  border: 1px solid rgba(25, 53, 75, 0.1);
}

.primary-button:hover,
.secondary-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-status {
  margin-top: 18px;
}

.dashboard {
  padding: 24px;
}

.dashboard-header,
.panel-heading,
.submission-card-header,
.header-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.header-actions {
  align-items: center;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--outline-soft);
}

.role-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold), var(--navy));
  box-shadow: 0 0 0 6px rgba(176, 138, 77, 0.12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border-top: 4px solid rgba(25, 53, 75, 0.9);
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
}

.main-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.78fr;
  gap: 18px;
  margin-top: 18px;
}

.column-large,
.column-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.panel {
  padding: 22px;
  border-radius: var(--radius-lg);
  border-top: 4px solid rgba(176, 138, 77, 0.85);
}

.submission-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.submission-form .wide {
  grid-column: 1 / -1;
}

.submission-status-note {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(25, 53, 75, 0.04);
  border: 1px solid rgba(25, 53, 75, 0.08);
}

.submission-status-note p,
label small {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.status-label {
  font-size: 0.96rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.pending {
  background: rgba(176, 138, 77, 0.14);
  color: #7a5823;
}

.review {
  background: rgba(25, 53, 75, 0.12);
  color: var(--navy);
}

.approved {
  background: rgba(73, 104, 82, 0.14);
  color: #395342;
}

.revision {
  background: rgba(143, 74, 79, 0.14);
  color: #7b3d41;
}

.submission-list,
.notification-list,
.comment-list {
  display: grid;
  gap: 14px;
}

.submission-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--paper-strong);
  border: 1px solid rgba(31, 43, 58, 0.08);
}

.submission-card h3 {
  margin-top: 10px;
  font-size: 1.25rem;
}

.submission-time {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

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

.file-badge {
  display: inline-flex;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(25, 53, 75, 0.08);
  color: var(--navy);
  text-decoration: none;
}

.comments-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(27, 36, 48, 0.08);
}

.comments-block h4 {
  margin: 0 0 12px;
}

.comment {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(25, 53, 75, 0.05);
}

.comment strong {
  display: block;
  margin-bottom: 6px;
}

.comment small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.supervisor-controls {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed rgba(27, 36, 48, 0.14);
}

.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.notification {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  border: 1px solid rgba(31, 43, 58, 0.07);
}

.notification strong {
  display: block;
  margin-bottom: 8px;
}

.notification small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.guidance-list {
  margin: 0;
  padding-left: 22px;
}

.guidance-list li + li {
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(25, 53, 75, 0.05);
  color: var(--muted);
}

.status-error {
  color: var(--rose);
}

.status-success {
  color: var(--forest);
}

@media (max-width: 1120px) {
  .welcome-panel,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .welcome-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1320px);
    margin: 9px auto;
    padding: 8px;
  }

  .welcome-panel,
  .dashboard {
    padding: 14px;
    border-radius: 22px;
  }

  .welcome-copy,
  .auth-card,
  .panel,
  .stat-card {
    padding: 18px;
    border-radius: 22px;
  }

  .submission-form,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header,
  .panel-heading,
  .submission-card-header,
  .header-actions {
    flex-direction: column;
  }

  .submission-time {
    white-space: normal;
  }
}
