/* Thikaa SaaS Admin — shared theme tweaks (lightweight, non-destructive) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --tk-primary: #667eea;
  --tk-primary-2: #764ba2;
  --tk-bg: #f4f6f9;
  --tk-text: #1f2937;
  --tk-muted: #6b7280;
  --tk-success: #10b981;
  --tk-danger: #ef4444;
  --tk-warning: #f59e0b;
  --tk-card: #ffffff;
  --tk-border: #e5e7eb;
}

html, body { font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
body { background: var(--tk-bg); color: var(--tk-text); }

/* Dark theme */
:root[data-theme='dark'] {
  --tk-primary: #8b9cf5;
  --tk-primary-2: #9b7cd4;
  --tk-bg: #0f172a;
  --tk-text: #e5e7eb;
  --tk-muted: #9ca3af;
  --tk-success: #22c55e;
  --tk-danger: #f87171;
  --tk-warning: #fbbf24;
  --tk-card: #111827;
  --tk-border: #1f2937;
}

/* Containers */
.container, .container-fluid { max-width: 1400px; }

/* Cards */
.card {
  background: var(--tk-card);
  border: 1px solid var(--tk-border);
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}
.card-header {
  border-bottom: 1px solid var(--tk-border);
  font-weight: 600;
}

/* Buttons */
.btn-primary {
  background: var(--tk-primary);
  border: none;
}
.btn-primary:hover { filter: brightness(0.98); box-shadow: 0 6px 18px rgba(102,126,234,0.2); }
.btn-success { background: var(--tk-success); border: none; }
.btn-danger { background: var(--tk-danger); border: none; }
.btn-secondary { background: #64748b; border: none; }
.btn-outline-secondary:hover { color: #fff; background: #64748b; border-color: #64748b; }
.btn:focus { box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.25); }
.btn-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }

/* Forms */
.form-control, .form-select {
  border: 1.5px solid var(--tk-border);
  border-radius: 10px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--tk-primary);
  box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.2);
}
.form-label { font-weight: 600; color: #374151; }
:root[data-theme='dark'] .form-label { color: #e5e7eb; }

/* Tables */
table.table thead th { border-bottom: 1px solid var(--tk-border); color: #374151; font-weight: 700; }
:root[data-theme='dark'] table.table thead th { color: #e5e7eb; }
table.table tbody tr:hover { background: rgba(102,126,234,0.05); }
table.table td, table.table th { vertical-align: middle; }

/* Alerts */
.alert { border: 0; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger { background: #fee2e2; color: #7f1d1d; }
.alert-info { background: #e0e7ff; color: #1e40af; }
:root[data-theme='dark'] .alert-success { background: #064e3b; color: #bbf7d0; }
:root[data-theme='dark'] .alert-danger { background: #7f1d1d; color: #fecaca; }
:root[data-theme='dark'] .alert-info { background: #1e3a8a; color: #c7d2fe; }

/* Status badges */
.status { padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-active { background: #dcfce7; color: #166534; }
.status-trial { background: #fff7ed; color: #9a3412; }
.status-suspended { background: #fee2e2; color: #991b1b; }
:root[data-theme='dark'] .status-active { background: #064e3b; color: #a7f3d0; }
:root[data-theme='dark'] .status-trial { background: #7c2d12; color: #fed7aa; }
:root[data-theme='dark'] .status-suspended { background: #7f1d1d; color: #fecaca; }

/* Small utilities */
.muted { color: var(--tk-muted); }
.shadow-sm-hover:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.rounded-12 { border-radius: 12px; }
.rounded-14 { border-radius: 14px; }
.soft { background: rgba(102,126,234,0.08); border: 1px dashed rgba(102,126,234,0.35); }

/* Responsive tweaks */
@media (max-width: 768px) {
  .card { border-radius: 12px; }
  .btn { border-radius: 10px; }
}

/* Density: compact */
:root[data-density='compact'] table.table td,
:root[data-density='compact'] table.table th { padding: 0.35rem 0.5rem; font-size: 0.92rem; }
:root[data-density='compact'] .form-control,
:root[data-density='compact'] .form-select { padding: 6px 10px; font-size: 0.95rem; }
:root[data-density='compact'] .btn { padding: 6px 10px; font-size: 0.92rem; }
:root[data-density='compact'] .btn-icon { width: 30px; height: 30px; }

/* Page banner */
.page-banner { background: var(--tk-primary); color: #fff; padding: 16px 0; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.page-banner-title { margin: 0; font-weight: 800; font-size: 1.75rem; }
.page-banner-subtitle { margin: 4px 0 0 0; opacity: 0.9; }
.page-banner-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-banner-actions > * { margin-left: 8px; }
.page-banner-filters { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.page-chip { background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.45); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
a.page-chip { text-decoration: none; cursor: pointer; }
.page-chip .chip-x { font-weight: 800; opacity: 0.9; }
@media (prefers-color-scheme: dark) {
  .page-chip { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.5); }
}

/* Inline filter form inside banner */
.filter-inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-right: 8px; }
.filter-inline .form-select, .filter-inline .form-control { height: 32px; padding: 4px 28px 4px 8px; font-size: 12px; }
.filter-inline .btn { height: 32px; padding: 4px 10px; font-size: 12px; }
@media (max-width: 768px) {
  .page-banner-row { flex-direction: column; align-items: flex-start; }
  .page-banner-actions { width: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
}

/* List toolbar */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.list-toolbar .summary { color: var(--tk-muted); }
.list-toolbar .per-page { display: inline-flex; align-items: center; gap: 6px; }
.list-toolbar .per-page select { min-width: 80px; }

/* Search block */
.search-bar { background: var(--tk-card); border: 1px solid var(--tk-border); border-radius: 12px; padding: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); margin-bottom: 12px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--tk-muted); font-size: 14px; }
.input-icon input { padding-left: 30px; }
