/* ============================================================
   DMCA Reporter — Classic Professional Theme (Enhanced)
   Elegant navy · warm cream · gold accents · refined typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --navy: #152a45;
  --navy-mid: #1e3a5f;
  --navy-dark: #0f1c2e;
  --cream: #f6f2eb;
  --cream-dark: #ebe5db;
  --paper: #ffffff;
  --border: #d8d0c4;
  --border-light: #e8e2d8;
  --text: #1c1c1c;
  --muted: #5a574f;
  --accent: #2a4a7a;
  --accent-hover: #1e3a5f;
  --success: #2e7d32;
  --warning: #c47a00;
  --danger: #b71c1c;
  --gold: #a67c00;
  --gold-light: #d4a84b;
  --shadow-sm: 0 1px 3px rgba(15, 28, 46, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 28, 46, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 28, 46, 0.14);
  --radius: 4px;
  --transition: 0.18s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(166, 124, 0, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(30, 58, 95, 0.05) 0%, transparent 45%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 24px,
      rgba(15, 28, 46, 0.015) 24px,
      rgba(15, 28, 46, 0.015) 25px
    );
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  font-size: 15.5px;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* ========== Auth / Gate ========== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: linear-gradient(155deg, var(--navy-dark) 0%, var(--navy) 42%, #243b5c 100%);
  position: relative;
  overflow: hidden;
}

.auth-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(212, 168, 75, 0.12) 0%, transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

.auth-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
  max-width: 430px;
  padding: 42px 36px 36px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 1;
  border-radius: 2px;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
}

.auth-card h1 {
  font-size: 1.65rem;
  margin-bottom: 6px;
  text-align: center;
}

.auth-card .sub {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 26px;
  text-align: center;
  line-height: 1.45;
}

.auth-card .brand-mark {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 12px;
  color: var(--navy);
  line-height: 1;
}

/* ========== Layout ========== */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  background: linear-gradient(180deg, var(--navy-dark) 0%, #122033 100%);
  color: #e8eef5;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
}

.sidebar.open {
  z-index: 101;
}

.sidebar .brand {
  padding: 18px 14px 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.sidebar .brand span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-close {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background var(--transition);
}
.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b8c5d4;
  padding: 11px 14px;
  margin-bottom: 3px;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
  border-left-color: rgba(212, 168, 75, 0.5);
}

.sidebar nav a.active {
  background: rgba(42, 74, 122, 0.55);
  color: #fff;
  border-left-color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.sidebar .foot {
  flex-shrink: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 24, 0.55);
  z-index: 99;
  cursor: pointer;
  border: 0;
  padding: 0;
  margin: 0;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open {
  display: block !important;
}

body.menu-open {
  overflow: hidden;
  position: relative;
}

.main {
  flex: 1;
  margin-left: 248px;
  min-width: 0;
}

.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 110;
  box-shadow: var(--shadow-sm);
}

.topbar h2 {
  font-size: 1.28rem;
  font-weight: 600;
}

.content {
  padding: 26px 30px 40px;
  max-width: 1120px;
}

/* ========== Cards & Forms ========== */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  border-radius: 2px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-h {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #faf8f4 0%, #f5f1ea 100%);
  position: relative;
}

.card-h::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--gold);
}

.card-h h3 {
  font-size: 1.08rem;
  font-weight: 600;
}

.card-b {
  padding: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row.three {
  grid-template-columns: 1fr 1fr 1fr;
}

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

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 74, 122, 0.12);
}

.form-group textarea {
  min-height: 96px;
  resize: vertical;
}

.form-group .hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 5px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  line-height: 1.3;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy) 100%);
  color: #fff;
  border-color: var(--navy-dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 28, 46, 0.25);
}

