/* ================================================
   KY 중소기업지원센터 대시보드 CSS
   ================================================ */

/* CSS Variables */
:root {
  --primary: #1E3A5F;
  --primary-dark: #0F1F33;
  --primary-light: #E8EEF4;
  --accent: #3B82F6;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  --neutral-50: #F9FAFB;
  --neutral-100: #F3F4F6;
  --neutral-200: #E5E7EB;
  --neutral-300: #D1D5DB;
  --neutral-400: #9CA3AF;
  --neutral-500: #6B7280;
  --neutral-600: #4B5563;
  --neutral-700: #374151;
  --neutral-800: #1F2937;
  --neutral-900: #111827;

  --sidebar-width: 260px;
  --header-height: 70px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--neutral-100);
  color: var(--neutral-800);
  line-height: 1.6;
}

/* Dashboard Container */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* ================================================
   Sidebar
   ================================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--neutral-900);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--neutral-700);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.logo-sub {
  font-size: 12px;
  color: var(--neutral-400);
  margin-left: 8px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--neutral-400);
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--neutral-800);
  color: white;
}

.nav-item.active {
  background: var(--primary);
  color: white;
}

.nav-icon {
  font-size: 18px;
}

.nav-text {
  font-size: 14px;
  font-weight: 500;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--neutral-700);
}

/* ================================================
   Main Content
   ================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px;
}

/* Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--neutral-200);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--neutral-900);
}

.page-subtitle {
  font-size: 14px;
  color: var(--neutral-500);
  margin-top: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-name {
  font-size: 14px;
  color: var(--neutral-600);
}

.btn-logout {
  padding: 8px 16px;
  background: var(--neutral-200);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--neutral-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--neutral-300);
}

/* ================================================
   Stats Grid
   ================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.stat-icon.icon-page {
  background: #D1FAE5;
  color: #059669;
}

.stat-icon.icon-time {
  background: #FEF3C7;
  color: #D97706;
}

.stat-icon.icon-inbox {
  background: #FEE2E2;
  color: #DC2626;
}

.stat-label {
  font-size: 14px;
  color: var(--neutral-500);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--neutral-900);
}

.stat-change {
  font-size: 12px;
  margin-top: 4px;
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--error);
}

/* ================================================
   Charts Grid
   ================================================ */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card-full {
  grid-column: 1 / 2;
}

.chart-body-large {
  min-height: 300px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--neutral-600);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.chart-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.chart-header .chart-title {
  flex-shrink: 0;
}

.chart-header .chart-legend {
  flex: 1;
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
}

.chart-filter {
  padding: 6px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--neutral-600);
  background: white;
  cursor: pointer;
}

.chart-body {
  min-height: 250px;
}

/* Keyword List */
.keyword-list {
  list-style: none;
}

.keyword-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.keyword-item:last-child {
  border-bottom: none;
}

.keyword-rank {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-right: 12px;
}

.keyword-text {
  flex: 1;
  font-size: 14px;
  color: var(--neutral-700);
}

.keyword-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-500);
}

/* ================================================
   Recent Section
   ================================================ */
.recent-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
}

.section-link {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
}

.section-link:hover {
  text-decoration: underline;
}

/* Data Table */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--neutral-100);
}

.data-table th {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-500);
  background: var(--neutral-50);
}

.data-table td {
  font-size: 14px;
  color: var(--neutral-700);
}

