/* ==========================================================================
   Glass Suite — tema glassmorphism untuk YOURLS
   Dimuat setelah style.css bawaan, jadi cukup menimpa.
   ========================================================================== */

:root {
  --ink: #090c24;
  --text: #eef1ff;
  --muted: #aab3dc;
  --link: #8fe9de;
  --accent: #8b7bff;
  --accent-2: #35e0cf;
  --danger: #ff6b81;
  --ok: #4ee3a0;
  --warn: #ffc65c;

  --glass: rgba(255, 255, 255, .08);
  --glass-2: rgba(255, 255, 255, .14);
  --edge: rgba(255, 255, 255, .22);
  --edge-soft: rgba(255, 255, 255, .10);
  --field: rgba(7, 9, 33, .45);
  --shadow: 0 30px 80px rgba(3, 5, 25, .55);
  --sheen: inset 0 1px 0 rgba(255, 255, 255, .28);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Dasar ---------- */
html { min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  text-align: center;
  margin: 0;
  padding: 28px 16px 40px;
  min-height: 100vh;
  background:
    radial-gradient(58vw 52vw at 10% 6%,  rgba(124, 92, 255, .60), transparent 62%),
    radial-gradient(48vw 44vw at 92% 12%, rgba(34, 211, 197, .42), transparent 62%),
    radial-gradient(56vw 50vw at 72% 98%, rgba(255, 110, 140, .30), transparent 64%),
    radial-gradient(40vw 40vw at 4% 92%,  rgba(70, 120, 255, .30), transparent 62%),
    var(--ink);
  background-attachment: fixed;
}
div, p, td, th, li, label, small, span { font-family: var(--font); }
div, p, td { font-size: 14px; }

a, a:link, a:visited, a:active { color: var(--link); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

h2 { font-size: 24px; font-weight: 700; letter-spacing: -.015em; margin: 8px 0 14px; color: #fff; }
h3 { font-size: 16px; font-weight: 600; color: #fff; margin: 0 0 10px; }
strong { font-weight: 600; }

code { background: rgba(255,255,255,.12); color: #c8fbf4; padding: 1px 6px; border-radius: 6px; }
tt   { background: rgba(255,198,92,.18); color: #ffe3a6; padding: 1px 6px; border-radius: 6px; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- Panel kaca utama ---------- */
#wrap {
  max-width: 1040px;
  min-height: 150px;
  margin: 0 auto;
  padding: 20px 30px 30px;
  text-align: left;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  backdrop-filter: blur(24px) saturate(165%);
  border: 1px solid var(--edge);
  border-radius: 30px;
  box-shadow: var(--shadow), var(--sheen);
}

/* ---------- Header & menu ---------- */
h1 { margin: 0; float: right; max-width: 480px; }
h1 a { float: right; font-size: 12px; line-height: 1.4; text-align: right; }
h1 a, h1 a:link, h1 a:active, h1 a:visited { color: var(--muted); }
h1 a:hover { text-decoration: none; }
h1 a:hover span { color: #fff; text-decoration: none; }
#yourls-logo {
  width: 230px;
  margin-top: 6px;
  filter: brightness(1.55) saturate(1.15) drop-shadow(0 6px 22px rgba(139, 123, 255, .55));
}

ul#admin_menu {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-height: 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
ul#admin_menu li { color: var(--muted); padding: 0; position: relative; }
ul#admin_menu li:hover { list-style: none; color: #fff; }

#admin_menu_logout_link {
  flex-basis: 100%;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}
#admin_menu_logout_link strong { color: #fff; }

ul#admin_menu li.admin_menu_toplevel > a {
  display: block;
  padding: 7px 16px;
  color: var(--text);
  background: var(--glass-2);
  border: 1px solid var(--edge);
  border-radius: 999px;
  box-shadow: var(--sheen);
  transition: background .18s ease, border-color .18s ease;
}
ul#admin_menu li.admin_menu_toplevel > a:hover,
ul#admin_menu li.admin_menu_toplevel:focus-within > a {
  background: rgba(255, 255, 255, .24);
  border-color: rgba(255, 255, 255, .45);
  text-decoration: none;
  color: #fff;
}
ul#admin_menu li ul {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(20, 22, 62, .72);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--edge);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(3, 5, 25, .6);
}
ul#admin_menu li:hover > ul,
ul#admin_menu li:focus-within > ul { display: block; }
ul#admin_menu li ul li { padding: 0; }
ul#admin_menu li ul li a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text);
  white-space: nowrap;
}
ul#admin_menu li ul li a:hover { background: rgba(255,255,255,.14); text-decoration: none; }

