:root {
  --bg-main: #0b1120;
  --bg-card: #131c31;
  --bg-card-hover: #18233c;
  --bg-input: #0a101f;
  --border-color: rgba(148, 163, 184, 0.16);
  --border-focus: #f97316;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-orange: #f97316;
  --accent-orange-hover: #ea580c;
  --accent-blue: #38bdf8;
  --accent-green: #22c55e;
  --accent-purple: #a855f7;
  --accent-red: #ef4444;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 20px 45px -15px rgba(0, 0, 0, 0.55);
}

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

body {
  font-family: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(at 15% 10%, rgba(249, 115, 22, 0.12) 0px, transparent 45%),
    radial-gradient(at 85% 5%, rgba(56, 189, 248, 0.1) 0px, transparent 45%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 17, 32, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 13px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
}

.brand-text {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-accent {
  color: var(--accent-orange);
}

.unlimited-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  letter-spacing: 0.5px;
}

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

.view-switcher {
  display: flex;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  gap: 4px;
}

.switch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s;
}

.switch-btn.active {
  background: var(--accent-orange);
  color: #fff;
}

.switch-btn.admin-switch.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.user-Menu-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.user-chip:hover {
  border-color: rgba(148, 163, 184, 0.35);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 15.5px;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 8px 20px -4px rgba(249, 115, 22, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -4px rgba(249, 115, 22, 0.6);
}

.btn-outline {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(148, 163, 184, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger-ghost {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.22);
}

.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.22);
}

.gradient-text {
  background: linear-gradient(90deg, #fb923c, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========================================== */
/* LANDING & AUTHENTICATION PORTAL            */
/* ========================================== */
.auth-landing-section {
  padding: 40px 0 60px;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: start;
}

.security-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.landing-info h1 {
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
}

.landing-lead {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.guest-teaser-box {
  background: var(--bg-card);
  border: 1px dashed rgba(249, 115, 22, 0.45);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 28px;
  transition: transform 0.18s, border-color 0.18s;
}

.guest-teaser-box:hover {
  transform: translateY(-2px);
  border-color: var(--accent-orange);
}

.teaser-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-input);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lock-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.landing-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.feat-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(19, 28, 49, 0.65);
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: var(--radius-md);
}

.feat-icon {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feat-item h4 {
  font-size: 15px;
  margin-bottom: 3px;
}

.feat-item p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.public-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.pub-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #38bdf8;
}

.pub-stat span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Auth Card */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-lg);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-input);
  padding: 5px;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s;
}

.auth-tab.active {
  background: var(--accent-orange);
  color: #fff;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.auth-switch-note {
  text-align: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.auth-switch-note a {
  color: #fb923c;
  font-weight: 600;
  text-decoration: none;
}

.auth-switch-note a:hover {
  text-decoration: underline;
}

/* OTP Verification Box */
.otp-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 10px;
}

.otp-input {
  text-align: center;
  font-size: 24px !important;
  font-weight: 800;
  letter-spacing: 8px;
  color: #fb923c !important;
}

.dev-otp-banner {
  background: rgba(249, 115, 22, 0.12);
  border: 1px dashed rgba(249, 115, 22, 0.5);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  margin-bottom: 18px;
}

.dev-otp-title {
  font-size: 12.5px;
  color: #fdba74;
  font-weight: 600;
}

.dev-otp-code {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #fff;
  margin: 6px 0;
}

.dev-otp-banner small {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
}

.otp-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* ========================================== */
/* DASHBOARD VIEWS (USER & ADMIN)             */
/* ========================================== */
.dashboard-view {
  padding: 28px 0 60px;
}

.dash-welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.admin-banner {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(19, 28, 49, 0.95), rgba(46, 16, 101, 0.35));
}

.admin-pill-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  margin-bottom: 6px;
}

.dash-welcome-bar h2 {
  font-size: 22px;
  margin-bottom: 2px;
}

.dash-welcome-bar p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.dash-quick-actions {
  display: flex;
  gap: 10px;
}

/* Shortener Card */
.shortener-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.tab-btn.active {
  background: rgba(249, 115, 22, 0.14);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.35);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.main-input-row {
  display: flex;
  gap: 12px;
}

.url-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  font-size: 18px;
  pointer-events: none;
}

.url-input-wrap input {
  width: 100%;
  padding: 15px 16px 15px 44px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
}

.url-input-wrap input:focus {
  border-color: var(--border-focus);
}