.btn-secondary {
  background: linear-gradient(180deg, #f0ebe3 0%, #e4ded4 100%);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: linear-gradient(180deg, #e8e2d8 0%, #ddd6ca 100%);
}

.btn-success {
  background: linear-gradient(180deg, #388e3c 0%, var(--success) 100%);
  color: #fff;
  border-color: #1b5e20;
}
.btn-success:hover {
  filter: brightness(1.05);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(180deg, #c62828 0%, var(--danger) 100%);
  color: #fff;
  border-color: #8b0000;
}
.btn-danger:hover {
  filter: brightness(1.05);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--cream-dark);
  border-color: #c8bfb2;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
  text-align: center;
}

/* ========== Alerts ========== */
.alert {
  padding: 13px 16px;
  margin-bottom: 18px;
  border: 1px solid;
  font-size: 0.92rem;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-success {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #1b5e20;
}

.alert-error {
  background: #fceaea;
  border-color: #ef9a9a;
  color: #b71c1c;
}

.alert-info {
  background: #e8f0fe;
  border-color: #90caf9;
  color: #0d47a1;
}

/* ========== Stats ========== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 16px 12px;
  text-align: center;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-mid), var(--gold-light));
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat .num {
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.25;
  margin-bottom: 4px;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  padding: 0 4px;
  letter-spacing: -0.02em;
}

.stat .lbl {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

@media (max-width: 800px) {
  .stat .num {
    font-size: 1.12rem;
  }
  .stat {
    padding: 14px 10px;
  }
}

/* ========== Tables ========== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

th {
  background: #faf8f4;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

tr:hover td {
  background: #faf9f6;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 2px;
}

/* ========== Badges ========== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-pending {
  background: #fff4e5;
  color: #c45c00;
  border: 1px solid #ffe0b2;
}

.badge-sent {
  background: #e3f0ff;
  color: #1565c0;
  border: 1px solid #bbdefb;
}

.badge-replied {
  background: #f0e9ff;
  color: #4527a0;
  border: 1px solid #d1c4e9;
}

.badge-removed {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

/* ========== Status dots ========== */
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.dot-on {
  background: #43a047;
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.22);
}

.dot-off {
  background: #bdbdbd;
}

/* ========== Notice box ========== */
.notice-box {
  background: linear-gradient(180deg, #faf8f4 0%, #f5f1ea 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  padding: 20px 22px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.94rem;
  white-space: pre-wrap;
  max-height: 440px;
  overflow-y: auto;
  line-height: 1.7;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.url-list .url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.url-list .url-row input {
  flex: 1;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.empty {
  text-align: center;
  padding: 42px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ========== Mobile ========== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.45rem;
  cursor: pointer;
  color: var(--navy);
  position: relative;
  z-index: 120;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: background var(--transition);
}
.mobile-toggle:hover {
  background: var(--cream-dark);
}

@media (max-width: 800px) {
  .sidebar {
    width: min(290px, 88vw);
    transform: translateX(-110%);
    transition: transform 0.22s ease;
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.35);
    z-index: 100;
  }
  .sidebar.open {
    transform: translateX(0) !important;
    z-index: 101;
  }
  .sidebar-close {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .sidebar-overlay.open {
    display: block !important;
  }
  .main {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
  }
  .mobile-toggle {
    display: block;
  }
  .form-row,
  .form-row.three {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 14px 16px 28px;
    max-width: 100%;
  }
  .topbar {
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .topbar h2 {
    font-size: 1.1rem;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .card-b,
  .card-h {
    padding: 14px 16px;
  }
  table {
    font-size: 0.84rem;
  }
  th,
  td {
    padding: 9px 10px;
  }
  .auth-card {
    padding: 32px 24px 28px;
  }
}

/* Subtle scrollbar for classic feel */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cream-dark);
}
::-webkit-scrollbar-thumb {
  background: #c4bbb0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a89f92;
}


/* Pagination — stays inside card */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e0d8c8);
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border, #c8c0b0);
  border-radius: 4px;
  background: #faf8f4;
  color: var(--navy, #1e3a5f);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.pager-btn:hover {
  background: #f0ebe0;
  border-color: var(--gold, #c9a227);
}
.pager-current {
  background: var(--navy, #1e3a5f);
  color: #fff;
  border-color: var(--navy, #1e3a5f);
  font-weight: 600;
  cursor: default;
}
.card.card-compact .card-b {
  padding: 12px 14px;
}
.card.card-compact .table-wrap {
  font-size: 0.88rem;
}
.card.card-compact table th,
.card.card-compact table td {
  padding: 6px 8px;
}