/* ---------- Form ---------- */
input, textarea { border-radius: 12px; }
body input.text, body select, body textarea,
body input[type=text], body input[type=password], body input[type=url],
body input[type=search], body input[type=number], body input[type=date] {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background-color: var(--field);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 9px 13px;
  margin: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25);
  transition: border-color .15s ease, box-shadow .15s ease;
}
body select option { background: #151842; color: var(--text); }
body input.text::placeholder, body input[type=text]::placeholder { color: rgba(238, 241, 255, .45); }
body input.text:focus, body textarea:focus, body select:focus,
body input[type=text]:focus, body input[type=password]:focus {
  border: 1px solid var(--accent-2);
  margin: 2px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(53, 224, 207, .25), inset 0 1px 3px rgba(0, 0, 0, .25);
}

body input.button, body button, body input[type=submit], body input[type=button] {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--glass-2);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 9px 18px;
  cursor: pointer;
  box-shadow: var(--sheen);
  transition: background .15s ease, transform .1s ease;
}
body input.button:hover, body button:hover, body input[type=submit]:hover, body input[type=button]:hover {
  background: rgba(255, 255, 255, .26);
}
body input.button:active { transform: translateY(1px); }
body input.primary, body input.button.primary, body #add-button {
  border: 1px solid rgba(255, 255, 255, .45);
  background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,0) 60%), var(--accent);
}
body input.primary:hover, body #add-button:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,.04) 60%), #9b8dff;
}

/* ---------- Tambah URL ---------- */
#new_url {
  text-align: center;
  clear: both;
  padding: 6px;
  margin-top: 6px;
  background: var(--glass);
  border: 1px solid var(--edge-soft);
  border-radius: 22px;
  box-shadow: var(--sheen);
}
#new_url div { background: transparent; padding: 6px; }
#new_url_form { padding: 6px; }
#new_url_form label { color: var(--muted); }
#new_url_form label strong { color: #fff; }
#add-url { width: min(100%, 420px); }
#new_url #feedback {
  width: auto;
  margin: 8px 12% 4px;
  padding: 10px 14px;
  color: #d9ffee;
  background: rgba(78, 227, 160, .14);
  border: 1px solid rgba(78, 227, 160, .45);
  border-radius: 14px;
}
#new_url #feedback .fail { color: #ffc7d0; }
#new_url #feedback a { color: #fff; font-weight: 600; }

/* ---------- Tabel ---------- */
table.tblSorter {
  font-family: var(--font);
  font-size: 13px;
  width: 100%;
  margin: 14px 0 0;
  text-align: left;
  color: var(--text);
  background: transparent;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--edge-soft);
  border-radius: 18px;
  overflow: hidden;
}
table.tblSorter thead tr th,
table.tblSorter tfoot tr th,
table.tblSorter th.header {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding: 11px 12px;
  background-color: rgba(255, 255, 255, .13);
  border: 0;
  border-bottom: 1px solid var(--edge-soft);
}
table.tblSorter tfoot tr th { background-color: rgba(255, 255, 255, .08); border-top: 1px solid var(--edge-soft); border-bottom: 0; }
table.tblSorter tfoot tr { background: transparent; }
table.tblSorter thead tr .tablesorter-header {
  background-image: none;
  position: relative;
  padding-right: 24px;
  cursor: pointer;
}
table.tblSorter thead tr .tablesorter-header::after {
  content: "↕";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .45;
  font-size: 12px;
}
table.tblSorter thead tr .sorter-false { cursor: default; }
table.tblSorter thead tr .sorter-false::after { content: none; }
table.tblSorter thead tr .tablesorter-headerAsc,
table.tblSorter thead tr .tablesorter-headerDesc { background-image: none; background-color: rgba(139, 123, 255, .35); }
table.tblSorter thead tr .tablesorter-headerAsc::after  { content: "↑"; opacity: 1; }
table.tblSorter thead tr .tablesorter-headerDesc::after { content: "↓"; opacity: 1; }

table.tblSorter tbody td {
  color: var(--text);
  padding: 11px 12px;
  background-color: transparent;
  border-bottom: 1px solid var(--edge-soft);
  vertical-align: middle;
}
table.tblSorter tbody tr:last-child td { border-bottom: 0; }
table.tblSorter tbody tr.normal-row td { background: rgba(255, 255, 255, .035); }
table.tblSorter tbody tr.normal-row:hover td,
table.tblSorter tbody tr.alt-row:hover td { background-color: rgba(255, 255, 255, .11); }
td.url small a, td.url small { color: var(--muted); }
td.url a { word-break: break-word; }
tr.edit-row td { background: rgba(139, 123, 255, .20) !important; }
#main_table tfoot th, #main_table tfoot th div { font-size: 12px; }

