:root {
  --ef-primary:   #1a5276;
  --ef-accent:    #2980b9;
  --ef-success:   #1e8449;
  --ef-warning:   #d68910;
  --ef-danger:    #c0392b;
  --ef-muted:     #7f8c8d;
  --ef-sidebar:   #1a2840;
  --sidebar-w:    240px;
}

/* ── Layout ──────────────────────────────────────────────── */
body { background: #f4f6f9; font-size: 0.9rem; }

.ef-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--ef-sidebar);
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.ef-sidebar .brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
}
.ef-sidebar .brand img { height: 30px; margin-right: .5rem; }
.ef-sidebar .brand span { color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; }

.ef-sidebar .nav-link {
  color: rgba(255,255,255,.7);
  border-radius: 6px;
  margin: 2px 12px;
  padding: .55rem 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  transition: background .15s, color .15s;
}
.ef-sidebar .nav-link:hover,
.ef-sidebar .nav-link.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.ef-sidebar .nav-link i { font-size: 1rem; width: 20px; text-align: center; }

.ef-sidebar .sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.45);
  font-size: .75rem;
}

.ef-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ef-topbar {
  background: #fff;
  border-bottom: 1px solid #e3e8ef;
  padding: .75rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.ef-topbar h1 { font-size: 1.15rem; font-weight: 600; margin: 0; color: var(--ef-primary); }

.ef-content { padding: 1.75rem; flex: 1; }

/* ── Cards ───────────────────────────────────────────────── */
.card { border: 1px solid #e3e8ef; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.card-header { background: #fff; border-bottom: 1px solid #e3e8ef; font-weight: 600; }

.stat-card {
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e3e8ef;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.stat-card .icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { font-size: .78rem; color: var(--ef-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ── Status badges ───────────────────────────────────────── */
.badge-accepted  { background: #d4efdf; color: var(--ef-success); }
.badge-error     { background: #fadbd8; color: var(--ef-danger); }
.badge-rejected  { background: #fde8d8; color: var(--ef-warning); }
.badge-pending,
.badge-processing{ background: #d6eaf8; color: var(--ef-accent); }
.badge-completed { background: #d4efdf; color: var(--ef-success); }
.badge-partial   { background: #fdebd0; color: var(--ef-warning); }
.badge-failed    { background: #fadbd8; color: var(--ef-danger); }

/* ── Drop zone ───────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed #b0bec5;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fafcfe;
}
.drop-zone.dragover {
  border-color: var(--ef-accent);
  background: #eaf4fb;
}
.drop-zone .drop-icon { font-size: 2.5rem; color: #90a4ae; margin-bottom: .75rem; }
.drop-zone.has-file { border-color: var(--ef-success); background: #f0faf4; }
.drop-zone.has-file .drop-icon { color: var(--ef-success); }

/* ── Progress bar ────────────────────────────────────────── */
.batch-progress-bar { height: 8px; border-radius: 4px; }

/* ── Table ───────────────────────────────────────────────── */
.table-hover tbody tr:hover { background: #f0f4f8; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ef-muted); }

/* ── Tabs ────────────────────────────────────────────────── */
.nav-tabs .nav-link { color: var(--ef-muted); border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: .6rem 1.25rem; }
.nav-tabs .nav-link.active { color: var(--ef-primary); border-bottom-color: var(--ef-primary); font-weight: 600; }
.nav-tabs { border-bottom: 1px solid #dee2e6; }

/* ── Form ────────────────────────────────────────────────── */
.form-label { font-weight: 500; font-size: .82rem; }
.form-section-title { font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ef-muted); padding-bottom: .4rem; border-bottom: 1px solid #e3e8ef; margin: 1.5rem 0 1rem; }

/* ── Toast / alert ───────────────────────────────────────── */
.ef-alert { border-radius: 8px; font-size: .87rem; }

/* ── MF code display ─────────────────────────────────────── */
.mf-code { font-family: monospace; font-size: .9rem; letter-spacing: .05em; }

/* ── Loading overlay ─────────────────────────────────────── */
#loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: .75rem;
}
#loading-overlay.show { display: flex; }
#loading-overlay .spinner-border { width: 3rem; height: 3rem; color: var(--ef-accent); }

/* ── Cert validity pill ──────────────────────────────────── */
.cert-valid   { color: var(--ef-success); }
.cert-expiring{ color: var(--ef-warning); }
.cert-expired { color: var(--ef-danger); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--ef-muted); }
.empty-state i { font-size: 3rem; display: block; margin-bottom: 1rem; opacity: .4; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .ef-sidebar { width: 100%; min-height: auto; position: relative; }
  .ef-main { margin-left: 0; }
}
