/* ============================================================
   Aplikasi Shortlink & Microsite — Tema Islami
   Warna: Biru Dongker (#0F1F3D, #1B2A4A) + Kuning (#F5C842, #FFD700)
   ============================================================ */

:root {
  --navy-900: #0A1526;
  --navy-800: #0F1F3D;
  --navy-700: #1B2A4A;
  --navy-600: #24365E;
  --navy-500: #2E4472;
  --gold-500: #F5C842;
  --gold-400: #FFD700;
  --gold-300: #FFE082;
  --gold-600: #D9A821;
  --cream: #FDF6E3;
  --white: #FFFFFF;
  --gray-100: #F5F7FA;
  --gray-200: #E8ECF1;
  --gray-300: #D1D8E0;
  --gray-500: #6B7A90;
  --gray-700: #3D4A5C;
  --danger: #E74C3C;
  --success: #27AE60;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(10, 21, 38, 0.08);
  --shadow-md: 0 6px 24px rgba(10, 21, 38, 0.12);
  --shadow-lg: 0 12px 40px rgba(10, 21, 38, 0.18);
  --font-main: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ Perbaikan gambar SVG inline ============ */
svg {
  display: inline-block;
  vertical-align: middle;
}

/* ============ Header / Navbar ============ */
.site-header {
  background: var(--navy-800);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  border-bottom: 3px solid var(--gold-500);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 22px;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  border-radius: 12px;
  color: var(--navy-900);
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.logo span em {
  font-style: normal;
  color: var(--gold-400);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.btn-login {
  background: transparent;
  border: 2px solid var(--gold-400);
  color: var(--gold-400) !important;
}

.btn-login:hover {
  background: var(--gold-400) !important;
  color: var(--navy-900) !important;
}

.btn-register {
  background: var(--gold-500);
  color: var(--navy-900) !important;
  border: 2px solid var(--gold-500);
}

.btn-register:hover {
  background: var(--gold-400);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.nav-user .user-name {
  font-weight: 500;
  font-size: 15px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-900);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white) !important;
  padding: 8px 14px !important;
  border-radius: 8px;
  font-size: 14px !important;
  cursor: pointer;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  width: 24px;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-900);
  box-shadow: 0 4px 14px rgba(245, 200, 66, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 200, 66, 0.45);
}

.btn-navy {
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-navy:hover {
  background: var(--navy-700);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--navy-700);
  color: var(--navy-700);
}

.btn-outline:hover {
  background: var(--navy-700);
  color: var(--white);
}

.btn-white-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: var(--white);
}

.btn-white-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============ Hero / Landing ============ */
.hero {
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-600) 100%);
  color: var(--white);
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 200, 66, 0.15);
  border: 1px solid rgba(245, 200, 66, 0.4);
  color: var(--gold-300);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-title .gold {
  color: var(--gold-400);
  position: relative;
}

.hero-title .gold::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(245, 200, 66, 0.3);
  border-radius: 4px;
  z-index: -1;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .value {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold-400);
}

.hero-stat .label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Mockup panel di hero */
.hero-mockup {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.mockup-phone {
  background: var(--navy-700);
  border-radius: 14px;
  padding: 18px;
  border: 3px solid var(--gold-500);
  position: relative;
}

.mockup-phone .phone-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mockup-phone .phone-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-900);
  font-weight: 700;
  font-size: 18px;
}

.mockup-phone .phone-name {
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
}

.mockup-phone .phone-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.mockup-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.mockup-link .link-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  background: var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-900);
  font-size: 16px;
}

.mockup-link .link-text {
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}

/* ============ Section umum ============ */
.section {
  padding: 70px 0;
}

.section-dark {
  background: var(--navy-800);
  color: var(--white);
}

.section-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-dark .section-title {
  color: var(--white);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 50px;
  font-size: 16px;
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.section-title .gold-text {
  color: var(--gold-600);
}

.decorator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.decorator::before,
.decorator::after {
  content: '';
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
  border-radius: 2px;
}

.decorator::after {
  background: linear-gradient(90deg, var(--gold-500), transparent);
}

.decorator .ornament {
  color: var(--gold-500);
  font-size: 20px;
}

/* ============ Cards Features ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  border-top: 4px solid transparent;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--gold-500);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgba(245, 200, 66, 0.15);
  color: var(--navy-700);
}

.feature-card h3 {
  font-size: 18px;
  color: var(--navy-800);
  margin-bottom: 10px;
  font-weight: 700;
}

.feature-card p {
  font-size: 14.5px;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ============ How it works ============ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-900);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 6px 18px rgba(245, 200, 66, 0.35);
}

.step-item h3 {
  color: var(--white);
  font-size: 18px;
  margin-bottom: 8px;
}

.step-item p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ============ CTA ============ */
.cta-box {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  border-radius: 24px;
  padding: 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(245, 200, 66, 0.1);
}

.cta-box h2 {
  color: var(--white);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
  font-size: 16px;
}

/* ============ Footer ============ */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.6);
  padding: 30px 0;
  margin-top: auto;
  border-top: 3px solid var(--gold-500);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner p {
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold-400);
}

