/* =====================================================
   LINKPRO SAAS THEME - Modern URL Shortener UI 2026
   Design: Clean SaaS, Light Blue Primary, Premium Feel
   ===================================================== */

/* ---- CSS Variables ---- */
:root {
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;
  --accent: #06B6D4;
  --accent-light: #22D3EE;
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --info: #6366F1;
  --info-light: #EEF2FF;

  --bg: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-sidebar: #0F172A;
  --bg-header: #FFFFFF;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --border: #E2E8F0;
  --border-focus: #3B82F6;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.05);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 0 3px rgba(37,99,235,0.15);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --sidebar-w: 260px;
  --header-h: 64px;

  --font: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* =====================================================
   LAYOUT — DASHBOARD SHELL
   ===================================================== */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), width 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}

.sidebar-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white; flex-shrink: 0;
}

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}

.sidebar-user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; flex: 1; }
.sidebar-user-name {
  color: white; font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  color: rgba(255,255,255,0.45); font-size: 12px;
}

.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 12px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-section {
  padding: 6px 20px 2px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,0.28);
  margin-top: 8px;
}

.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.62);
  font-size: 14px; font-weight: 500;
  cursor: pointer; position: relative;
  transition: var(--transition);
  border-radius: 0;
}
.sidebar-item:hover {
  color: white;
  background: rgba(255,255,255,0.06);
}
.sidebar-item.active {
  color: white;
  background: rgba(59,130,246,0.2);
}
.sidebar-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--primary-light);
  border-radius: 0 3px 3px 0;
}
.sidebar-item i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.sidebar-item .badge {
  margin-left: auto;
  background: rgba(59,130,246,0.3); color: #93C5FD;
  font-size: 11px; font-weight: 600; padding: 2px 7px;
  border-radius: var(--radius-full);
}

.sidebar-submenu {
  background: rgba(0,0,0,0.2);
  overflow: hidden;
  max-height: 0; transition: max-height 0.3s ease;
}
.sidebar-submenu.open { max-height: 300px; }
.sidebar-submenu a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 20px 8px 48px;
  color: rgba(255,255,255,0.5); font-size: 13px;
  transition: var(--transition);
}
.sidebar-submenu a:hover { color: white; background: rgba(255,255,255,0.05); }

.sidebar-item.has-sub .sub-arrow {
  margin-left: auto; font-size: 11px;
  transition: transform 0.25s;
}
.sidebar-item.has-sub.open .sub-arrow { transform: rotate(90deg); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-footer a {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.45); font-size: 13px;
  padding: 8px 0;
  transition: var(--transition);
}
.sidebar-footer a:hover { color: #EF4444; }

/* ---- Main Content ---- */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Top Header ---- */
.app-header {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 10px; }

.sidebar-toggle {
  width: 36px; height: 36px;
  border: none; background: transparent;
  cursor: pointer; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--bg); color: var(--primary); }

.header-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.header-breadcrumb a { color: var(--text-muted); }
.header-breadcrumb a:hover { color: var(--primary); }
.header-breadcrumb span { color: var(--text-muted); }
.header-breadcrumb .current { color: var(--text-primary); font-weight: 600; }

.header-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
}
.header-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.header-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.header-btn-ghost {
  background: transparent; color: var(--text-secondary);
}
.header-btn-ghost:hover { background: var(--bg); color: var(--primary); }