.data-table tbody tr:hover {
  background: var(--neutral-50);
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.pending {
  background: #FEF3C7;
  color: #D97706;
}

.status-badge.progress {
  background: #DBEAFE;
  color: #2563EB;
}

.status-badge.complete {
  background: #D1FAE5;
  color: #059669;
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    overflow-x: hidden;
  }

  .main-content {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .chart-card {
    padding: 16px;
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .chart-legend {
    width: 100%;
    gap: 8px;
  }

  .legend-item {
    font-size: 11px;
  }

  .chart-filter {
    width: 100%;
  }

  .chart-body {
    min-height: 200px;
  }

  .chart-body-large {
    min-height: 250px;
  }

  .keyword-item {
    padding: 10px 0;
  }

  .keyword-text {
    font-size: 13px;
  }

  .keyword-count {
    font-size: 12px;
  }

  .recent-section {
    padding: 16px;
  }

  .recent-section .table-container {
    overflow: visible;
  }

  .recent-section .data-table {
    display: block;
  }

  .recent-section .data-table thead {
    display: none;
  }

  .recent-section .data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .recent-section .data-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    background: var(--neutral-50);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--neutral-200);
  }

  .recent-section .data-table td {
    padding: 0;
    border: none;
  }

  .recent-section .data-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
    color: var(--neutral-500);
  }

  .recent-section .data-table td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    font-weight: 600;
    font-size: 14px;
    text-align: right;
  }

  .recent-section .data-table td:nth-child(3),
  .recent-section .data-table td:nth-child(4) {
    display: none;
  }

  .recent-section .data-table td:nth-child(5) {
    grid-column: 1;
    grid-row: 2;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
  }

  .recent-section .data-table td:nth-child(6) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .recent-section .status-badge {
    font-size: 11px;
    padding: 3px 8px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 12px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .page-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
  }

  .stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .stat-value {
    font-size: 18px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat-change {
    font-size: 10px;
  }
}

/* ================================================
   Settings Page
   ================================================ */

/* Alert Section */
.alert-section {
  margin-bottom: 24px;
}

.alert {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
}

.alert-warning {
  border-left: 4px solid var(--warning);
  background: #FFFBEB;
}

.alert-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FEF3C7;
  border-radius: var(--radius-md);
  color: #D97706;
}

.alert-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 8px;
}

.alert-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--neutral-600);
  line-height: 1.8;
}

.alert-list strong {
  color: var(--neutral-800);
}

/* Settings Section */
.settings-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* Stack Table */
.stack-table .service-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stack-table .service-icon {
  font-size: 20px;
}

.stack-table .service-name strong {
  display: block;
  font-size: 14px;
  color: var(--neutral-800);
}

.stack-table .service-name small {
  font-size: 12px;
  color: var(--neutral-500);
}

.stack-table code {
  background: var(--neutral-100);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--neutral-700);
}

.stack-table a {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
}

.stack-table a:hover {
  text-decoration: underline;
}

.pw-mask {
  color: var(--neutral-400);
  cursor: pointer;
  font-size: 13px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.badge-google {
  background: #E8F0FE;
  color: #1967D2;
}

.badge-success {
  background: #D1FAE5;
  color: #059669;
}

.badge-info {
  background: #DBEAFE;
  color: #2563EB;
}

.badge-warning {
  background: #FEF3C7;
  color: #D97706;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--neutral-200);
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-100);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--neutral-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--neutral-200);
  color: var(--neutral-800);
}

.btn-icon-danger:hover {
  background: #FEE2E2;
  color: #DC2626;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--neutral-200);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--neutral-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--neutral-500);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--neutral-100);
  color: var(--neutral-800);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--neutral-800);
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--neutral-700);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ================================================
   Billing Section
   ================================================ */
.billing-section {
  margin-bottom: 24px;
}

.billing-section .section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 16px;
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.billing-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}

.billing-card.billing-free {
  border-color: var(--success);
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
}

.billing-card.billing-paid {
  border-color: var(--neutral-200);
  background: white;
}

.billing-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.billing-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-800);
}

.billing-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.billing-badge.free {
  background: var(--success);
  color: white;
}

.billing-badge.paid {
  background: var(--neutral-200);
  color: var(--neutral-600);
}

.billing-list {
  list-style: none;
}

.billing-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 14px;
}

.billing-list li:last-child {
  border-bottom: none;
}

.billing-list li strong {
  color: var(--neutral-700);
}

.billing-list li span {
  color: var(--neutral-500);
}

