/* 3DPM Design System — v1.0 (21.05.2026) */
/* Inspired by Linear + Vercel + Stripe — sade monochrome + bordo brand accent */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* === Brand === */
  --primary: #681620;
  --primary-hover: #811c2a;
  --primary-dark: #4d1018;
  --primary-soft: rgba(104, 22, 32, 0.08);

  /* === Surface === */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f5f5f7;
  --surface-active: #ebebed;

  /* === Border === */
  --border: #e5e5e7;
  --border-strong: #d2d2d7;
  --border-focus: var(--primary);

  /* === Text === */
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #a1a1a6;
  --text-inverse: #ffffff;

  /* === Status === */
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #ea580c;
  --warning-soft: #fff7ed;
  --info: #2563eb;
  --info-soft: #eff6ff;

  /* === Spacing === */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;  --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;  --space-10: 40px;
  --space-12: 48px; --space-16: 64px;

  /* === Radius === */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* === Shadow === */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 50px -12px rgba(0,0,0,.12);
  --shadow-brand: 0 8px 24px -8px rgba(104, 22, 32, .35);

  /* === Transitions === */
  --transition: 150ms ease-out;
  --transition-slow: 250ms ease-out;

  /* === Typography === */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { font-family: var(--font-sans); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body { font-size: 14px; line-height: 1.5; }

/* === Typography === */
.h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; }
.h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.25; }
.h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.h4 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.text-body { font-size: 14px; font-weight: 400; }
.text-sm { font-size: 13px; font-weight: 500; }
.text-xs { font-size: 12px; font-weight: 500; }
.text-caption { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-tertiary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.tabular { font-variant-numeric: tabular-nums; }

a { color: var(--primary); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }

/* === Buttons === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--transition); white-space: nowrap; text-decoration: none; user-select: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--text-inverse); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: var(--shadow-brand); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-full { width: 100%; }

/* === Inputs === */
.input { width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: 14px; color: var(--text); background: var(--surface); transition: all var(--transition); outline: none; }
.input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-soft); }
.input:disabled { background: var(--surface-hover); color: var(--text-tertiary); }
.input::placeholder { color: var(--text-tertiary); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.field-help { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }

/* Şifre input + göz */
.field-pass { position: relative; }
.field-pass .input { padding-right: 42px; }
.eye-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; background: transparent; border: none; cursor: pointer; color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all var(--transition); padding: 0; }
.eye-btn:hover { background: var(--surface-hover); color: var(--text-secondary); }

/* Checkbox */
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; cursor: pointer; user-select: none; }
.check input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

/* === Cards === */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-xs); }
.card-hover { transition: all var(--transition); }
.card-hover:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-header { margin-bottom: var(--space-4); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.card-subtitle { font-size: 13px; color: var(--text-secondary); }

/* === Alerts === */
.alert { padding: 12px 14px; border-radius: var(--radius); font-size: 13px; line-height: 1.5; display: flex; align-items: flex-start; gap: 10px; border: 1px solid transparent; }
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-success { background: var(--success-soft); color: #166534; border-color: #bbf7d0; }
.alert-warning { background: var(--warning-soft); color: #9a3412; border-color: #fed7aa; }
.alert-info { background: var(--info-soft); color: #1e40af; border-color: #bfdbfe; }

/* === Badges === */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.badge-success { background: var(--success-soft); color: #15803d; }
.badge-danger { background: var(--danger-soft); color: #b91c1c; }
.badge-warning { background: var(--warning-soft); color: #c2410c; }
.badge-info { background: var(--info-soft); color: #1e40af; }
.badge-neutral { background: var(--surface-active); color: var(--text-secondary); }

/* === Utilities === */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.relative { position: relative; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* === Auth page layout (2-column) === */
.auth-layout { display: grid; grid-template-columns: 480px 1fr; min-height: 100vh; }
@media (max-width: 900px) { .auth-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } }

.auth-brand { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--text-inverse); padding: 48px 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand::before { content: ''; position: absolute; top: -50%; right: -30%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%); pointer-events: none; }
.auth-brand-logo { font-size: 26px; font-weight: 800; letter-spacing: -0.4px; display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand-logo-dot { width: 10px; height: 10px; background: white; border-radius: 50%; }
.auth-brand-body { position: relative; z-index: 1; }
.auth-brand-body h2 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -1px; margin-bottom: 16px; }
.auth-brand-body p { font-size: 15px; opacity: 0.85; line-height: 1.6; }
.auth-brand-features { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; }
.auth-brand-feature { display: flex; align-items: center; gap: 12px; font-size: 14px; opacity: 0.9; }
.auth-brand-footer { position: relative; z-index: 1; font-size: 12px; opacity: 0.6; }
@media (max-width: 900px) { .auth-brand { padding: 24px 28px; } .auth-brand-logo { font-size: 22px; } .auth-brand-body h2 { font-size: 20px; margin-bottom: 0; } .auth-brand-body p, .auth-brand-features, .auth-brand-footer { display: none; } }

.auth-form { background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 40px 24px; overflow-y: auto; }
.auth-form-inner { width: 100%; max-width: 380px; }
.auth-form-header { margin-bottom: 28px; }
.auth-form-title { font-size: 26px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 8px; }
.auth-form-subtitle { color: var(--text-secondary); font-size: 14px; }
.auth-form-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; font-size: 12px; color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; gap: 6px; }

/* OTP big input */
.input-otp { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 8px; font-family: var(--font-mono); height: 56px; }


/* Sortable table headers */
th.sortable, th[data-sort] {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 22px !important;
}
th.sortable:hover, th[data-sort]:hover { background: var(--surface-hover); }
th.sortable::after, th[data-sort]::after {
  content: '⇅';
  position: absolute;
  right: 8px;
  opacity: 0.3;
  font-size: 11px;
}
th.sort-asc::after { content: '↑'; opacity: 1; color: var(--primary); }
th.sort-desc::after { content: '↓'; opacity: 1; color: var(--primary); }
