/* Hal Hatır — Yönetim Paneli Tasarım Sistemi (admin.css) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #2563A8;
  --primary-pressed: #1D4F86;
  --primary-soft: #E6EFFA;
  --family: #6D4CC2;
  --family-soft: #EFEBF9;
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --border: #DCE4EE;
  --text: #122236;
  --text-2: #526477;
  --muted: #8493A4;
  --placeholder: #A9B5C2;

  --ok: #2E9B6A;
  --ok-soft: #E3F4EC;
  --ok-on: #1B6845;

  --quiet: #D99A1E;
  --quiet-soft: #FBF1DC;
  --quiet-on: #8A5D0F;

  --alert: #D14343;
  --alert-soft: #FBE5E5;
  --alert-on: #B33636;

  --nosig: #8A97A6;
  --nosig-soft: #EEF1F4;
  --nosig-on: #5A6B7E;

  --r-card: 14px;
  --r-input: 10px;
  --r-btn: 10px;
  --sidebar-w: 256px;
  --topbar-h: 68px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* Icons — hem SVG hem Material Symbols fontu ile tam uyumlu */
.material-symbols-rounded,
.hh-icon {
  font-family: 'Material Symbols Rounded', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  flex-shrink: 0;
}

.hh-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Admin Shell Layout */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  height: var(--topbar-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.app-logo-badge {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 168, 0.22);
}

.app-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.admin-badge {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.sidebar-menu {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--r-btn);
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.menu-item:hover {
  background: var(--bg);
  color: var(--text);
}

.menu-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
}

.admin-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-info {
  flex: 1;
  min-width: 0;
}

.admin-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-email {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout,
.logout-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-2);
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-logout:hover,
.logout-btn:hover {
  color: var(--alert);
  background: var(--alert-soft);
  border-color: #F3C1C1;
}

/* Main Content Area (Hem .main-content hem .main-wrapper desteklenir) */
.main-content,
.main-wrapper {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.topbar-actions,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-body {
  padding: 28px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1440px;
  width: 100%;
}

/* Cards & Grid */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px 22px;
  position: relative;
  box-shadow: 0 1px 3px rgba(18, 34, 54, 0.03);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.card-body {
  width: 100%;
}

/* KPI Grids & Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 118px;
  box-shadow: 0 1px 3px rgba(18, 34, 54, 0.03);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.kpi-title,
.kpi-label {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-val,
.kpi-value {
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.6px;
  margin: 2px 0 6px;
}

.kpi-sub,
.kpi-delta {
  font-size: 12px;
  line-height: 17px;
  color: var(--muted);
}

.kpi-sub strong {
  color: var(--text-2);
  font-weight: 600;
}

/* Badges & Status Pills */
.badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
}

.badge-ok,
.badge-active,
.badge-yearly,
.pill.ok {
  background: var(--ok-soft);
  color: var(--ok-on);
}

.badge-quiet,
.badge-trial,
.pill.quiet {
  background: var(--quiet-soft);
  color: var(--quiet-on);
}

.badge-alert,
.badge-expired,
.pill.alert {
  background: var(--alert-soft);
  color: var(--alert-on);
}

.badge-nosig,
.pill.nosig {
  background: var(--nosig-soft);
  color: var(--nosig-on);
}

.badge-primary,
.pill.primary {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th,
.table-th {
  height: 42px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td,
.table-td {
  height: 54px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr:first-child td {
  border-top: none;
}

.table tbody tr:hover {
  background: #F9FBFD;
}

.table-empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 20px !important;
  font-size: 13px;
}

/* Buttons & Inputs */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-sm {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-btn);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover,
.btn-secondary:hover,
.btn-sm:hover {
  background: var(--bg);
}

.btn.primary,
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn.primary:hover,
.btn-primary:hover {
  background: var(--primary-pressed);
  border-color: var(--primary-pressed);
}

.btn.danger,
.btn-danger {
  background: var(--alert-soft);
  border-color: #F3C1C1;
  color: var(--alert-on);
}

.btn.danger:hover,
.btn-danger:hover {
  background: #F8D2D2;
}

.btn.sm,
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

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

.form-input,
.form-select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 168, 0.12);
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-w: 210px;
  }
  .content-body {
    padding: 20px;
  }
  .topbar {
    padding: 0 20px;
  }
}
