/* PDFtoolApp Admin Panel — Shared Styles */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F8FAFC;
  color: #0F172A;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: #2563EB; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* Typography */
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; color: #0F172A; }
h3 { font-size: 15px; font-weight: 600; color: #334155; }

/* Header */
.admin-header {
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand { font-size: 18px; font-weight: 700; color: #0F172A; }
.header-brand span { color: #2563EB; }

.header-nav { display: flex; gap: 24px; }
.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: #64748B;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.header-nav a:hover { color: #0F172A; text-decoration: none; }
.header-nav a.active { color: #2563EB; border-bottom-color: #2563EB; }

/* Cards */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  border-bottom: 1px solid #E2E8F0;
}
.data-table td {
  font-size: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #F8FAFC; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  color: #0F172A;
  background: #fff;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
textarea.form-input { min-height: 100px; resize: vertical; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: #2563EB; color: #fff; }
.btn-primary:hover { background: #1D4ED8; text-decoration: none; color: #fff; }
.btn-danger { background: #EF4444; color: #fff; }
.btn-danger:hover { background: #DC2626; text-decoration: none; color: #fff; }
.btn-success { background: #16A34A; color: #fff; }
.btn-success:hover { background: #15803D; text-decoration: none; color: #fff; }
.btn-outline { background: #fff; color: #334155; border: 1px solid #E2E8F0; }
.btn-outline:hover { background: #F8FAFC; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-sm.icon-only { padding: 6px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-success { background: rgba(22,163,74,0.1); color: #16A34A; }
.badge-danger { background: rgba(239,68,68,0.1); color: #EF4444; }
.badge-warning { background: rgba(245,158,11,0.1); color: #D97706; }
.badge-neutral { background: #F1F5F9; color: #64748B; }
.badge-blue { background: rgba(37,99,235,0.1); color: #2563EB; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  padding: 20px;
}
.stat-value { font-size: 28px; font-weight: 700; color: #0F172A; }
.stat-label { font-size: 13px; color: #64748B; margin-top: 4px; }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}

/* Search */
.search-bar { display: flex; gap: 12px; margin-bottom: 16px; }
.search-bar .form-input { flex: 1; }

/* Filters */
.filter-row { display: flex; gap: 8px; margin-bottom: 16px; }
.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #64748B;
  transition: all 0.15s;
}
.filter-chip.active { background: #2563EB; color: #fff; border-color: #2563EB; }

/* Actions */
.action-row { display: flex; gap: 8px; align-items: center; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header {
  padding: 20px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 { font-size: 18px; }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 0 24px 24px;
  display: flex; gap: 12px; justify-content: flex-end;
}

/* Alert / Info boxes */
.info-box {
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #1E40AF;
  margin-bottom: 16px;
}
.info-box.warning {
  background: rgba(245,158,11,0.05);
  border-color: rgba(245,158,11,0.2);
  color: #92400E;
}

/* Responsive */
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .header-nav { gap: 16px; }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 10px 8px; }
}