.header-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer;
  transition: var(--transition); object-fit: cover;
}
.header-avatar:hover { border-color: var(--primary); }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 6px;
  opacity: 0; transform: translateY(-8px) scale(0.97);
  transition: var(--transition);
  pointer-events: none; z-index: 200;
}
.dropdown.open .dropdown-menu {
  opacity: 1; transform: none; pointer-events: all;
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--primary-50); color: var(--primary); }
.dropdown-item.danger:hover { background: var(--danger-light); color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-header {
  padding: 10px 12px 6px;
  font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Page Content ---- */
.app-content {
  flex: 1; padding: 24px;
}

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* ---- App Footer ---- */
.app-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: space-between;
}

/* =====================================================
   CARDS
   ===================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}
.card:hover { box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 600; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); }

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
  position: relative; overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::before {
  content: ''; position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.07;
  transform: translate(20px, -20px);
}
.stat-card.blue::before { background: var(--primary); }
.stat-card.green::before { background: var(--success); }
.stat-card.orange::before { background: var(--warning); }
.stat-card.purple::before { background: var(--info); }

.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.stat-icon.blue { background: var(--primary-100); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.purple { background: var(--info-light); color: var(--info); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: #ECFEFF; color: var(--accent); }

.stat-value {
  font-size: 26px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.03em; color: var(--text-primary);
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-action {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 14px; font-size: 12px; font-weight: 600;
  color: var(--primary); padding: 5px 10px;
  background: var(--primary-50); border-radius: var(--radius-full);
  transition: var(--transition);
}
.stat-action:hover { background: var(--primary-100); }

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 9px 18px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  border-radius: var(--radius-sm); border: none;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.btn-primary:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
}

.btn-success {
  background: linear-gradient(135deg, #34D399, var(--success));
  color: white; box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.btn-success:hover { color: white; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16,185,129,0.4); }

.btn-danger {
  background: linear-gradient(135deg, #F87171, var(--danger));
  color: white; box-shadow: 0 2px 8px rgba(239,68,68,0.25);
}
.btn-danger:hover { color: white; transform: translateY(-1px); }

.btn-warning {
  background: linear-gradient(135deg, #FCD34D, var(--warning));
  color: white; box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.btn-warning:hover { color: white; transform: translateY(-1px); }

.btn-info {
  background: linear-gradient(135deg, #818CF8, var(--info));
  color: white; box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-info:hover { color: white; transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-50); color: var(--primary); }

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); gap: 5px; }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-icon { padding: 9px; width: 36px; height: 36px; }
.btn-icon-sm { padding: 6px; width: 30px; height: 30px; }

/* =====================================================
   FORMS
   ===================================================== */

.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.form-label .required { color: var(--danger); }

.form-control {
  width: 100%; padding: 10px 14px;
  font-size: 14px; font-family: var(--font); color: var(--text-primary);
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid { border-color: var(--success); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-control-lg { padding: 13px 16px; font-size: 15px; border-radius: var(--radius); }

.input-group { display: flex; align-items: stretch; }
.input-group .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none; flex: 1;
}
.input-group .input-group-addon {
  padding: 0 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.input-group .input-group-addon:hover { color: var(--primary); background: var(--primary-50); }

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input {
  width: 16px; height: 16px; border-radius: 4px;
  border: 2px solid var(--border); cursor: pointer;
  accent-color: var(--primary);
}
.form-check-label { font-size: 14px; color: var(--text-secondary); cursor: pointer; }

.invalid-feedback { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* =====================================================
   TABLES
   ===================================================== */

.table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden; background: var(--bg-card);
}
table.table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.table thead tr { background: var(--bg); }
.table th {
  padding: 11px 16px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: var(--primary-50); }

/* =====================================================
   BADGES & PILLS
   ===================================================== */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
}
.badge-primary { background: var(--primary-100); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: #065F46; }
.badge-warning { background: var(--warning-light); color: #92400E; }
.badge-danger { background: var(--danger-light); color: #991B1B; }
.badge-info { background: var(--info-light); color: #3730A3; }
.badge-secondary { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 16px; font-size: 14px;
}
.alert i { margin-top: 1px; flex-shrink: 0; font-size: 16px; }
.alert-success { background: var(--success-light); color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background: var(--danger-light); color: #991B1B; border: 1px solid #FCA5A5; }
.alert-warning { background: var(--warning-light); color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: var(--info-light); color: #3730A3; border: 1px solid #C7D2FE; }

/* =====================================================
   MODALS
   ===================================================== */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  opacity: 0; transition: opacity 0.25s;
  pointer-events: none;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  position: fixed; inset: 0; z-index: 510;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.modal.open { opacity: 1; pointer-events: all; }

.modal-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 520px;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal.open .modal-dialog { transform: scale(1) translateY(0); }

.modal-header {
  padding: 20px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: none; cursor: pointer;
  color: var(--text-muted); transition: var(--transition); font-size: 16px;
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 0 24px 20px;
  display: flex; justify-content: flex-end; gap: 10px;
}

/* =====================================================
   LINK CARDS (member links list)
   ===================================================== */

.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}
.link-card:hover { box-shadow: var(--shadow); border-color: #BFDBFE; }
.link-card-title { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.link-card-title a { color: var(--primary); }
.link-card-title a:hover { text-decoration: underline; }
.link-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.link-card-meta i { color: var(--primary-light); margin-right: 3px; }
.link-card-url { font-size: 13px; font-family: var(--font-mono); color: var(--text-secondary); }

/* =====================================================
   PAGINATION
   ===================================================== */

.pagination {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 20px 0 0; flex-wrap: wrap;
}
.pagination li a,
.pagination li span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 8px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); transition: var(--transition);
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.pagination li.active a,
.pagination li.active span { background: var(--primary); color: white; border-color: var(--primary); }
.pagination li.disabled a,
.pagination li.disabled span { opacity: 0.4; pointer-events: none; }

/* =====================================================
   CODE / API BLOCKS
   ===================================================== */

.code-block {
  background: #0F172A; color: #94A3B8;
  padding: 14px 18px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 13px;
  overflow-x: auto; line-height: 1.7;
  border: 1px solid rgba(255,255,255,0.06);
}
.code-block b { color: #38BDF8; }
.token-card {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius); padding: 12px 16px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--primary-dark); word-break: break-all;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* =====================================================
   NEW SHORTEN MODAL
   ===================================================== */

.shorten-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: none;
}
.shorten-form-card.visible { display: block; animation: slideDown 0.3s ease; }

@keyframes slideDown {
  from { opacity:0; transform:translateY(-16px); }
  to { opacity:1; transform:translateY(0); }
}

/* =====================================================
   CHART WRAPPER
   ===================================================== */

.chart-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.chart-title {
  font-size: 15px; font-weight: 600;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

/* =====================================================
   LOADER / SKELETON
   ===================================================== */

.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }

.loader-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, #F1F5F9 0%, #E2E8F0 50%, #F1F5F9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* =====================================================
   FRONT PAGE — LANDING
   ===================================================== */

/* Navbar */
.front-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 0;
  transition: var(--transition-slow);
}
.front-nav.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.front-nav .nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; letter-spacing: -0.03em;
  color: var(--bg-sidebar);
}
.nav-logo .logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
}
.front-nav.hero-nav .nav-logo { color: white; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: white;
  transition: var(--transition);
}
.nav-links a:hover { background: rgba(255,255,255,0.15); }
.front-nav.scrolled .nav-links a { color: var(--text-secondary); }
.front-nav.scrolled .nav-links a:hover { background: var(--primary-50); color: var(--primary); }

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

.hamburger-btn {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
  border-radius: var(--radius-sm);
}
.hamburger-btn span {
  display: block; width: 22px; height: 2px;
  background: white; border-radius: 2px; transition: var(--transition);
}
.front-nav.scrolled .hamburger-btn span { background: var(--text-primary); }

/* Hero */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(160deg, #0F172A 0%, #1E3A5F 45%, #0284C7 100%);
  display: flex; align-items: center;
  padding: 100px 0 60px;
  position: relative; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section::after {
  content: ''; position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%);
  top: -100px; right: -100px;
}

.hero-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-full);
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93C5FD; font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.hero-badge i { font-size: 11px; }

.hero-title {
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.04em;
  color: white; margin-bottom: 20px;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #60A5FA, #06B6D4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px; color: rgba(255,255,255,0.65);
  max-width: 520px; line-height: 1.7; margin-bottom: 36px;
}

/* Shorten Box */
.shorten-box {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 28px 28px;
  max-width: 680px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.shorten-box-title {
  font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.7);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}

.shorten-input-row {
  display: flex; gap: 10px; align-items: stretch;
}
.shorten-input {
  flex: 1; padding: 14px 18px;
  background: rgba(255,255,255,0.9);
  border: 2px solid transparent; border-radius: var(--radius);
  font-size: 15px; font-family: var(--font); color: var(--text-primary);
  outline: none; transition: var(--transition);
}
.shorten-input:focus {
  background: white; border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.2);
}
.shorten-input::placeholder { color: #94A3B8; }
.shorten-submit {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: white; border: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: var(--transition); white-space: nowrap; font-family: var(--font);
  display: flex; align-items: center; gap: 8px;
}
.shorten-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(37,99,235,0.4); }

.shorten-result {
  margin-top: 14px; padding: 12px 16px;
  background: rgba(255,255,255,0.06); border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12); display: none;
}
.shorten-result.visible { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* Stats Bar */
.stats-bar {
  display: flex; gap: 36px; margin-top: 40px;
  flex-wrap: wrap;
}
.stats-bar-item { text-align: left; }
.stats-bar-value { font-size: 26px; font-weight: 800; color: white; letter-spacing: -0.03em; }
.stats-bar-label { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* Sections */
.section { padding: 80px 0; }
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--radius-full);
  background: var(--primary-100); color: var(--primary-dark);
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.03em;
  color: var(--text-primary);
}
.section-desc {
  font-size: 16px; color: var(--text-muted);
  max-width: 560px; margin: 12px auto 0; line-height: 1.7;
}

/* Feature Grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px;
  box-shadow: var(--shadow-sm); transition: var(--transition-slow);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #BFDBFE; }
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Pricing Cards */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; }
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-sm); transition: var(--transition-slow);
  position: relative; overflow: hidden;
}
.pricing-card:hover { box-shadow: var(--shadow-md); }
.pricing-card.popular {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary-light), var(--shadow-md);
}
.popular-badge {
  position: absolute; top: 16px; right: 16px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: white; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: var(--radius-full);
}
.pricing-name { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.pricing-price { font-size: 42px; font-weight: 800; letter-spacing: -0.04em; color: var(--text-primary); margin: 8px 0; }
.pricing-price span { font-size: 18px; font-weight: 500; color: var(--text-muted); }
.pricing-features { list-style: none; margin: 20px 0 28px; }
.pricing-features li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 14px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li i { color: var(--success); font-size: 13px; flex-shrink: 0; }

/* Withdrawal Table */
.withdraw-table-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 24px; }
.testimonial-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.testimonial-text { font-size: 15px; color: var(--text-secondary); line-height: 1.7; font-style: italic; margin-bottom: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-100); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); }
.testimonial-name { font-weight: 600; font-size: 14px; }
.testimonial-role { font-size: 12px; color: var(--text-muted); }

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 72px 0; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.cta-title { font-size: clamp(26px, 3vw, 38px); font-weight: 800; color: white; margin-bottom: 12px; }
.cta-desc { font-size: 16px; color: rgba(255,255,255,0.7); margin-bottom: 28px; }