.billing-free .billing-list li span {
  color: #059669;
  font-weight: 500;
}

.billing-note {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--primary);
  text-align: center;
}

@media (max-width: 768px) {
  .billing-grid {
    grid-template-columns: 1fr;
  }
}

/* Traffic Simulation */
.traffic-simulation {
  margin-top: 20px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.traffic-simulation h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 16px;
}

.traffic-simulation h4 svg {
  color: var(--primary);
}

.simulation-content > p {
  font-size: 13px;
  color: var(--neutral-600);
  margin-bottom: 12px;
}

.simulation-examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.simulation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--neutral-50);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.sim-visitors {
  font-weight: 600;
  color: var(--neutral-800);
  min-width: 90px;
}

.sim-calc {
  flex: 1;
  color: var(--neutral-500);
}

.sim-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.sim-status.safe {
  background: #D1FAE5;
  color: #059669;
}

.sim-status.warning {
  background: #FEF3C7;
  color: #D97706;
}

.sim-status.danger {
  background: #FEE2E2;
  color: #DC2626;
}

.simulation-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--neutral-100);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--neutral-600);
}

.traffic-check {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-100);
}

.btn-vercel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #000;
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-vercel:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-vercel svg:last-child {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .simulation-item {
    flex-wrap: wrap;
  }

  .sim-calc {
    width: 100%;
    order: 3;
    margin-top: 4px;
  }
}

/* ================================================
   Leads Page
   ================================================ */

/* Filter Section */
.filter-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 12px;
}

.filter-select {
  padding: 10px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--neutral-700);
  background: white;
  cursor: pointer;
  min-width: 140px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

.search-group {
  display: flex;
  gap: 8px;
}

.search-input {
  padding: 10px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  width: 280px;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-search {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-search:hover {
  background: var(--primary-dark);
}

.filter-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-100);
  font-size: 14px;
  color: var(--neutral-600);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-export:hover {
  background: var(--neutral-200);
}

/* Leads Table */
.leads-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.leads-table th,
.leads-table td {
  white-space: nowrap;
}

.leads-table td a {
  color: var(--primary);
  text-decoration: none;
}

.leads-table td a:hover {
  text-decoration: underline;
}

/* Status Select */
.status-select {
  padding: 6px 10px;
  border: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.status-select.pending {
  background-color: #FEF3C7;
  color: #D97706;
}

.status-select.progress {
  background-color: #DBEAFE;
  color: #2563EB;
}

.status-select.complete {
  background-color: #D1FAE5;
  color: #059669;
}

.status-select.cancel {
  background-color: #FEE2E2;
  color: #DC2626;
}

/* Memo Input */
.memo-input {
  width: 100%;
  min-width: 150px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--neutral-600);
  background: transparent;
}

.memo-input:hover {
  border-color: var(--neutral-200);
  background: var(--neutral-50);
}

.memo-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--neutral-100);
}

.pagination-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-100);
  border: none;
  border-radius: var(--radius-md);
  color: var(--neutral-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: var(--neutral-600);
}

/* Info Section (Alert) */
.info-section {
  margin-top: 20px;
}

.alert-info {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
}

.alert-info .alert-icon {
  background: #DBEAFE;
  color: var(--primary);
}

.alert-info .alert-content p {
  margin: 0;
  font-size: 14px;
  color: var(--neutral-600);
}

/* Detail Modal */
.modal-lg {
  max-width: 600px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item.full-width {
  grid-column: 1 / -1;
}

.detail-item label {
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
}

.detail-item span,
.detail-item p {
  font-size: 14px;
  color: var(--neutral-800);
}

.detail-item p {
  margin: 0;
  line-height: 1.6;
  padding: 12px;
  background: var(--neutral-50);
  border-radius: var(--radius-md);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--neutral-700);
  cursor: pointer;
  border-radius: var(--radius-md);
  margin-right: 12px;
}

