/* Lojitstik Operasyon Paneli — CDN Tailwind ile uyumlu özel stiller */

:root {
  --brand-50: #eff6ff;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-900: #1e3a5f;
  --amber-field: #fffbeb;
  --amber-border: #fcd34d;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1e293b;
}

/* --- Form --- */
.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.input-field,
select.input-field,
textarea.input-field {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-field:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-field::placeholder { color: #94a3b8; }

.input-field.bg-amber-50,
.input-highlight {
  background: var(--amber-field) !important;
  border-color: var(--amber-border);
}

.input-field.bg-amber-50:focus,
.input-highlight:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

textarea.input-field { resize: vertical; min-height: 2.5rem; }

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand-600);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover { background: var(--brand-700); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover { background: #e2e8f0; }

.btn-danger {
  font-size: 0.75rem;
  color: #dc2626;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.btn-danger:hover { text-decoration: underline; }

.btn-link {
  font-size: 0.75rem;
  color: var(--brand-600);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  font-weight: 600;
}
.btn-link:hover { text-decoration: underline; }

/* --- Cards --- */
.panel-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.panel-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
}

.panel-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.panel-card-body { padding: 1.25rem 1.5rem; }

.section-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* --- Tables --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-empty {
  text-align: center;
  padding: 2.5rem 1rem !important;
  color: #94a3b8 !important;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-sent { background: #d1fae5; color: #047857; }
.badge-draft { background: #f1f5f9; color: #475569; }

/* --- Sidebar nav --- */
.nav-btn {
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.15s;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.1); }
.nav-btn.active { background: rgba(255, 255, 255, 0.18); color: #fff; font-weight: 600; }

/* --- Auth --- */
#authScreen .auth-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.remember-note {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.75rem;
  text-align: center;
}

/* --- Modal --- */
#modal .modal-box {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}

/* --- Message preview --- */
.message-preview {
  width: 100%;
  min-height: 22rem;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  color: #1e293b;
  resize: vertical;
}

/* --- Form grid --- */
.form-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: span 2; }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

/* --- Broadcast history --- */
.history-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}
.history-item:last-child { border-bottom: none; }
