@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --fvm-primary: #000000;
  --fvm-primary-light: #8e202d;
  --fvm-primary-dark: #0f2340;
  --fvm-accent: #e8a020;
  --fvm-accent-light: #f5c050;
  --fvm-accent-dark: #c47f10;
  --fvm-success: #0d9e6e;
  --fvm-success-dark: #065f46;
  --fvm-error: #c1243f;
  --fvm-bg: #efefef;
  --fvm-surface: #ffffff;
  --fvm-border: #d8dde8;
  --fvm-text: #1a1f36;
  --fvm-text-muted: #6b7280;
  --fvm-text-light: #9ca3af;
  --fvm-blue-link: #2558a0;
  --fvm-section-bg: #f7f9fc;
  --fvm-section-hdr: #e7e7e7;
  --fvm-label-color: #6b7280;
  --fvm-shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --fvm-shadow: 0 4px 20px rgba(26,58,92,.08);
  --fvm-shadow-lg: 0 12px 40px rgba(26,58,92,.10);
  --fvm-radius: 10px;
  --fvm-radius-sm: 7px;
  --fvm-radius-lg: 18px;
  --fvm-transition: all .22s cubic-bezier(.4,0,.2,1);
}

.dip-page *, .dip-page *::before, .dip-page *::after { box-sizing: border-box; margin: 0; padding: 0; }
.dip-page {
  font-family: 'Inter', sans-serif;
  background: var(--fvm-bg);
  color: var(--fvm-text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

.dip-hero {
  background: linear-gradient(135deg, var(--fvm-primary-dark) 0%, var(--fvm-primary) 55%, var(--fvm-primary-light) 100%);
  padding: 52px 24px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dip-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.dip-hero__inner { position: relative; max-width: 640px; margin: 0 auto; }
.dip-hero__badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px; padding: 5px 15px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  color: rgba(255,255,255,.9); text-transform: uppercase; margin-bottom: 18px;
}
.dip-hero__title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(24px, 4.5vw, 36px);
  font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: 10px;
}
.dip-hero__title span { color: var(--fvm-accent-light); }
.dip-hero__sub {
  color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.6; margin-bottom: 28px;
}

.dip-search {
  border-radius: 14px;
  padding: 20px;
}
.dip-search__label { color: rgba(255,255,255,.82); font-size: 12px; font-weight: 500; display: block; margin-bottom: 9px; text-align: left; }
.dip-search__row { display: flex; gap: 9px; }
.dip-search__input {
  flex: 1; min-width: 0; background: rgba(255,255,255,.96);
  border: 2px solid transparent; border-radius: var(--fvm-radius-sm);
  padding: 11px 16px; font-size: 14px; font-family: 'Inter', sans-serif;
  color: var(--fvm-text); transition: var(--fvm-transition); outline: none;
}
.dip-search__input::placeholder { color: var(--fvm-text-light); }
.dip-search__input:focus { border-color: var(--fvm-accent); background: #fff; }
.dip-search__btn {
  background: var(--fvm-accent); color: #fff; border: none;
  border-radius: var(--fvm-radius-sm); padding: 11px 22px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--fvm-transition);
  white-space: nowrap; display: flex; align-items: center; gap: 7px; font-family: 'Inter', sans-serif;
}
.dip-search__btn:hover { background: var(--fvm-accent-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,160,32,.4); }
.dip-search__hint { margin-top: 9px; text-align: left; color: rgba(255,255,255,.55); font-size: 11px; }

.dip-stats { background: rgba(255,255,255,.07); border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 20px; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.dip-stats__item { text-align: center; }
.dip-stats__num { font-size: 20px; font-weight: 700; color: var(--fvm-accent-light); display: block; }
.dip-stats__label { font-size: 10px; color: rgba(255,255,255,.58); letter-spacing: .05em; }

.dip-main { max-width: 1000px; margin: 0 auto; padding: 28px 20px 56px; }

.dip-status {
  border-radius: var(--fvm-radius);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.dip-status--valid {
  background: linear-gradient(135deg, #e8faf4 0%, #d4f5e9 100%);
  border: 1.5px solid #a3e4c9;
}
.dip-status--invalid {
  background: linear-gradient(135deg, #fdedf0 0%, #fce0e5 100%);
  border: 1.5px solid #f5b0be;
}
.dip-status__icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dip-status--valid .dip-status__icon { background: var(--fvm-success); box-shadow: 0 0 0 7px rgba(13,158,110,.1); }
.dip-status__body { flex: 1; min-width: 0; }
.dip-status__title { font-size: 15px; font-weight: 700; color: var(--fvm-success-dark); margin-bottom: 2px; }
.dip-status__sub { font-size: 13px; color: var(--fvm-text-muted); }
.dip-status__code { text-align: right; flex-shrink: 0; }
.dip-status__code-label { display: block; font-size: 10px; color: var(--fvm-text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.dip-status__code strong { font-size: 12px; font-family: 'Courier New', monospace; color: var(--fvm-text); }

.dip-doc-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 600;
  color: var(--fvm-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--fvm-border);
}

.dip-doc { display: flex; flex-direction: column; gap: 0; }

.dip-section {
  background: var(--fvm-surface);
  border: 1px solid var(--fvm-border);
  border-radius: var(--fvm-radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.dip-section__header {
  background: var(--fvm-section-hdr);
  border-bottom: 1px solid var(--fvm-border);
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #202020;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dip-section__badge {
  font-size: 11px; font-weight: 600; text-transform: none;
  background: var(--fvm-primary); color: #fff;
  border-radius: 50px; padding: 2px 10px; letter-spacing: 0;
}

.dip-section__body { padding: 16px 16px 8px; }

.dip-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0;
  margin-bottom: 16px;
}
.dip-row:last-child { margin-bottom: 0; }

.dip-field { padding: 0 8px 12px 0; }
.dip-field__label {
  font-size: 10px; font-weight: 600;
  color: var(--fvm-label-color);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 4px;
}
.dip-field__value {
  font-size: 13.5px; color: var(--fvm-text); font-weight: 400; line-height: 1.4;
}
.dip-field__value--blue { color: var(--fvm-blue-link); font-weight: 500; }

.dip-section--disciplines .dip-section__header { gap: 12px; }
.dip-hist-table-scroll { overflow-x: auto; }
.dip-hist-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dip-hist-table thead th {
  background: var(--fvm-primary);
  color: rgba(255,255,255,.9); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 12px; text-align: left; white-space: nowrap;
}
.dip-hist-table tbody tr { border-bottom: 1px solid var(--fvm-border); transition: background .12s; }
.dip-hist-table tbody tr:last-child { border-bottom: none; }
.dip-hist-table tbody tr:hover { background: var(--fvm-bg); }
.dip-hist-table td { padding: 10px 12px; vertical-align: middle; }
.dip-hist-n { color: var(--fvm-text-muted); font-size: 11px; }
.dip-hist-muted { color: var(--fvm-text-muted); }
.nota-badge { display: inline-block; background: var(--fvm-primary-light); color: #fff; border-radius: 5px; padding: 2px 7px; font-size: 11.5px; font-weight: 600; }
.nota-badge--high { background: var(--fvm-success); }
.nota-badge--mid  { background: #d97706; }
.aprovado-tag { background: #d1fae5; color: #065f46; border-radius: 50px; padding: 2px 10px; font-size: 11px; font-weight: 600; }
.period-header { background: #f1f5fd !important; }
.period-header td { font-size: 11px !important; font-weight: 700 !important; color: var(--fvm-primary) !important; text-transform: uppercase !important; letter-spacing: .06em !important; padding: 7px 12px !important; }

.dip-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.dip-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--fvm-radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: var(--fvm-transition);
  border: none; font-family: 'Inter', sans-serif;
}
.dip-btn--primary { background: var(--fvm-primary); color: #fff; }
.dip-btn--primary:hover { background: var(--fvm-primary-light); transform: translateY(-1px); box-shadow: var(--fvm-shadow); }
.dip-btn--outline { background: transparent; color: var(--fvm-primary); border: 1.5px solid var(--fvm-border); }
.dip-btn--outline:hover { background: var(--fvm-bg); border-color: var(--fvm-primary); }
.dip-btn--ghost { background: transparent; color: var(--fvm-text-muted); border: 1.5px solid var(--fvm-border); }
.dip-btn--ghost:hover { color: var(--fvm-text); background: var(--fvm-bg); }
.dip-actions--top { margin-bottom: 48px; }

.dip-doc-title { margin-top: 16px; margin-bottom: 24px; }

.dip-section-title {
  font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 600;
  color: var(--fvm-primary); margin-bottom: 14px; margin-top: 24px;
  display: flex; align-items: center; gap: 10px;
}
.dip-section-title::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--fvm-primary-light) 0%, transparent 100%); opacity: .25; border-radius: 2px; }
.dip-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 8px; }
.dip-card { background: var(--fvm-surface); border: 1px solid var(--fvm-border); border-radius: var(--fvm-radius); padding: 18px; display: flex; gap: 14px; align-items: flex-start; transition: var(--fvm-transition); }
.dip-card:hover { box-shadow: var(--fvm-shadow); transform: translateY(-2px); }
.dip-card__icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.dip-card__icon--blue   { background: #e8f0fe; }
.dip-card__icon--green  { background: #e8faf4; }
.dip-card__icon--amber  { background: #fef3e2; }
.dip-card__icon--purple { background: #f3e8fd; }
.dip-card__label { font-size: 10px; font-weight: 600; color: var(--fvm-text-muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px; }
.dip-card__value { font-size: 13px; font-weight: 500; color: var(--fvm-text); line-height: 1.4; }
.dip-card__value code { font-size: 12px; background: var(--fvm-bg); padding: 1px 6px; border-radius: 4px; }

.dip-error { max-width: 460px; margin: 40px auto; text-align: center; padding: 36px 28px; background: var(--fvm-surface); border: 1px solid var(--fvm-border); border-radius: 16px; box-shadow: var(--fvm-shadow); }
.dip-error__icon { font-size: 50px; margin-bottom: 14px; }
.dip-error__title { font-size: 20px; font-weight: 700; color: var(--fvm-error); margin-bottom: 8px; }
.dip-error__sub { color: var(--fvm-text-muted); font-size: 13px; line-height: 1.6; margin-bottom: 18px; }
.dip-error__code { background: var(--fvm-bg); border-radius: var(--fvm-radius-sm); padding: 9px 14px; font-family: monospace; font-size: 12px; color: var(--fvm-text); margin-bottom: 20px; }
.dip-back-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--fvm-primary); color: #fff; padding: 10px 22px; border-radius: var(--fvm-radius-sm); text-decoration: none; font-size: 13px; font-weight: 600; transition: var(--fvm-transition); }
.dip-back-btn:hover { background: var(--fvm-primary-light); }

.dip-footer { background: var(--fvm-surface); border-top: 1px solid var(--fvm-border); padding: 20px; text-align: center; font-size: 12px; color: var(--fvm-text-muted); margin-top: 16px; }
.dip-footer a { color: var(--fvm-primary-light); text-decoration: none; }
.dip-footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .dip-search__row { flex-direction: column; }
  .dip-status { flex-direction: column; }
  .dip-status__code { text-align: left; }
  .dip-row { grid-template-columns: 1fr 1fr; }
  .dip-actions { flex-direction: column; }
}
@media (max-width: 400px) {
  .dip-row { grid-template-columns: 1fr; }
}