.mobile-menu-btn:hover {
  background: var(--neutral-100);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .header-left {
    display: flex;
    align-items: center;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    flex-wrap: wrap;
  }

  .filter-select {
    flex: 1;
    min-width: 0;
  }

  .search-group {
    width: 100%;
  }

  .search-input {
    flex: 1;
    width: auto;
  }

  .leads-table {
    font-size: 13px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   Board Page
   ================================================ */
.board-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.board-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--neutral-100);
}

.board-tab {
  padding: 10px 20px;
  background: var(--neutral-100);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.board-tab:hover {
  background: var(--neutral-200);
}

.board-tab.active {
  background: var(--primary);
  color: white;
}

.board-table .post-title {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-table .post-title a {
  color: var(--neutral-800);
  text-decoration: none;
  font-weight: 500;
}

.board-table .post-title a:hover {
  color: var(--primary);
}

/* ================================================
   Images Page
   ================================================ */
.images-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.upload-zone {
  border: 2px dashed var(--neutral-300);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  margin-bottom: 24px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-zone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--neutral-400);
}

.upload-zone-text {
  font-size: 16px;
  color: var(--neutral-700);
  margin-bottom: 8px;
}

.upload-zone-hint {
  font-size: 13px;
  color: var(--neutral-500);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.image-card {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
}

.image-card:hover {
  box-shadow: var(--shadow-md);
}

.image-preview {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--neutral-100);
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-card:hover .image-overlay {
  opacity: 1;
}

.image-overlay button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: none;
  border-radius: var(--radius-md);
  color: var(--neutral-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-overlay button:hover {
  background: var(--primary);
  color: white;
}

.image-overlay button.btn-delete:hover {
  background: var(--error);
}

.image-info {
  padding: 12px;
}

.image-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-800);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--neutral-500);
}

.image-alt-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-top: 8px;
}

.image-alt-input:focus {
  outline: none;
  border-color: var(--primary);
}

.webp-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--success);
  color: white;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

/* ================================================
   Mobile Responsive - Leads Page
   ================================================ */
@media (max-width: 768px) {
  .leads-table thead {
    display: none;
  }

  .leads-table tbody tr {
    display: block;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
  }

  .leads-table tbody tr:hover {
    background: white;
    box-shadow: var(--shadow-md);
  }

  .leads-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--neutral-100);
  }

  .leads-table td:last-child {
    border-bottom: none;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
  }

  .leads-table td:first-child {
    display: none;
  }

  .leads-table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    color: var(--neutral-500);
    flex-shrink: 0;
    margin-right: 12px;
  }

  .leads-table td:last-child::before {
    display: none;
  }

  .memo-input {
    min-width: auto;
    max-width: 180px;
    text-align: right;
  }

  .status-select {
    flex-shrink: 0;
  }

  .filter-section {
    padding: 16px;
  }

  .filter-summary {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .btn-export {
    width: 100%;
    justify-content: center;
  }
}