/* tombol aksi per baris: chip terang agar ikon gelap tetap terbaca */
body td.actions .button {
  width: 28px;
  height: 28px;
  margin: 0 6px 0 0;
  padding: 0;
  background-color: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 9px;
  box-shadow: none;
}
body td.actions .button:hover { background-color: #fff; }
body td.actions .button.disabled, body #add-button.disabled { background-color: rgba(255,255,255,.3); border-color: var(--edge); }
body td.actions .button.loading, body #add-button.loading { background-color: rgba(255,255,255,.7); }

/* ---------- Filter & paginasi ---------- */
#filter_form, #filter_buttons, #pagination { color: var(--muted); }
.navigation .nav_link a, .navigation .nav_current {
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--edge-soft);
  border-radius: 9px;
  padding: 4px 8px;
}
.navigation .nav_current { background: none; border: 0; }
.navigation .nav_link a:hover {
  background: rgba(255, 255, 255, .2);
  border-color: var(--edge);
  text-decoration: none;
}

/* ---------- Notifikasi ---------- */
.error, .warning, .success {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid;
}
.error   { color: #ffd2d9; background: rgba(255, 107, 129, .16); border-color: rgba(255, 107, 129, .45); }
.warning { color: #ffe5ae; background: rgba(255, 198, 92, .16);  border-color: rgba(255, 198, 92, .45); }
.success { color: #cffbe6; background: rgba(78, 227, 160, .15);  border-color: rgba(78, 227, 160, .45); }

.jquery-notify-bar {
  width: auto;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  min-width: min(92vw, 420px);
  max-width: 92vw;
  padding: 14px 40px 14px 20px;
  font-family: var(--font);
  font-size: 14px;
  color: #fff;
  background: rgba(20, 22, 62, .72);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--edge);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(3, 5, 25, .6);
  opacity: 1;
  text-shadow: none;
}
.jquery-notify-bar.error, .jquery-notify-bar.fail { color: #ffd2d9; background: rgba(90, 20, 40, .72); border-color: rgba(255,107,129,.5); }
.jquery-notify-bar.success { color: #cffbe6; background: rgba(10, 70, 55, .72); border-color: rgba(78,227,160,.5); }
.notify-bar-close { left: auto; right: 14px; top: 14px; color: var(--muted); }

.notice {
  width: auto;
  margin: 0 0 8px;
  padding: 10px 16px;
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: 14px;
}

/* ---------- Login ---------- */
body.login #wrap { max-width: 440px; margin-top: 8vh; padding: 26px 30px 34px; }
body.login h1 { float: none; max-width: none; text-align: center; }
body.login h1 a { float: none; display: block; text-align: center; }
body.login #yourls-logo { width: 220px; }
#login { max-width: 100%; margin: 18px auto 0; }
#login p { font-weight: 600; margin: 0 0 14px; }
#login label { color: var(--muted); font-weight: 500; }
#login .text { width: 100%; box-sizing: border-box; margin: 6px 0 0; }
#login input[type=submit] { width: 100%; margin-top: 4px; padding: 11px; }
#login p.error { font-weight: 500; }
#login ul { padding-left: 0; list-style: none; }
#login ul li { padding: 0 0 5px 22px; }

/* ---------- Halaman bantu (tools, plugins, infos) ---------- */
.sub_wrap { max-width: 640px; padding-bottom: 30px; text-align: left; }
.sub_wrap span { background: rgba(255, 198, 92, .2); color: #ffe3a6; padding: 0 5px; border-radius: 5px; }

a.bookmarklet {
  display: inline-block;
  margin: 4px;
  padding: 9px 14px 9px 34px;
  color: #fff;
  background: var(--glass-2) url(../images/favicon.svg) 10px center no-repeat;
  border: 1px solid var(--edge);
  border-radius: 12px;
  box-shadow: var(--sheen);
}
a.bookmarklet:hover { text-decoration: none; background-position: 10px center; background-color: rgba(255,255,255,.26); }

tr.plugin.active a { font-weight: 700; }
tr.plugin.active td { background: rgba(78, 227, 160, .08) !important; }

#tabs ul#headers { border-bottom: 1px solid var(--edge-soft); padding: 12px 5px 8px; }
#tabs ul#headers li a, #stats_lines li a {
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
  padding: 8px 14px;
}
#tabs ul#headers li a:hover, #stats_lines li a:hover { background: rgba(255,255,255,.2); text-decoration: none; }
#tabs ul#headers li a.selected, #stats_lines li a.selected,
#tabs ul#headers li a.selected:hover, #stats_lines li a.selected:hover {
  background: rgba(139, 123, 255, .5);
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
}
ul.toggle_display { border-bottom: 1px solid var(--edge-soft); }
div.share { background: var(--glass); border: 1px solid var(--edge); border-radius: 16px; }

.datepicker { border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; box-shadow: 0 18px 50px rgba(3,5,25,.6); }

/* ---------- Dialog hapus ---------- */
#delete-confirm-dialog {
  width: min(92vw, 640px);
  height: auto;
  padding: 0;
  color: var(--text);
  background: rgba(20, 22, 62, .78);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--edge);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(3, 5, 25, .7), var(--sheen);
}
#delete-confirm-dialog > div[name="dialog_title"] {
  font-size: 18px; font-weight: 600; color: #fff; text-align: center;
  padding: 16px 12px;
  background: rgba(255, 255, 255, .08);
  border-radius: 23px 23px 0 0;
}
#delete-confirm-dialog div.confirm-message {
  background: transparent; width: auto; height: auto; padding: 18px 26px; overflow: visible; text-align: left;
}
#delete-confirm-dialog div.confirm-message ul { border-left: 3px solid var(--accent-2); }
#delete-confirm-dialog div.confirm-message ul li span {
  color: var(--text); background: rgba(255,255,255,.08); border: 1px solid var(--edge-soft); border-radius: 7px; padding: 2px 8px;
}
#delete-confirm-dialog div.button-group {
  background: rgba(255, 255, 255, .05); width: auto; height: auto; padding: 14px 26px;
  border-radius: 0 0 23px 23px; text-align: right;
}
#delete-confirm-dialog::backdrop { background: rgba(5, 7, 25, .6); opacity: 1; backdrop-filter: blur(6px); }