/* ============ Auth Pages (Login/Register) ============ */
.auth-page {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.12), transparent 70%);
}

.auth-page::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.08), transparent 70%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.auth-card .logo-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--navy-800);
  font-size: 24px;
  font-weight: 800;
}

.auth-card .logo-auth .logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 22px;
}

.auth-card h1 {
  text-align: center;
  font-size: 26px;
  color: var(--navy-800);
  margin-bottom: 6px;
  font-weight: 800;
}

.auth-sub {
  text-align: center;
  color: var(--gray-500);
  font-size: 14.5px;
  margin-bottom: 30px;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--gray-100);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(245, 200, 66, 0.15);
  background: var(--white);
}

.form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.form-group input[type="file"] {
  padding: 10px;
  background: var(--white);
}

.form-group .hint {
  font-size: 12.5px;
  color: var(--gray-500);
}

.form-error {
  background: #FDE8E8;
  color: var(--danger);
  border: 1px solid #F5C6CB;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
}

.form-success {
  background: #E8F8EF;
  color: var(--success);
  border: 1px solid #A9DFBF;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
}

.auth-bottom {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--gray-500);
}

.auth-bottom a {
  color: var(--navy-700);
  font-weight: 700;
  text-decoration: underline;
}

.auth-bottom a:hover {
  color: var(--gold-600);
}

/* ============ Dashboard Layout ============ */
.dashboard {
  background: var(--gray-100);
  min-height: 100vh;
}

.dashboard-topbar {
  background: var(--navy-800);
  padding: 14px 0;
  border-bottom: 3px solid var(--gold-500);
  position: sticky;
  top: 0;
  z-index: 90;
}

.dashboard-topbar .topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-main {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.dashboard-header h1 {
  font-size: 26px;
  color: var(--navy-800);
  font-weight: 800;
}

.dashboard-header .sub {
  color: var(--gray-500);
  font-size: 14.5px;
  margin-top: 2px;
}

/* ============ Stat Cards ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid var(--gold-500);
}

.stat-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 12px;
  background: rgba(245, 200, 66, 0.15);
  color: var(--navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-info .stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy-800);
  line-height: 1.2;
}

.stat-info .stat-label {
  font-size: 13px;
  color: var(--gray-500);
}

/* ============ Cards Panel ============ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header h2 {
  font-size: 18px;
  color: var(--navy-800);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h2 .icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(245, 200, 66, 0.15);
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.card-body {
  padding: 22px;
}

/* ============ Form inline (buat shortlink) ============ */
.shortlink-form {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.shortlink-form .form-group {
  margin: 0;
}

/* ============ Tables ============ */
.table-responsive {
  overflow-x: auto;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

table.table th {
  background: var(--navy-800);
  color: var(--white);
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

table.table th:first-child {
  border-radius: 10px 0 0 0;
}

table.table th:last-child {
  border-radius: 0 10px 0 0;
}

table.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
  color: var(--gray-700);
}

table.table tbody tr:last-child td {
  border-bottom: none;
}

table.table tbody tr:hover {
  background: var(--gray-100);
}

.short-code {
  font-weight: 700;
  color: var(--navy-700);
  font-size: 14px;
}

.short-url {
  color: var(--gray-500);
  font-size: 13px;
  word-break: break-all;
}

.action-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.action-btn-copy {
  background: rgba(245, 200, 66, 0.15);
  color: var(--navy-700);
}

.action-btn-copy:hover {
  background: var(--gold-500);
  color: var(--navy-900);
}

.action-btn-edit {
  background: rgba(30, 144, 255, 0.1);
  color: #1E90FF;
}

.action-btn-edit:hover {
  background: #1E90FF;
  color: var(--white);
}

.action-btn-delete {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
}

.action-btn-delete:hover {
  background: var(--danger);
  color: var(--white);
}

/* ============ Badges ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.badge-gold {
  background: rgba(245, 200, 66, 0.15);
  color: var(--gold-600);
}

.badge-navy {
  background: rgba(27, 42, 74, 0.08);
  color: var(--navy-700);
}

/* ============ Empty State ============ */
.empty-state {
  text-align: center;
  padding: 50px 20px;
}

.empty-icon {
  font-size: 52px;
  margin-bottom: 16px;
  color: var(--gray-300);
}

.empty-state h3 {
  color: var(--navy-800);
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--gray-500);
  font-size: 14.5px;
  margin-bottom: 20px;
}

/* ============ Grid Microsite Cards ============ */
.microsite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.microsite-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid var(--gray-200);
}

.microsite-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-500);
}

