/* AIPS application forms. Brand: navy #073477, orange #F36B21, dark navy #10243D, grey #F4F6F9 */

.form-body { background: var(--grey); }
.preview-banner {
  background: #FFF4E8; color: #6B3A10; border-bottom: 1px solid #F5D2B3;
  padding: 10px 16px; font-size: .88rem; text-align: center;
}
.preview-banner a { color: var(--navy); font-weight: 600; margin-left: 8px; }

/* Layout */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 42px); }
.sidebar {
  background: var(--dark-navy); color: #C9D6EA; padding: 20px 14px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: block; background: var(--white); border-radius: 12px; padding: 8px 12px; margin-bottom: 20px; }
.sidebar-brand img { height: 52px; width: auto; }

.app-main { min-width: 0; }
.app-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 24px;
  position: sticky; top: 0; z-index: 20;
}
.sidebar-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  font: inherit; font-weight: 600; color: var(--navy); cursor: pointer;
}
.applicant-chip { display: flex; gap: 10px; align-items: center; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.chip-name { font-weight: 600; color: var(--dark-navy); }
.chip-id { font-size: .8rem; background: var(--grey); color: var(--navy); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.app-view { padding: 28px 24px 60px; max-width: 1180px; outline: none; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 280px; max-width: 86vw; z-index: 60;
    transform: translateX(-105%); transition: transform .2s ease; height: 100vh;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar-toggle { display: inline-flex; }
  .app-top { padding: 10px 16px; }
  .app-view { padding: 20px 16px 48px; }
}
@media (max-width: 560px) { .chip-id { display: none; } }

/* Page heading */
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: .3em; }
.lead-sm { color: var(--text); font-size: 1.05rem; margin: 0 0 .3em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.crumb-sm { font-size: .88rem; margin-bottom: 8px; }
.crumb-sm a { color: var(--navy); }
.preview-note { margin: 0 0 22px; font-size: .88rem; }

/* Panels and grids */
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px; box-shadow: 0 4px 16px rgba(16,36,61,.04);
}
.panel h2 { font-size: 1.1rem; margin-bottom: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two-col > .panel { margin-bottom: 20px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card-grid .panel { margin-bottom: 0; display: flex; flex-direction: column; gap: 6px; }
.card-grid .panel .btn { align-self: flex-start; margin-top: auto; }
.toolbar { margin-bottom: 18px; }
.app-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 960px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  text-decoration: none; display: flex; flex-direction: column; gap: 4px; border-top: 4px solid var(--navy);
}
.stat:hover { box-shadow: var(--shadow); }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--dark-navy); line-height: 1; }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Lists */
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--grey); }
.list-row.unread strong { color: var(--navy); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-left: 6px; vertical-align: middle; }
.steps-list { padding-left: 1.2em; margin: 0 0 14px; }
.steps-list li { margin-bottom: 8px; }

/* Badges and progress */
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-action { background: #FFEBDD; color: #9A3D0B; }
.badge-review { background: #E3EBF7; color: var(--navy); }
.badge-done { background: #E2F4EA; color: #17603A; }
.badge:not([class*="badge-a"]):not([class*="badge-r"]):not([class*="badge-d"]) { background: var(--grey); color: var(--muted); }
.progress { height: 10px; background: var(--grey); border-radius: 999px; overflow: hidden; margin: 8px 0 14px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--orange)); border-radius: 999px; }
.step-track { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.step-track li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .9rem; color: var(--muted); background: var(--white); }
.step-track li.done { border-color: #B9D8C6; color: #17603A; background: #F3FAF6; }
.step-track li.current { border-color: var(--orange); color: var(--dark-navy); font-weight: 600; }
.tag { background: var(--grey); color: var(--navy); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dark-navy); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }

/* Forms */
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-2 { grid-template-columns: 1fr; } }
.checklist { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0; }
.checklist legend { font-weight: 700; color: var(--dark-navy); padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 6px 0; }
.check input { width: 18px; height: 18px; }
.form input[type="file"] { padding: 10px; background: var(--grey); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--dark-navy); }
details p { color: var(--muted); margin: 8px 0 0; }

/* Auth screens */
.auth-wrap { min-height: calc(100vh - 42px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 32px; width: 100%; max-width: 460px;
}
.auth-card h1 { font-size: 1.6rem; }
.auth-logo img { height: 64px; width: auto; margin-bottom: 14px; }
.auth-card .form { margin-top: 16px; }
.auth-links { margin-top: 18px; font-size: .92rem; text-align: center; }
.auth-links a { color: var(--navy); font-weight: 600; }

/* Job placement form */
.req { color: #B42318; font-weight: 700; }
.help { display: block; font-size: .82rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
.file-error { display: block; font-size: .85rem; color: #B42318; font-weight: 600; min-height: 1em; }
.form-section { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.form-section legend { padding: 0; margin-bottom: 14px; width: 100%; }
.form-section legend h2 { font-size: 1.15rem; margin: 0; padding-bottom: 8px; border-bottom: 2px solid var(--orange); width: 100%; }
.phone-field { display: grid; gap: 6px; }
.phone-label { font-weight: 600; color: var(--dark-navy); font-size: .92rem; }
.phone-row { display: grid; grid-template-columns: minmax(160px, 1.1fr) 1.4fr; gap: 8px; }
.phone-row select, .phone-row input { min-height: 48px; padding: 11px 12px; border: 1px solid #C8D1DE; border-radius: 10px; font: inherit; width: 100%; background: var(--white); }
@media (max-width: 520px) { .phone-row { grid-template-columns: 1fr; } }
.form-actions { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 10px; }
.form-actions .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.form-status { font-weight: 600; color: var(--navy); min-height: 1.5em; }
.check input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; }
.check a { color: var(--navy); font-weight: 600; }
.app-view .panel .form label { font-size: .92rem; }
