/* Eptiz UI v1 — kurumsal, açık tema
   Not: Harici font yok; sistem font stack. */

:root{
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f5f9;

  --text: #0f172a;     /* slate-900 */
  --muted: #475569;    /* slate-600 */
  --border: #e2e8f0;   /* slate-200 */

  --primary: #0b3a6a;  /* kurumsal lacivert */
  --primary-2: #0a2f56;
  --primary-contrast: #ffffff;

  --success: #166534;
  --warning: #92400e;
  --danger: #b91c1c;

  --shadow: 0 10px 30px rgba(2, 6, 23, 0.10);
  --shadow-sm: 0 6px 18px rgba(2, 6, 23, 0.08);

  --radius: 14px;
  --radius-sm: 10px;

  --ring: 0 0 0 4px rgba(11, 58, 106, 0.16);

  --container: 1100px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 600px at 15% 0%, rgba(11,58,106,0.10), transparent 55%),
              radial-gradient(900px 500px at 100% 10%, rgba(2,132,199,0.10), transparent 60%),
              var(--bg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.45;
}

a{
  color: var(--primary);
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

.container{
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.shell{
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(246,248,251,0.75);
  border-bottom: 1px solid rgba(226,232,240,0.8);
}

.topbar-inner{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.brand-mark{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  box-shadow: var(--shadow-sm);
}
.brand span{ font-size: 15px; }

.nav-meta{
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.nav-links{
  display: none;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
@media (min-width: 760px){
  .nav-links{ display: flex; }
}

.nav-link{
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.nav-link:hover{
  text-decoration: none;
  background: rgba(11,58,106,0.06);
  border-color: rgba(226,232,240,0.9);
  color: var(--text);
}
.nav-link.is-active{
  background: rgba(11,58,106,0.10);
  border-color: rgba(11,58,106,0.18);
  color: var(--text);
}

.btn-sm{ padding: 8px 10px; font-size: 13px; border-radius: 999px; }

.main{
  flex: 1;
  padding: 34px 0 60px;
}

.center{
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 20px 0 60px;
}

.card{
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-pad{ padding: 22px; }
.card-header{
  padding: 22px 22px 0;
}
.card-title{
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.2px;
}
.card-subtitle{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.card-body{ padding: 18px 22px 22px; }

.grid{
  display: grid;
  gap: 16px;
}
.grid-2{
  grid-template-columns: 1fr;
}
@media (min-width: 920px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
}

.grid-3{
  grid-template-columns: 1fr;
}
@media (min-width: 920px){
  .grid-3{ grid-template-columns: 1fr 1fr 1fr; }
}

.hero{
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(11,58,106,0.10), rgba(14,165,233,0.08)), var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.hero-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-title{
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.3px;
}
.hero-subtitle{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.tile-grid{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px){
  .tile-grid{ grid-template-columns: 1fr 1fr; }
}
.tile{
  display: block;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226,232,240,0.9);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(2,6,23,0.08);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.tile:hover{
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(11,58,106,0.25);
  box-shadow: 0 12px 28px rgba(2,6,23,0.10);
}
.tile-title{
  font-weight: 800;
  color: var(--text);
}
.tile-desc{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.kpi{
  padding: 16px;
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
.kpi .label{
  color: var(--muted);
  font-size: 12px;
}
.kpi .value{
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
}

.form{
  display: grid;
  gap: 14px;
}

.field{
  display: grid;
  gap: 7px;
}
.label{
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.input{
  width: 100%;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: box-shadow 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.input::placeholder{ color: rgba(71,85,105,0.65); }
.input:focus{
  border-color: rgba(11,58,106,0.45);
  box-shadow: var(--ring);
}
.input[aria-invalid="true"]{
  border-color: rgba(185,28,28,0.55);
  box-shadow: 0 0 0 4px rgba(185,28,28,0.12);
}

.actions{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
  user-select: none;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: var(--primary-contrast);
  box-shadow: 0 10px 18px rgba(11,58,106,0.18);
}
.btn-primary:hover{ filter: brightness(1.03); }

.btn-ghost{
  background: transparent;
  color: var(--primary);
  border-color: rgba(11,58,106,0.20);
}
.btn-ghost:hover{
  background: rgba(11,58,106,0.06);
}

.btn-danger{
  background: rgba(185,28,28,0.10);
  color: var(--danger);
  border-color: rgba(185,28,28,0.18);
}
.btn-danger:hover{ background: rgba(185,28,28,0.14); }

.alert{
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.alert-danger{
  border-color: rgba(185,28,28,0.22);
  background: rgba(185,28,28,0.08);
}
.alert-success{
  border-color: rgba(22,101,52,0.22);
  background: rgba(22,101,52,0.08);
}
.alert-warning{
  border-color: rgba(146,64,14,0.22);
  background: rgba(146,64,14,0.08);
}

.hr{
  height: 1px;
  background: rgba(226,232,240,0.9);
  margin: 16px 0;
}

.footer{
  color: rgba(71,85,105,0.9);
  font-size: 12px;
  padding: 18px 0 28px;
}

.small{
  font-size: 12px;
  color: rgba(71,85,105,0.9);
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(226,232,240,0.9);
  background: rgba(241,245,249,0.8);
  color: var(--muted);
}
.badge-strong{
  border-color: rgba(11,58,106,0.22);
  background: rgba(11,58,106,0.08);
  color: var(--primary);
}


/* --- UI Polishing v1.1 --- */
.btn[disabled],
.btn[aria-disabled="true"]{
  opacity: 0.72;
  cursor: not-allowed;
  filter: grayscale(0.08);
  transform: none !important;
}

.btn .spinner{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.55);
  border-top-color: rgba(255,255,255,0.0);
  display: inline-block;
  animation: spin 700ms linear infinite;
}
.btn-ghost .spinner{
  border-color: rgba(11,58,106,0.35);
  border-top-color: rgba(11,58,106,0.0);
}
@keyframes spin { to { transform: rotate(360deg); } }

.hint{
  font-size: 12px;
  color: rgba(71,85,105,0.9);
}

.field-error{
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
}

.pw-wrap{
  position: relative;
}
.pw-toggle{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.9);
  background: rgba(241,245,249,0.8);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.pw-toggle:hover{ background: rgba(241,245,249,1); }



/* Admin table + pagination */
.table-wrap{
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: var(--radius);
}
.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--surface);
}
.table th, .table td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(226,232,240,0.9);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
.table th{
  color: var(--muted);
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tr:hover td{
  background: rgba(11,58,106,0.03);
}

.btn-sm{
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.row-actions{
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-success{
  border-color: rgba(22,101,52,0.22);
  background: rgba(22,101,52,0.08);
  color: var(--success);
}
.badge-warning{
  border-color: rgba(146,64,14,0.22);
  background: rgba(146,64,14,0.08);
  color: var(--warning);
}
.badge-danger{
  border-color: rgba(185,28,28,0.22);
  background: rgba(185,28,28,0.08);
  color: var(--danger);
}

.pagination{
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.page{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.9);
  background: rgba(241,245,249,0.8);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
}
.page:hover{
  background: rgba(11,58,106,0.06);
  text-decoration: none;
}
.page-active{
  background: rgba(11,58,106,0.12);
  border-color: rgba(11,58,106,0.22);
  color: var(--primary);
}


/* --- UI polish additions (v1.3) --- */
.input-group{
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.input-group .input{ flex: 1; }

.btn-icon{
  padding: 0 12px;
  min-width: 72px;
  border-radius: 12px;
}

.field-help{
  font-size: 12px;
  color: rgba(71,85,105,0.92);
  margin-top: 6px;
}

.spinner{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.65);
  border-top-color: rgba(255,255,255,1);
  display: inline-block;
  animation: spin 0.9s linear infinite;
}
.btn-ghost .spinner{
  border-color: rgba(11,58,106,0.25);
  border-top-color: rgba(11,58,106,0.85);
}
.btn-danger .spinner{
  border-color: rgba(185,28,28,0.25);
  border-top-color: rgba(185,28,28,0.85);
}
@keyframes spin{
  to{ transform: rotate(360deg); }
}

.textarea{
  resize: vertical;
  min-height: 220px;
  line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

.prose{
  font-size: 15px;
  line-height: 1.7;
}
.prose code{
  background: rgba(241,245,249,0.9);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(226,232,240,0.9);
}

@media print {
  .no-print { display: none !important; }
  a[href]:after { content: ""; }
}


/* ============================================
   DARK THEME SUPPORT (v2.0)
   Requirements: 6.5
   ============================================ */

/* Dark theme variables */
[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;

  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;

  --primary: #38bdf8;
  --primary-2: #7dd3fc;
  --primary-contrast: #0f172a;

  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.40);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.30);

  --ring: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

/* Dark theme body background */
[data-theme="dark"] body {
  background: radial-gradient(1200px 600px at 15% 0%, rgba(56,189,248,0.08), transparent 55%),
              radial-gradient(900px 500px at 100% 10%, rgba(14,165,233,0.06), transparent 60%),
              var(--bg);
}

/* Dark theme topbar */
[data-theme="dark"] .topbar {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

/* Dark theme cards */
[data-theme="dark"] .card {
  border-color: rgba(51, 65, 85, 0.9);
}

/* Dark theme hero */
[data-theme="dark"] .hero {
  border-color: rgba(51, 65, 85, 0.9);
  background: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(14,165,233,0.06)), var(--surface);
}

/* Dark theme tiles */
[data-theme="dark"] .tile {
  border-color: rgba(51, 65, 85, 0.9);
  background: linear-gradient(180deg, #1e293b, #1a2536);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
[data-theme="dark"] .tile:hover {
  border-color: rgba(56,189,248,0.35);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

/* Dark theme KPI */
[data-theme="dark"] .kpi {
  border-color: rgba(51, 65, 85, 0.9);
  background: linear-gradient(180deg, #1e293b, #1a2536);
}

/* Dark theme inputs */
[data-theme="dark"] .input {
  background: #1e293b;
  border-color: #334155;
}
[data-theme="dark"] .input::placeholder {
  color: rgba(148, 163, 184, 0.65);
}
[data-theme="dark"] .input:focus {
  border-color: rgba(56, 189, 248, 0.55);
}

/* Dark theme buttons */
[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0f172a;
  box-shadow: 0 10px 18px rgba(56, 189, 248, 0.20);
}

[data-theme="dark"] .btn-ghost {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.30);
}
[data-theme="dark"] .btn-ghost:hover {
  background: rgba(56, 189, 248, 0.10);
}

[data-theme="dark"] .btn-danger {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
}
[data-theme="dark"] .btn-danger:hover {
  background: rgba(248, 113, 113, 0.20);
}

/* Dark theme alerts */
[data-theme="dark"] .alert {
  border-color: #334155;
  background: #1e293b;
}
[data-theme="dark"] .alert-danger {
  border-color: rgba(248, 113, 113, 0.30);
  background: rgba(248, 113, 113, 0.12);
}
[data-theme="dark"] .alert-success {
  border-color: rgba(52, 211, 153, 0.30);
  background: rgba(52, 211, 153, 0.12);
}
[data-theme="dark"] .alert-warning {
  border-color: rgba(251, 191, 36, 0.30);
  background: rgba(251, 191, 36, 0.12);
}

/* Dark theme badges */
[data-theme="dark"] .badge {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(51, 65, 85, 0.6);
}
[data-theme="dark"] .badge-strong {
  border-color: rgba(56, 189, 248, 0.30);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}
[data-theme="dark"] .badge-success {
  border-color: rgba(52, 211, 153, 0.30);
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}
[data-theme="dark"] .badge-warning {
  border-color: rgba(251, 191, 36, 0.30);
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}
[data-theme="dark"] .badge-danger {
  border-color: rgba(248, 113, 113, 0.30);
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

/* Dark theme table */
[data-theme="dark"] .table-wrap {
  border-color: rgba(51, 65, 85, 0.9);
}
[data-theme="dark"] .table {
  background: #1e293b;
}
[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
  border-bottom-color: rgba(51, 65, 85, 0.9);
}
[data-theme="dark"] .table th {
  background: linear-gradient(180deg, #1e293b, #1a2536);
}
[data-theme="dark"] .table tr:hover td {
  background: rgba(56, 189, 248, 0.05);
}

/* Dark theme pagination */
[data-theme="dark"] .page {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(51, 65, 85, 0.6);
  color: #38bdf8;
}
[data-theme="dark"] .page:hover {
  background: rgba(56, 189, 248, 0.10);
}
[data-theme="dark"] .page-active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.30);
}

/* Dark theme nav links */
[data-theme="dark"] .nav-link {
  color: #94a3b8;
}
[data-theme="dark"] .nav-link:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(51, 65, 85, 0.9);
  color: #f1f5f9;
}
[data-theme="dark"] .nav-link.is-active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
  color: #f1f5f9;
}

/* Dark theme password toggle */
[data-theme="dark"] .pw-toggle {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(51, 65, 85, 0.6);
}
[data-theme="dark"] .pw-toggle:hover {
  background: rgba(51, 65, 85, 0.8);
}

/* Dark theme prose/code */
[data-theme="dark"] .prose code {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(51, 65, 85, 0.9);
}

/* Dark theme hr */
[data-theme="dark"] .hr {
  background: rgba(51, 65, 85, 0.9);
}

/* Dark theme links */
[data-theme="dark"] a {
  color: #38bdf8;
}

/* Dark theme spinners */
[data-theme="dark"] .btn-ghost .spinner {
  border-color: rgba(56, 189, 248, 0.35);
  border-top-color: rgba(56, 189, 248, 0.85);
}
[data-theme="dark"] .btn-danger .spinner {
  border-color: rgba(248, 113, 113, 0.35);
  border-top-color: rgba(248, 113, 113, 0.85);
}

/* Theme transition animation */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 200ms ease,
              border-color 200ms ease,
              color 150ms ease,
              box-shadow 200ms ease !important;
}