.advanced-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.advanced-toggle-btn {
  background: none;
  border: none;
  color: #38bdf8;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chevron {
  font-size: 11px;
  transition: transform 0.2s;
}

.chevron.open {
  transform: rotate(180deg);
}

.tip-text {
  font-size: 12.5px;
  color: var(--text-muted);
}

.tip-text code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fb923c;
}

.advanced-panel {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-color);
}

.advanced-panel.open {
  display: block;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.form-field input,
.form-field textarea,
.sort-select {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--border-focus);
}

.form-field small {
  font-size: 11.5px;
  color: var(--text-muted);
}

.prefix-input {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.prefix-tag {
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-right: 1px solid var(--border-color);
  white-space: nowrap;
  height: 40px;
  display: flex;
  align-items: center;
}

.prefix-input input {
  border: none;
  background: transparent;
}

.bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* Instant Result Banner */
.instant-result {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.result-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.success-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.result-label {
  font-size: 12px;
  color: #86efac;
}

.result-short-link {
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  word-break: break-all;
}

.result-actions {
  display: flex;
  gap: 8px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.admin-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue { background: rgba(56, 189, 248, 0.14); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.14); }
.stat-icon.green { background: rgba(34, 197, 94, 0.14); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.14); }

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Links Toolbar */
.section-title-row {
  margin-bottom: 12px;
}

.links-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--border-focus);
}

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

.filter-pills {
  display: flex;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 4px;
}

.pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 6px;
  cursor: pointer;
}

.pill.active {
  background: var(--accent-orange);
  color: #fff;
}

.sort-select {
  width: auto;
  background: var(--bg-card);
  padding: 9px 12px;
  cursor: pointer;
}

/* Links List */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.link-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(148, 163, 184, 0.3);
}

.link-main {
  flex: 1;
  min-width: 0;
}

.link-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.short-url-anchor {
  font-size: 16.5px;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
  word-break: break-all;
}

.short-url-anchor:hover {
  text-decoration: underline;
}

.link-title-badge {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 8px;
  border-radius: 6px;
}

.badge-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-active {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
}

.badge-expired {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.badge-lock {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.badge-owner {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}

.original-url-row {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.original-url-row a {
  color: var(--text-muted);
  text-decoration: none;
}

.original-url-row a:hover {
  color: var(--text-main);
}

.link-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
}

.link-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.clicks-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.25);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 45px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

/* ========================================== */
/* ADMIN TABS & USERS TABLE                   */
/* ========================================== */
.admin-tabs-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.admin-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.admin-tab-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  border-color: transparent;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.table-responsive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 720px;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12.5px;
  background: rgba(10, 16, 31, 0.5);
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-card.modal-lg {
  max-width: 760px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-subtitle-link {
  font-size: 13px;
  color: #38bdf8;
  text-decoration: none;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}

/* QR Modal */
.qr-body {
  text-align: center;
}

.qr-preview-box {
  background: #fff;
  padding: 14px;
  border-radius: 14px;
  display: inline-block;
  margin-bottom: 12px;
}

.qr-preview-box img {
  width: 210px;
  height: 210px;
  display: block;
}

.qr-short-url {
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 16px;
  word-break: break-all;
}

.qr-color-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 18px;
  font-size: 13px;
}

.qr-color-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-download-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Analytics Breakdown */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.analytics-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.analytics-box h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.bar-row {
  margin-bottom: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}

.bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #38bdf8);
  border-radius: 99px;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.logs-table th,
.logs-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 40px);
}

.toast {
  background: #1e293b;
  color: #fff;
  border-left: 4px solid #22c55e;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  animation: slideIn 0.2s ease;
}

.toast.error {
  border-left-color: #ef4444;
}

@keyframes slideIn {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ========================================== */
/* RESPONSIVE BREAKPOINTS (TABLET & MOBILE)   */
/* ========================================== */
@media (max-width: 960px) {
  .landing-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .auth-card-wrap {
    order: -1;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 14px;
  }
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .brand {
    justify-content: center;
  }
  .nav-actions {
    justify-content: center;
    width: 100%;
  }
  .view-switcher {
    width: 100%;
    justify-content: center;
  }
  .switch-btn {
    flex: 1;
    text-align: center;
  }
  .user-Menu-group {
    width: 100%;
    justify-content: space-between;
  }
  .main-input-row {
    flex-direction: column;
  }
  .guest-teaser-box {
    flex-direction: column;
    align-items: stretch;
  }
  .link-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }
  .link-right {
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .public-stats-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dash-welcome-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