/* ---------- Footer ---------- */
#footer { text-align: center; margin-top: 20px; }
#footer p {
  display: block;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px;
  color: var(--muted);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--edge-soft);
  border-radius: 999px;
}
#footer p a { background: url(../images/favicon.svg) 2px center no-repeat; padding-left: 28px; color: var(--link); }

/* ---------- Halaman Pengguna (plugin) ---------- */
.glass-users { max-width: 860px; }
.gu-card {
  margin: 0 0 18px;
  padding: 20px 22px;
  background: var(--glass);
  border: 1px solid var(--edge-soft);
  border-radius: 22px;
  box-shadow: var(--sheen);
}
.gu-scroll { overflow-x: auto; }
.gu-table { width: 100%; border-collapse: collapse; }
.gu-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--edge);
}
.gu-table td { padding: 12px 10px; vertical-align: top; border-bottom: 1px solid var(--edge-soft); }
.gu-table tr:last-child td { border-bottom: 0; }
.gu-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.gu-chip {
  display: inline-block; margin-left: 6px; padding: 1px 9px; font-size: 11px; font-weight: 600;
  color: #05261f; background: var(--accent-2); border-radius: 999px;
}
.gu-details summary {
  list-style: none; cursor: pointer; display: inline-block;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: #fff;
  background: var(--glass-2); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--sheen);
}
.gu-details summary::-webkit-details-marker { display: none; }
.gu-details[open] summary { background: rgba(139, 123, 255, .45); }
.gu-details .gu-form { margin-top: 12px; min-width: 260px; }
.gu-form label { display: block; margin: 0 0 12px; font-weight: 500; color: var(--muted); }
.gu-form label small { font-weight: 400; opacity: .8; }
.gu-form input.text, .gu-form select { display: block; width: 100%; box-sizing: border-box; margin: 6px 0 0; }
.gu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.gu-grid .gu-submit { grid-column: 1 / -1; }
body input.gu-danger { color: #ffd2d9; background: rgba(255, 107, 129, .2); border-color: rgba(255, 107, 129, .5); }
body input.gu-danger:hover { background: rgba(255, 107, 129, .38); }
.gu-alert { margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid; }
.gu-ok  { color: #cffbe6; background: rgba(78, 227, 160, .15);  border-color: rgba(78, 227, 160, .45); }
.gu-err { color: #ffd2d9; background: rgba(255, 107, 129, .16); border-color: rgba(255, 107, 129, .45); }
.gu-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Responsif ---------- */
@media (max-width: 760px) {
  body { padding: 12px 10px 28px; }
  #wrap { padding: 14px 14px 22px; border-radius: 22px; }
  h1, h1 a { float: none; text-align: left; max-width: none; }
  #yourls-logo { width: 170px; }
  table.tblSorter { display: block; overflow-x: auto; }
  #filter_form, #pagination { float: none; max-width: none; width: auto; text-align: left; }
  .gu-grid { grid-template-columns: 1fr; }
}

/* ---------- Fallback & aksesibilitas ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #wrap, #footer p { background: rgba(26, 28, 78, .88); }
  ul#admin_menu li ul, .jquery-notify-bar, #delete-confirm-dialog { background: rgba(20, 22, 62, .96); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
