/* =================================================================
   Tabz.dk — Light Theme (Teal accent)
   ================================================================= */

:root {
  --bg:        #0f172a;
  --bg-2:      #111827;
  --surface:   #1e293b;
  --surface-2: #273449;
  --surface-3: #334155;
  --border:    #334155;
  --border-2:  #475569;
  --accent:    #2dd4bf;
  --accent-h:  #5eead4;
  --accent-d:  #14b8a6;
  --text:      #e2e8f0;
  --text-2:    #cbd5e1;
  --muted:     #94a3b8;
  --danger:    #f87171;
  --success:   #34d399;
  --warning:   #fbbf24;
  --radius:    8px;
  --radius-sm: 5px;
  --shadow:    0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  padding: 0;
}

td, tr, table, div, span, font, p, pre, h1, h2, h3, h4, h5, h6, form {
  color: inherit;
  font-family: inherit;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover, a:active, a:focus { color: var(--accent-d); text-decoration: none; }
a:visited { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  margin-top: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.8rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.9rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.8rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
h4 { font-size: 1rem; }

p { margin: 0 0 1rem 0; }

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  overflow-x: auto;
}

img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
strong, b { color: var(--text); font-weight: 600; }
small { color: var(--text-2); }

/* ---- Navbar ---- */
.navbar-dark-custom {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow);
}
.navbar-dark-custom .navbar-brand {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent) !important;
  letter-spacing: -1px;
}
.navbar-dark-custom .navbar-brand span { color: var(--text); }
.navbar-dark-custom .nav-link {
  color: var(--text-2) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.navbar-dark-custom .nav-link:hover,
.navbar-dark-custom .nav-link.active {
  color: var(--accent) !important;
  background: var(--surface-2);
}
.navbar-dark-custom .dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px;
}
.navbar-dark-custom .dropdown-item {
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}
.navbar-dark-custom .dropdown-item:hover { background: var(--surface-2); color: var(--accent); }
.navbar-dark-custom .dropdown-divider { border-color: var(--border); }
.navbar-dark-custom .form-control {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.navbar-dark-custom .form-control:focus {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: none;
}
.btn-search {
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 600;
}
.btn-search:hover { background: var(--accent-d); color: #fff; }
.navbar-toggler { border-color: var(--border); }

/* ---- Page wrapper ---- */
#page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

/* ---- Cards ---- */
.card-dark {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.card-dark h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Tables ---- */
.table {
  color: var(--text);
  margin-bottom: 0;
  width: 100%;
}
.table thead th {
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 10px;
}
.table td, .table th {
  border-color: var(--border) !important;
  border-top: none !important;
  padding: 9px 12px;
  vertical-align: middle;
  background: transparent !important;
  color: var(--text) !important;
}
.table-hover tbody tr:hover td { color: var(--accent-d) !important; }
.table-hover tbody tr { transition: background .15s; }
.table-hover tbody tr:hover { background: var(--surface-2) !important; cursor: pointer; }
.table-striped tbody tr:nth-of-type(odd) { background: rgba(15,23,42,0.025) !important; }
.table-striped tbody tr:nth-of-type(odd):hover { background: var(--surface-2) !important; }
tr.clickableRow { cursor: pointer; }

.rank-num {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  min-width: 34px;
  display: inline-block;
}

/* ---- Buttons ---- */
.btn-accent, .btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all .15s;
  display: inline-block;
  text-decoration: none !important;
  cursor: pointer;
}
.btn-accent:hover, .btn-primary:hover {
  background: var(--accent-d) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 7px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all .15s;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline-accent:hover { background: var(--accent); color: #fff; text-decoration: none; }
.btn-danger-custom {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}
.btn-danger-custom:hover { background: #b91c1c; color: #fff; }

.list-group-item {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 12px 18px;
  transition: all .15s;
}
.list-group-item:hover {
  background: var(--surface-2) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* ---- Alerts ---- */
.alert-dark-success, .alert-success {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #065f46 !important;
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
}
/* Sørg for at <strong>/<b> arver alertens farve i stedet for det globale lyse tema. */
.alert-dark-success strong, .alert-dark-success b,
.alert-success strong, .alert-success b,
.alert-dark-info strong, .alert-dark-info b,
.alert-danger strong, .alert-danger b { color: inherit !important; }
.alert-dark-info {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #115e59;
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
}
.alert-danger {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #991b1b !important;
  border-radius: var(--radius);
}

/* ---- Tab display (se.php) ---- */
.tab-view {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.tab-header h2 { margin: 0; color: var(--text); font-size: 1.4rem; }
.tab-meta { color: var(--text-2); font-size: 0.85rem; text-align: right; }
.tab-meta a { color: var(--accent); }
.tab-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.7;
  padding: 24px;
  overflow-x: auto;
}
.tab-admin-actions { display: flex; gap: 10px; margin: 16px 0; }

/* Legacy .trad */
.trad {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  width: auto !important;
  font-size: 1rem !important;
}
.trad table { width: 100%; }
.trad b { color: var(--text); }

.tab_info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  width: 100% !important;
  font-size: 0.9rem;
}

.dato {
  font-size: 0.8rem !important;
  color: var(--muted) !important;
  text-align: right;
  margin: 0 !important;
  font-family: inherit !important;
}

/* ---- Forms ---- */
.form-control, textarea, input[type="text"], input[type="email"],
input[type="password"], input[type="number"], input[type="url"],
input[type="search"], input[type="tel"], select {
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
}
.form-control:focus, textarea:focus, input:focus, select:focus {
  border-color: var(--accent) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
}
input[type="submit"], input[type="button"], button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
input[type="submit"]:hover, input[type="button"]:hover, button:hover { background: var(--accent-d); }

label {
  color: var(--text-2) !important;
  font-size: 0.9rem;
  font-weight: 500;
  float: none !important;
  width: auto !important;
  margin-bottom: 6px;
  display: block;
}

#t4, #t5, #t6, #t7 {
  width: 100% !important;
  max-width: 100%;
  font-family: 'JetBrains Mono', 'Consolas', monospace !important;
  font-size: 14px;
}
#t5 { height: 320px; overflow: auto; }
#t7 { height: 90px; overflow: auto; }

#submit, #login, #search, #sogknap {
  width: auto !important;
  background: var(--accent) !important;
  border: none !important;
  color: #fff !important;
  padding: 7px 18px;
  border-radius: var(--radius-sm);
}

.form-row { margin-bottom: 16px; }

/* ---- Pagination ---- */
.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.pagination-bar a {
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.88rem;
  transition: all .15s;
}
.pagination-bar a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}
.pagination-bar .current { padding: 7px 14px; color: var(--text); font-weight: 600; font-size: 0.88rem; }
.pagination-bar .disabled { padding: 7px 14px; color: var(--muted); font-size: 0.88rem; }

/* ---- Footer ---- */
#site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 32px 20px 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.88rem;
  margin-top: 50px;
}
#site-footer a { color: var(--text-2); }
#site-footer a:hover { color: var(--accent); }
#site-footer .footer-links {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
#site-footer p { margin: 0; color: var(--muted); }

/* ---- Forum ---- */
.forum-header, .subject {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  font-size: 13px;
  padding: 10px 14px;
}
.light { background: var(--surface) !important; color: var(--text-2) !important; }
.dark { background: var(--surface-2) !important; color: var(--text-2) !important; }
.messages { background: var(--surface) !important; color: var(--text) !important; font-size: 14px; padding: 14px; }
.border { border: 1px solid var(--border) !important; color: var(--text) !important; }
.header { border: 1px solid var(--border) !important; background: var(--surface-2) !important; color: var(--accent) !important; }
.bodyfont { color: var(--text) !important; }
.bodymain { color: var(--text) !important; font-weight: 600; }

/* ---- Comments ---- */
.comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.comment-author { color: var(--accent); font-weight: 600; font-size: 0.85rem; }

/* ---- Theme preview gallery ---- */
.theme-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.theme-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.theme-card img { border-radius: var(--radius-sm); width: 100%; height: auto; display: block; }
.theme-card h4 { margin: 12px 0 4px; color: var(--accent); }
.theme-card p { color: var(--text-2); font-size: 0.85rem; margin: 0; }

/* ---- Utilities ---- */
.text-muted { color: var(--text-2) !important; }
.center { text-align: center; }
.spacing { padding-top: 10px; padding-bottom: 10px; }
#underborder { border-bottom: 1px solid var(--border); }

.card, .panel { background: var(--surface); border-color: var(--border); color: var(--text); }
.card-body { background: var(--surface); }

.navbar-default { background: var(--bg-2) !important; border: none !important; box-shadow: var(--shadow); }
.navbar-default .navbar-nav > li > a { color: var(--text) !important; }
.navbar-default .navbar-nav > li > a:hover { color: var(--accent) !important; }

#heleindholdet { padding: 0 !important; }
#indhold { padding: 0 !important; margin: 0 !important; width: auto !important; }
#bund { display: none; }
#header img { display: none; }

#sendbesked {
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 12px;
  border-radius: var(--radius-sm);
  width: 100%;
}

@media (max-width: 768px) {
  #page-wrapper { padding: 18px 14px 40px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .card-dark { padding: 16px; }
  .tab-view { padding: 16px; }
  .tab-content pre { padding: 14px; font-size: 13px; }
}

#fb-root, .fb-like, .fb-share-button { display: none !important; }
.adsbygoogle { background: transparent !important; border: 1px solid var(--border); border-radius: var(--radius); margin: 12px 0; }