.microsite-card .card-banner {
  height: 90px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  position: relative;
}

.microsite-card .card-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-500);
}

.microsite-card .card-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 4px solid var(--white);
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  margin: -35px auto 0;
  position: relative;
  z-index: 2;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.microsite-card .card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.microsite-card .card-body {
  text-align: center;
  padding: 18px 20px 20px;
}

.microsite-card .card-body h3 {
  font-size: 17px;
  color: var(--navy-800);
  font-weight: 700;
  margin-bottom: 4px;
}

.microsite-card .card-body p {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 14px;
  max-height: 40px;
  overflow: hidden;
}

.microsite-card .card-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--gray-200);
  padding: 14px;
  background: var(--gray-100);
}

/* ============ Public Microsite Page ============ */
.microsite-page {
  min-height: 100vh;
  background: var(--navy-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}

.microsite-page::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.1), transparent 70%);
}

.ms-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gold-400);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.ms-logo .logo-icon {
  width: 28px;
  height: 28px;
  font-size: 14px;
  border-radius: 8px;
}

.ms-container {
  width: 100%;
  max-width: 560px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.ms-profile {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  border: 4px solid var(--gold-400);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-900);
  font-size: 42px;
  font-weight: 800;
}

.ms-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ms-title {
  color: var(--white);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  margin-bottom: 8px;
}

.ms-desc {
  color: rgba(255, 255, 255, 0.75);
  font-size: 15.5px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.ms-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ms-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 16px 18px;
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.ms-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-500);
  transform: scaleY(0);
  transition: transform 0.3s;
  transform-origin: bottom;
}

.ms-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ms-link:hover::before {
  transform: scaleY(1);
}

.ms-link .ms-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ms-link .ms-text {
  flex: 1;
  text-align: left;
}

.ms-link .ms-arrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  transition: transform 0.3s, color 0.3s;
}

.ms-link:hover .ms-arrow {
  transform: translateX(6px);
  color: var(--gold-400);
}

.ms-footer {
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  position: relative;
  z-index: 2;
}

.ms-footer a {
  color: var(--gold-400);
  font-weight: 600;
}

.ms-footer svg {
  width: 14px;
  height: 14px;
  margin: 0 2px;
}

/* ============ Pagination ============ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy-700);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
}

.pagination .active span {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}

.pagination a:hover {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}

/* ============ Alert ============ */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: #E8F8EF;
  color: var(--success);
  border: 1px solid #A9DFBF;
}

.alert-danger {
  background: #FDE8E8;
  color: var(--danger);
  border: 1px solid #F5C6CB;
}

.alert-info {
  background: rgba(30, 144, 255, 0.08);
  color: #1E90FF;
  border: 1px solid rgba(30, 144, 255, 0.3);
}

/* ============ Utilities ============ */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.bg-navy { background: var(--navy-800); }
.bg-gold { background: var(--gold-500); }
.text-gold { color: var(--gold-500); }
.text-navy { color: var(--navy-800); }

/* ============ Toast ============ */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy-800);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border-bottom: 3px solid var(--gold-500);
  opacity: 0;
  transition: all 0.35s;
  z-index: 9999;
  max-width: 90vw;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============ Icon SVG sizing ============ */
.icon-svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ms-icon .icon-svg {
  width: 20px;
  height: 20px;
}

/* ============ Responsive ============ */
@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .microsite-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-mockup {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .shortlink-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-800);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    gap: 6px;
    border-top: 3px solid var(--gold-500);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    text-align: center;
  }

  .nav-user {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    padding-top: 12px;
  }

  .nav-user .user-name {
    text-align: center;
  }

  .hero {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 30px;
  }

  .section {
    padding: 50px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .microsite-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    text-align: center;
  }

  .cta-box {
    padding: 32px 24px;
  }

  .auth-card {
    padding: 30px 22px;
  }

  .ms-link {
    padding: 14px;
    font-size: 15px;
  }

  .ms-profile {
    width: 90px;
    height: 90px;
    font-size: 34px;
  }

  table.table {
    min-width: 540px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .action-btns {
    flex-direction: column;
  }

  .card-body {
    padding: 16px;
  }
}