/* =========================
   Root + Reset
========================= */
:root{
  --bg:#0b1220;
  --card:#101920;
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.72);
  --line:rgba(255,255,255,.12);
  --radius:16px;
  --accent:#00d1c6;
}

.table th:nth-child(2),
.table td:nth-child(2){
  outline:2px dashed rgba(255,255,255,.35);
}


@media (max-width:720px){
  .table th:nth-child(4),
  .table td:nth-child(4){
    display:none;
  }
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  min-height:100%;
}

body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(255,255,255,.05), transparent 55%),
    var(--bg);
  color:var(--text);
}

/* =========================
   Layout
========================= */
.wrap{
  max-width:980px;
  margin:0 auto;
  padding:26px 16px;
}

header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:16px;
}

h1{
  margin:0;
  font-size:22px;
  letter-spacing:.2px;
}

h2{
  margin:0;
  font-size:16px;
}

.sub{
  margin:6px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

/* =========================
   Cards + Grid
========================= */
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 16px 40px rgba(0,0,0,.35);
  overflow:hidden;
}

.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  padding:16px;
}

@media (min-width:860px){
  .grid{
    grid-template-columns:1.1fr .9fr;
  }
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

/* =========================
   Forms
========================= */
label{
  font-size:13px;
  color:var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"]{
  width:100%;
  max-width:520px;
  background:rgba(0,0,0,.22);
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  color:var(--text);
  outline:none;
}

input:focus{
  border-color:rgba(255,255,255,.28);
}

button{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  font-size:14px;
}

button:hover{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.18);
}

/* =========================
   Messages
========================= */
.msg{
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  color:var(--muted);
  font-size:14px;
}

/* =========================
   Links
========================= */
a{
  color:var(--accent);
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

.small{
  font-size:12px;
  color:var(--muted);
}

/* =========================
   Table (Dashboard)
========================= */
.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  padding:10px 8px;
  border-top:1px solid var(--line);
  text-align:left;
  font-size:13px;
  vertical-align:middle;
}

.table th{
  white-space:nowrap;
}

/* Destination cell behavior */
.table td.urlcell{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:1px; /* allows ellipsis to actually trigger in auto tables */
  color:var(--text) !important;
}

/* Desktop and up: let the browser size columns correctly */
@media (min-width:721px){
  .table{
    table-layout:auto; /* key fix */
  }

  /* Stable column widths for non-destination columns */
  .table th:nth-child(1),
  .table td:nth-child(1){
    width:240px;
    white-space:nowrap;
  }

  .table th:nth-child(3),
  .table td:nth-child(3){
    width:90px;
    text-align:center;
    white-space:nowrap;
  }

  .table th:nth-child(4),
  .table td:nth-child(4){
    width:180px;
    white-space:nowrap;
  }

  /* Make sure Destination never collapses */
  .table th:nth-child(2),
  .table td:nth-child(2){
    min-width:360px;
  }
}

/* Mobile: keep it tight and clean (your current good behavior) */
@media (max-width:720px){
  .table{
    table-layout:fixed;
  }

  .table th:nth-child(1),
  .table td:nth-child(1){ width:200px; }

  .table th:nth-child(3),
  .table td:nth-child(3){ width:80px; text-align:center; }

  .table th:nth-child(4),
  .table td:nth-child(4){ display:none; } /* optional, keeps mobile clean */
}




/* =========================
   Badges + Copy Button
========================= */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  font-size:12px;
  color:var(--muted);
}

.btn-copy{
  margin-left:6px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:6px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:12px;
  white-space:nowrap;
}

.btn-copy:hover{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.18);
}

/* =========================
   Footer
========================= */
.footer{
  margin-top:18px;
  text-align:center;
  font-size:13px;
  color:var(--muted);
}

.footer a{
  color:#00d1c6;
  font-weight:600;
}

.footer a:hover{
  color:#2fffea;
  text-decoration:underline;
}