/* Board Page Mobile */
@media (max-width: 768px) {
  .board-section {
    padding: 16px;
  }

  .board-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .board-tabs::-webkit-scrollbar {
    display: none;
  }

  .board-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .section-header .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .board-table thead {
    display: none;
  }

  .board-table tbody tr {
    display: block;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
  }

  .board-table td {
    display: block;
    padding: 4px 0;
    border: none;
  }

  .board-table td:first-child {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 12px;
    color: var(--neutral-400);
  }

  .board-table tbody tr {
    position: relative;
  }

  .board-table .post-title {
    max-width: none;
    white-space: normal;
    font-size: 15px;
    line-height: 1.5;
    padding-right: 40px;
    margin-bottom: 8px;
  }

  .board-table td:nth-child(3),
  .board-table td:nth-child(4),
  .board-table td:nth-child(5) {
    display: inline-block;
    font-size: 12px;
    color: var(--neutral-500);
    margin-right: 12px;
  }

  .board-table td:nth-child(6) {
    display: inline-block;
    margin-top: 8px;
  }

  .board-table td:last-child {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    gap: 8px;
  }

  .modal-lg {
    max-width: calc(100vw - 32px);
    margin: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Images Page Mobile */
@media (max-width: 768px) {
  .images-section {
    padding: 16px;
  }

  .upload-zone {
    padding: 24px;
  }

  .upload-zone-icon {
    width: 36px;
    height: 36px;
  }

  .upload-zone-text {
    font-size: 14px;
  }

  .upload-zone-hint {
    font-size: 12px;
  }

  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .image-card {
    border-radius: var(--radius-md);
  }

  .image-info {
    padding: 10px;
  }

  .image-name {
    font-size: 12px;
  }

  .image-meta {
    font-size: 11px;
  }

  .image-alt-input {
    padding: 6px 8px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .image-grid {
    grid-template-columns: 1fr;
  }
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

@media (max-width: 768px) {
  .sidebar-overlay.open {
    display: block;
  }
}

/* ================================================
   Analytics Page
   ================================================ */

/* Period Tabs */
.period-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.period-tab {
  padding: 10px 24px;
  background: var(--neutral-100);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.period-tab:hover {
  background: var(--neutral-200);
}

.period-tab.active {
  background: var(--primary);
  color: white;
}

.period-range {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
}

.period-range-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-500);
}

.period-range-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-800);
}

/* Analytics Charts */
.analytics-charts {
  grid-template-columns: 1fr;
}

.chart-card-wide {
  width: 100%;
}

/* Insights Section */
.insights-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.insights-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
}

.insights-section .section-title svg {
  color: var(--primary);
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.insight-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
}

.insight-card.positive {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.insight-card.warning {
  background: #FFFBEB;
  border-color: #FDE68A;
}

.insight-card.info {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.insight-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.insight-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 4px;
}

.insight-desc {
  font-size: 13px;
  color: var(--neutral-600);
  line-height: 1.5;
  margin: 0;
}

/* Conversion Section */
.conversion-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.conversion-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
}

.conversion-section .section-title svg {
  color: var(--success);
}

.conversion-card {
  margin-top: 20px;
}

.conversion-item {
  padding: 20px;
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border-radius: var(--radius-lg);
  border: 1px solid #BBF7D0;
}

.conversion-label {
  font-size: 14px;
  color: var(--neutral-600);
  margin-bottom: 8px;
}

.conversion-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 12px;
}

.conversion-bar {
  height: 8px;
  background: #D1FAE5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.conversion-fill {
  height: 100%;
  background: var(--success);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.conversion-detail {
  font-size: 13px;
  color: var(--neutral-500);
}

/* Analytics Chart */
.analytics-charts .chart-card {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.analytics-charts .chart-body-large {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.analytics-charts .chart-body-large canvas {
  width: 100% !important;
  max-width: 100%;
}

/* Analytics Chart Mobile */
@media (max-width: 768px) {
  .analytics-charts {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .analytics-charts .chart-card {
    padding: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .analytics-charts .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }

  .analytics-charts .chart-title {
    font-size: 14px;
  }

  .analytics-charts .chart-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
  }

  .analytics-charts .legend-item {
    font-size: 10px;
    padding: 4px 0;
  }

  .analytics-charts .legend-color {
    width: 10px;
    height: 10px;
  }

  .analytics-charts .chart-body-large {
    min-height: 220px;
    height: 220px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .analytics-charts .chart-body-large {
    min-height: 180px;
    height: 180px;
  }

  .analytics-charts .chart-legend {
    gap: 4px;
  }

  .analytics-charts .legend-item {
    font-size: 9px;
  }
}

/* Analytics Data Table */
.data-table-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.data-table-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 16px;
}

.data-table-section .section-title svg {
  color: var(--primary);
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--neutral-100);
}

.analytics-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-500);
  background: var(--neutral-50);
  white-space: nowrap;
}

.analytics-table th:first-child {
  text-align: left;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.analytics-table th:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.analytics-table td {
  font-size: 14px;
  color: var(--neutral-700);
  white-space: nowrap;
}

.analytics-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--neutral-800);
}