/* Footer */
.front-footer {
  background: #0F172A; padding: 64px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding: 0 24px 48px; }
.footer-brand { color: rgba(255,255,255,0.5); font-size: 14px; line-height: 1.7; }
.footer-brand .logo { margin-bottom: 12px; }
.footer-heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.55); font-size: 14px; transition: var(--transition); }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 24px;
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,0.3);
}

/* =====================================================
   AUTH PAGES
   ===================================================== */

.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0F172A 0%, #1E3A5F 50%, #0284C7 100%);
  padding: 24px; position: relative; overflow: hidden;
}
.auth-page::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-card {
  background: white; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 440px;
  padding: 40px;
  position: relative; z-index: 2;
  animation: authIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes authIn { from { opacity:0; transform:translateY(30px) scale(0.95); } to { opacity:1; transform:none; } }

.auth-logo {
  text-align: center; margin-bottom: 28px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-primary); font-weight: 800; font-size: 22px;
}
.auth-logo .logo-icon {
  width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
}
.auth-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }

.auth-divider {
  text-align: center; margin: 20px 0; position: relative;
  font-size: 12px; color: var(--text-muted);
}
.auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.auth-divider span { background: white; padding: 0 12px; position: relative; z-index: 1; }

.auth-footer-link {
  text-align: center; margin-top: 20px;
  font-size: 14px; color: var(--text-muted);
}
.auth-footer-link a { color: var(--primary); font-weight: 600; }

