:root{
  /* ExoticDirect-inspired look: clean, airy, navy header + fresh green CTA */
  --navy: #0b3a5a;
  --navy-2: #072a40;
  --green: #a6ce39;
  --green-2: #8fbb26;

  --bg: #f4f6f9;
  --bg2: #eef2f6;
  --card: #ffffff;
  --text: #0c1b28;
  --muted: #5b6b7c;
  --line: #e2e8f0;

  --shadow: 0 16px 40px rgba(9, 30, 66, .14);
  --shadow2: 0 8px 22px rgba(9, 30, 66, .10);
  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(11,58,90,.10), transparent 60%),
    radial-gradient(900px 420px at 90% 10%, rgba(166,206,57,.12), transparent 55%),
    linear-gradient(180deg, #ffffff, var(--bg));
}

.bg{ display:flex; min-height: 100vh; }

a{ color: inherit; }

.muted{ color: var(--muted); }

h1{
  margin: 0 0 6px 0;
  font-size: 22px;
  letter-spacing: .2px;
  color: var(--navy);
}

pre{ margin:0; white-space:pre-wrap; word-break:break-word; }

/* Brand mark */
.logo-dot{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 6px rgba(11,58,90,.10), inset 0 0 0 3px var(--green);
}

/* Cards */
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-wrap{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.auth-card{
  width: 420px;
  padding: 24px;
}

.brand{
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.brand-title{
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--navy);
}

.brand-sub{
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.form{ display:flex; flex-direction:column; gap: 12px; }

.field label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px 0;
}

.field input, .input, select.input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  outline: none;
  box-shadow: 0 0 0 0 rgba(11,58,90,0);
  transition: .15s ease;
}

.field input:focus, .input:focus{
  border-color: rgba(11,58,90,.45);
  box-shadow: 0 0 0 4px rgba(11,58,90,.10);
}

/* Buttons */
.btn{
  cursor: pointer;
  border: 1px solid rgba(11,58,90,.22);
  background: #fff;
  color: var(--navy);
  padding: 10px 14px;
  border-radius: 12px;
  transition: .15s ease;
}

.btn:hover{ background: rgba(11,58,90,.06); }
.btn:disabled{ opacity: .6; cursor: not-allowed; }

.btn.primary{
  background: var(--green);
  border-color: rgba(0,0,0,0);
  color: #0a2230;
  font-weight: 800;
  box-shadow: var(--shadow2);
}

.btn.primary:hover{ background: var(--green-2); }

.btn.small{ padding: 7px 10px; border-radius: 10px; font-size: 13px; }

.msg{ min-height: 18px; font-size: 13px; margin-top: 4px; }
.msg.error{ color: #b42318; }
.msg.success{ color: #067647; }

.hint{ margin-top: 14px; font-size: 12px; color: var(--muted); }

/* Top bar */
.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  border-bottom: 1px solid rgba(255,255,255,.14);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left{ display:flex; gap: 14px; align-items: center; }

.topbar-title{ font-weight: 900; letter-spacing: .2px; color: #fff; }

.topbar-sub{ font-size: 12px; color: rgba(255,255,255,.78); margin-top: 2px; }

.topbar .btn{ border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); color:#fff; }
.topbar .btn:hover{ background: rgba(255,255,255,.14); }

/* Layout */
.container{ max-width: 1160px; margin: 22px auto; padding: 0 18px; }

.panel{
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow2);
}

.panel-head{
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 6px 6px 14px 6px;
}

.controls{ display:flex; gap: 10px; align-items: center; }
.controls .input{ min-width: 260px; }

/* Table */
.table-wrap{ overflow:auto; border-radius: 14px; border: 1px solid var(--line); }

.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: #fff;
}

.table th, .table td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.table th{
  position: sticky;
  top: 0;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.table tr:hover td{ background: rgba(11,58,90,.04); }

/* Pager */
.pager{
  display:flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 6px 4px 6px;
}

.page-pill{
  display: inline-block;
  min-width: 40px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11,58,90,.18);
  background: rgba(166,206,57,.22);
  color: var(--navy);
  font-weight: 800;
}

/* Modal */
.modal{ display:none; }
.modal.open{ display:block; }

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .55);
}

.modal-card{
  position: fixed;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 28px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-head{
  display:flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-title{ font-weight: 900; color: var(--navy); }
.modal-body{ padding: 14px; }

.kv{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kv > div{
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244,246,249,.75);
}

.kv span{ display:block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }

.notes{ margin-top: 12px; }

.notes pre{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(244,246,249,.75);
}

@media (max-width: 760px){
  .controls{ flex-direction: column; align-items: stretch; }
  .controls .input{ min-width: unset; }
  .kv{ grid-template-columns: 1fr; }
}

/* ── ExoticDirect logo branding ───────────────────────────── */
.brand-logo{
  width: 150px;
  max-width: 45%;
  height: auto;
  display: block;
}

.topbar-logo{
  width: 132px;
  height: auto;
  display: block;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(9,30,66,.12);
}

@media (max-width: 640px){
  .topbar-logo{ width: 104px; }
  .brand-logo{ width: 124px; }
}