.analytics-table tbody tr:hover {
  background: var(--neutral-50);
}

.analytics-table tbody tr:last-child td {
  border-bottom: none;
}

.analytics-table .summary-row {
  background: var(--neutral-100);
  border-top: 2px solid var(--neutral-300);
}

.analytics-table .summary-row td {
  font-weight: 600;
  color: var(--neutral-800);
}

.analytics-table .summary-row:hover {
  background: var(--neutral-100);
}

.analytics-table .month-group-header {
  background: var(--neutral-100);
  cursor: pointer;
  transition: all 0.2s ease;
}

.analytics-table .month-group-header:hover {
  background: var(--neutral-200);
}

.analytics-table .month-group-header.current {
  background: var(--primary-light);
}

.analytics-table .month-group-header.current:hover {
  background: #DBEAFE;
}

.month-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-icon {
  font-size: 10px;
  color: var(--neutral-500);
  width: 14px;
  flex-shrink: 0;
}

.month-toggle strong {
  font-size: 14px;
  color: var(--neutral-800);
}

.analytics-table .month-group-header td {
  font-weight: 600;
}

.analytics-table .month-detail-row {
  background: white;
}

.analytics-table .month-detail-row:hover {
  background: var(--neutral-50);
}

.analytics-table .month-subtotal {
  background: var(--neutral-50);
  border-bottom: 2px solid var(--neutral-200);
}

.analytics-table .month-subtotal td {
  font-size: 13px;
}

.analytics-table tbody tr.current {
  background: var(--primary-light);
}

.analytics-table tbody tr.current:hover {
  background: #DBEAFE;
}

.analytics-table .text-primary {
  color: var(--primary);
  font-weight: 600;
}

.analytics-table .text-success {
  color: var(--success);
  font-weight: 600;
}

.analytics-table .text-warning {
  color: #D97706;
  font-weight: 600;
}

.analytics-table .text-error {
  color: var(--error);
  font-weight: 600;
}

.change-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}

.change-badge.positive {
  background: #D1FAE5;
  color: #059669;
}

.change-badge.negative {
  background: #FEE2E2;
  color: #DC2626;
}

@media (max-width: 768px) {
  .data-table-section {
    padding: 12px;
  }

  .data-table-section .section-title {
    font-size: 14px;
  }

  .analytics-table {
    width: 100%;
    table-layout: fixed;
  }

  .analytics-table th,
  .analytics-table td {
    padding: 8px 4px;
    font-size: 11px;
    white-space: nowrap;
    text-align: center;
  }

  .analytics-table th {
    font-size: 10px;
  }

  .analytics-table td:first-child,
  .analytics-table th:first-child {
    text-align: left;
    padding-left: 8px;
  }

  .month-toggle {
    gap: 4px;
  }

  .toggle-icon {
    font-size: 8px;
    width: 10px;
  }

  .month-toggle strong {
    font-size: 10px;
  }

  .analytics-table .month-group-header td {
    font-weight: 600;
    font-size: 10px;
  }

  .analytics-table .month-detail-row td:first-child {
    padding-left: 20px !important;
  }

  .analytics-table .month-subtotal td:first-child {
    padding-left: 20px !important;
  }

  .change-badge {
    display: none;
  }
}

@media (max-width: 480px) {
  .data-table-section {
    padding: 10px;
  }

  .analytics-table th,
  .analytics-table td {
    padding: 6px 2px;
    font-size: 10px;
  }

  .analytics-table th {
    font-size: 9px;
  }

  .month-toggle {
    gap: 3px;
  }

  .toggle-icon {
    font-size: 7px;
    width: 8px;
  }

  .month-toggle strong {
    font-size: 9px;
  }

  .analytics-table .month-group-header td {
    font-size: 9px;
  }

  .analytics-table .month-detail-row td:first-child,
  .analytics-table .month-subtotal td:first-child {
    padding-left: 16px !important;
  }
}