.auth-back {
  position: absolute; top: 20px; left: 20px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: white; transition: var(--transition); z-index: 10;
}
.auth-back:hover { background: rgba(255,255,255,0.2); color: white; }

/* =====================================================
   GO PAGES (banner, interstitial)
   ===================================================== */

.go-page {
  min-height: 100vh; background: var(--bg);
  display: flex; flex-direction: column; align-items: center;
}
.go-header {
  width: 100%; background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.go-content {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 24px;
}
.go-timer-circle {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: white; margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(37,99,235,0.3);
}
.go-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.go-url { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; word-break: break-all; max-width: 500px; text-align: center; }
.go-ad-area { width: 100%; max-width: 800px; min-height: 250px; background: var(--bg-card); border: 2px dashed var(--border); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 14px; }

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.text-muted { color: var(--text-muted); } .text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--primary); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.text-center { text-align: center; } .text-right { text-align: right; }
.d-none { display: none !important; } .d-flex { display: flex; }
.w-100 { width: 100%; } .h-full { min-height: 100%; }
.rounded { border-radius: var(--radius-sm); }
.rounded-full { border-radius: var(--radius-full); }
.overflow-hidden { overflow: hidden; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.position-relative { position: relative; }
.fade-in { animation: fadeIn 0.4s ease; }

/* Flash messages */
.flash-message {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.flash-success { background: var(--success-light); color: #065F46; border: 1px solid #A7F3D0; }
.flash-error { background: var(--danger-light); color: #991B1B; border: 1px solid #FCA5A5; }

/* Mobile Toggle Overlay */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,0.5); z-index: 99;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .sidebar-overlay.visible { display: block; }
  .app-main { margin-left: 0; }

  .hamburger-btn { display: flex; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: rgba(15,23,42,0.97); backdrop-filter: blur(12px);
    padding: 12px;
  }
  .front-nav.scrolled .nav-links.open { background: white; }
  .front-nav.scrolled .nav-links.open a { color: var(--text-secondary); }
  .nav-links.open a { border-radius: var(--radius-sm); padding: 12px 16px; width: 100%; }

  .hero-section { padding: 80px 0 40px; }
  .shorten-input-row { flex-direction: column; }
  .stats-bar { gap: 24px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .app-content { padding: 16px; }
  .auth-card { padding: 28px 20px; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 30px; }
  .shorten-box { padding: 20px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 22px; }
}

/* Preserve Bootstrap compatibility for modals triggered by PHP */
.modal-open .app-sidebar { z-index: 99; }

/* =====================================================
   ADDITIONAL POLISH & FIXES
   ===================================================== */

/* Shorten result area styling (JS-populated) */
.add-link-result { margin-top: 12px; }
.add-link-result .alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; }
.add-link-result input[type="text"] {
    width: 100%; padding: 10px 14px;
    font-family: var(--font-mono); font-size: 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: white; color: var(--text-primary);
}

/* Flash message overrides */
.message { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.message.success { background: var(--success-light); color: #065F46; border: 1px solid #A7F3D0; }
.message.error { background: var(--danger-light); color: #991B1B; border: 1px solid #FCA5A5; }
.message.warning { background: var(--warning-light); color: #92400E; border: 1px solid #FDE68A; }
.message.info { background: var(--info-light); color: #3730A3; border: 1px solid #C7D2FE; }

/* CakePHP form error messages */
.error-message { font-size: 12px; color: var(--danger); margin-top: 4px; display: block; }
.has-error .form-control { border-color: var(--danger); }
.form-control + .error-message { margin-top: 4px; }

/* Sidebar collapsed mode (desktop) */
body.sidebar-collapsed .app-sidebar { width: 60px; }
body.sidebar-collapsed .app-sidebar .sidebar-user-info,
body.sidebar-collapsed .app-sidebar .sidebar-user-name,
body.sidebar-collapsed .app-sidebar .sidebar-user-role,
body.sidebar-collapsed .app-sidebar span:not(.sub-arrow),
body.sidebar-collapsed .app-sidebar .sidebar-section,
body.sidebar-collapsed .app-sidebar .sidebar-footer a span,
body.sidebar-collapsed .app-sidebar .logo-text { display: none; }
body.sidebar-collapsed .app-sidebar .sidebar-logo { justify-content: center; }
body.sidebar-collapsed .app-sidebar .sidebar-item { justify-content: center; padding: 12px; }
body.sidebar-collapsed .app-main { margin-left: 60px; }
body.sidebar-collapsed .app-sidebar .sidebar-submenu { display: none; }
body.sidebar-collapsed .app-sidebar .sidebar-item i { width: auto; }

/* Input focus placeholder color fix */
.shorten-input:focus::placeholder { color: #B0BEC5; }

/* Table responsive wrapper */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive table { min-width: 540px; }

/* Auth page: grid for 2-col password fields */
@media (max-width: 420px) {
    .auth-card > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Go page: responsive adjustments */
@media (max-width: 500px) {
    #countdown { width: 70px !important; height: 70px !important; }
    #countdown span:first-child { font-size: 22px !important; }
}

/* Captcha page input placeholder */
.captcha-page input::placeholder { color: rgba(255,255,255,0.5); }

/* Ensure modals from existing JS still work */
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.in { opacity: .5; }
.modal.fade .modal-dialog { transform: translate(0, -25%); }
.modal.in .modal-dialog { transform: translate(0, 0); }

/* Override Bootstrap remnants in member pages */
.app-content .box { background: none; border: none; box-shadow: none; }
.app-content .box-primary > .box-header { padding: 0 0 16px 0; }
.app-content .box-primary > .box-body { padding: 0; }

/* Style CakePHP paginator with our theme */
.pagination > li > a,
.pagination > li > span { border-radius: 6px !important; margin: 0 2px; }

/* Testimonial cell */
.testimonials-section { padding: 80px 0; background: var(--bg); }
.testimonials-section .section-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
