/* =========================================================
   WA Mailing — Design Tokens & Reset
   Tüm sayfalarda ortak kullanılır (auth, dashboard, ...)
   ========================================================= */
:root {
  --color-primary: #2079FF;
  --color-primary-dark: #1660D6;
  --color-primary-light: #EAF2FF;
  --color-accent: #FF143E;
  --color-accent-light: #FFE9ED;

  --color-success: #17B26A;
  --color-success-light: #E7F9F1;
  --color-warning: #F79009;
  --color-warning-light: #FFF4E5;

  --color-ink: #0E1726;
  --color-ink-soft: #4A5568;
  --color-muted: #8A94A6;
  --color-border: #E4E9F2;
  --color-surface: #FFFFFF;
  --color-bg: #F6F8FC;
  --color-sidebar: #10192E;
  --color-sidebar-soft: rgba(255, 255, 255, 0.64);
  --color-sidebar-border: rgba(255, 255, 255, 0.08);

  --font-heading: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(14, 23, 38, 0.06);
  --shadow-md: 0 12px 32px rgba(14, 23, 38, 0.08);
  --shadow-btn: 0 10px 24px rgba(32, 121, 255, 0.28);

  --header-height: 72px;
  --sidebar-width: 264px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  margin: 0;
}

a { text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; }

/* =========================================================
   Shared components
   ========================================================= */
.link-muted {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-primary);
}

.link-muted:hover { color: var(--color-primary-dark); }

.btn-primary {
  height: 48px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-btn);
  transition: background .15s ease, transform .1s ease;
}

.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-primary:active { transform: translateY(1px); }

.btn-primary:disabled {
  opacity: .7;
  cursor: default;
  transform: none;
}

.btn-primary i { font-size: 18px; }

.btn-ghost {
  height: 40px;
  padding: 0 18px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink-soft);
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s ease, border-color .15s ease;
}

.btn-ghost:hover { background: var(--color-bg); border-color: var(--color-muted); color: var(--color-ink); }

.btn-ghost i { font-size: 16px; }

/* Boxicons glyph'lerinin kutusu tam simetrik olmadığı için flex ile
   ortalansa da metinle hafif kaymış görünebiliyor — line-height:1 ile
   ikonun kendi satır kutusunu daraltıp gerçek dikey ortalamayı sağlıyoruz. */
.btn-primary i,
.btn-ghost i,
.link-muted i {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* =========================================================
   Alert (form/sayfa üstü bilgi/hata/başarı mesajları) — her sayfa paylaşır.
   ========================================================= */
.form-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}

.form-alert--error {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.form-alert--success {
  background: var(--color-success-light);
  color: var(--color-success);
}

.form-alert i { font-size: 17px; flex-shrink: 0; }

.form-alert[hidden] { display: none; }

/* =========================================================
   Editor card — templates, settings gibi birden fazla sayfa paylaşır.
   ========================================================= */
.editor-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.editor-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.editor-card__head h3 {
  font-size: 14.5px;
  font-weight: 700;
}

.editor-card__body { padding: 20px; }

/* =========================================================
   Modal (paylaşılan) — hesap/kullanıcı ekleme gibi formlar için
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 23, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility .15s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(-10px);
  transition: transform .15s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
}

.modal__head h3 {
  font-size: 15px;
  font-weight: 700;
}

.modal__close {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--color-bg);
  border-radius: 8px;
  color: var(--color-ink-soft);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal__close:hover { background: var(--color-accent-light); color: var(--color-accent); }

.modal__body { padding: 22px; }

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--color-border);
}

/* =========================================================
   Form birincilleri (paylaşılan) — modallar, ayarlar, sihirbazlar,
   editör sidebar'ı gibi birçok sayfada ortak kullanılır.
   ========================================================= */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.field:last-child { margin-bottom: 0; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--color-ink);
  background: var(--color-surface);
}

.field input[type="text"]:focus,
.field input[type="email"]:focus,
.field input[type="password"]:focus,
.field input[type="number"]:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.field input:disabled {
  background: var(--color-bg);
  color: var(--color-muted);
}

.field-hint {
  font-size: 11.5px;
  color: var(--color-muted);
}