/* Chart Navigation (Mobile) */
.chart-nav-wrapper {
  position: relative;
  width: 100%;
}

.chart-nav-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  color: var(--neutral-600);
  cursor: pointer;
  z-index: 10;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chart-nav-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.chart-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.chart-nav-btn:disabled:hover {
  background: white;
  color: var(--neutral-600);
  border-color: var(--neutral-200);
}

.chart-nav-btn.prev {
  left: -8px;
}

.chart-nav-btn.next {
  right: -8px;
}

.chart-nav-indicator {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.chart-nav-dot {
  width: 8px;
  height: 8px;
  background: var(--neutral-300);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.chart-nav-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 4px;
}

/* Analytics Mobile */
@media (max-width: 768px) {
  .chart-nav-btn {
    display: flex;
  }

  .chart-nav-indicator {
    display: flex;
  }

  .chart-nav-wrapper {
    padding: 0 28px;
  }

  .period-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .period-tabs::-webkit-scrollbar {
    display: none;
  }

  .period-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
  }

  .period-range {
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
  }

  .period-range-label {
    font-size: 11px;
  }

  .period-range-value {
    font-size: 12px;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .insight-card {
    padding: 14px;
  }

  .insight-icon {
    font-size: 20px;
  }

  .insight-title {
    font-size: 13px;
  }

  .insight-desc {
    font-size: 12px;
  }

  .conversion-value {
    font-size: 28px;
  }

  .insights-section,
  .conversion-section {
    padding: 16px;
  }
}

/* ================================================
   Settings Page Mobile
   ================================================ */
@media (max-width: 768px) {
  .billing-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .billing-card {
    padding: 16px;
  }

  .billing-header h4 {
    font-size: 14px;
  }

  .billing-list li {
    padding: 8px 0;
    font-size: 13px;
  }

  .billing-note {
    font-size: 12px;
    padding: 10px 12px;
  }

  .traffic-simulation {
    padding: 16px;
  }

  .traffic-simulation h4 {
    font-size: 13px;
  }

  .simulation-content > p {
    font-size: 12px;
  }

  .simulation-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px;
  }

  .sim-visitors {
    min-width: auto;
    font-size: 14px;
  }

  .sim-calc {
    font-size: 12px;
    margin-top: 0;
  }

  .sim-status {
    align-self: flex-end;
    margin-top: -24px;
  }

  .simulation-note {
    font-size: 11px;
  }

  .btn-vercel {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }

  .settings-section {
    padding: 16px;
  }

  .settings-section .section-header {
    flex-direction: column;
    gap: 12px;
  }

  .settings-section .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .stack-table {
    display: block;
  }

  .stack-table thead {
    display: none;
  }

  .stack-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .stack-table tr {
    display: block;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 16px;
    position: relative;
  }

  .stack-table td {
    display: block;
    padding: 4px 0;
    border: none;
  }

  .stack-table td:first-child {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--neutral-200);
  }

  .stack-table .service-name {
    gap: 10px;
  }

  .stack-table .service-icon {
    font-size: 18px;
  }

  .stack-table .service-name strong {
    font-size: 15px;
  }

  .stack-table td:nth-child(2),
  .stack-table td:nth-child(3) {
    display: inline-block;
    font-size: 12px;
    margin-right: 12px;
  }

  .stack-table td:nth-child(2)::before {
    content: "ID: ";
    color: var(--neutral-500);
    font-size: 11px;
  }

  .stack-table td:nth-child(3)::before {
    content: "PW: ";
    color: var(--neutral-500);
    font-size: 11px;
  }

  .stack-table code {
    font-size: 12px;
    padding: 2px 6px;
  }

  .stack-table td:nth-child(4) {
    display: none;
  }

  .stack-table td:nth-child(5) {
    margin-top: 8px;
  }

  .stack-table td:last-child {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
  }

  .stack-table .btn-icon {
    width: 28px;
    height: 28px;
  }
}
