/* ============================================================
   panel-visual.css — Enhanced visual layer for Teknik Danışman
   ============================================================ */

/* ─── Smooth Theme/Palette Transition ─────────────────────── */
/* Tema veya palet değiştiğinde renk geçişi yumuşak olsun */
html {
  transition:
    background-color 0.28s ease,
    color 0.28s ease;
}
body,
.card, .glass-card,
.top-menu-card,
.left-sidebar-card, .top-menu-brand, .top-menu-user,
.panel-hero, .hero,
.table-modern thead th,
.form-control, .form-select,
.btn-outline-secondary, .btn-outline-primary {
  transition:
    background-color 0.28s ease,
    border-color 0.28s ease,
    color 0.18s ease,
    box-shadow 0.22s ease !important;
}

/* ─── Card Hover Lift ──────────────────────────────────────── */
.card:not(.top-menu-card):not(.left-sidebar-card) {
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.22s ease,
    background-color 0.28s ease !important;
}
.card:not(.top-menu-card):not(.left-sidebar-card):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(var(--ui-primary-rgb, 15,108,189), 0.10), 0 2px 8px rgba(0,0,0,.06);
  border-color: rgba(var(--ui-primary-rgb, 15,108,189), 0.2);
}
html[data-theme="dark"] .card:not(.top-menu-card):not(.left-sidebar-card):hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(var(--ui-primary-rgb), 0.18);
  border-color: rgba(var(--ui-primary-rgb), 0.28);
}

/* Metric kart hover */
.metric-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.metric-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 36px rgba(0,0,0,.18) !important;
}

/* ─── Page Load Progress Bar ──────────────────────────────── */
#page-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--ui-primary, #4f7cff), #7c3aed);
  transition: width 0.25s ease, opacity 0.4s ease;
  pointer-events: none;
  opacity: 1;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px color-mix(in srgb, var(--ui-primary, #4f7cff) 60%, transparent);
}
#page-progress.done {
  width: 100% !important;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.5s ease 0.1s;
}

/* ─── Focus Visible Rings ──────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--ui-primary, #4f7cff);
  outline-offset: 2px;
  border-radius: var(--ui-radius-sm, 4px);
}
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-primary, #4f7cff) 25%, transparent);
}

/* ─── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--ui-bg, #f4f5f7);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ui-border, #d1d5db) 80%, var(--ui-primary, #4f7cff) 20%);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ui-primary, #4f7cff);
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--ui-bg, #1a1d23);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--ui-border-strong, #3a3f4b);
}

/* ─── CSS-Only Tooltips ────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(3px) scale(0.95);
  background: var(--ui-text, #1a1d27);
  color: var(--ui-bg, #f0f2f5);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  filter: blur(1px);
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
  z-index: 1080;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(2px) scale(0.95);
  border: 5px solid transparent;
  border-top-color: var(--ui-text, #1a1d27);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1080;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  filter: blur(0);
  transform: translateX(-50%) translateY(0) scale(1);
}
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
/* Tooltip below variant */
[data-tooltip-pos="below"]::after {
  bottom: auto;
  top: calc(100% + 6px);
}
[data-tooltip-pos="below"]::before {
  bottom: auto;
  top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: var(--ui-text, #1a1d27);
}

/* Tooltips disabled */
[data-tooltip]::before,
[data-tooltip]::after {
  display: none !important;
}

html[data-help-tips="off"] [data-tooltip]::before,
html[data-help-tips="off"] [data-tooltip]::after {
  display: none !important;
}

/* ─── Skeleton Loaders ─────────────────────────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: -100% 0; }
  100% { background-position:  100% 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--ui-border, #e5e7eb) 25%,
    color-mix(in srgb, var(--ui-border, #e5e7eb) 50%, white) 50%,
    var(--ui-border, #e5e7eb) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s infinite linear;
  border-radius: var(--ui-radius-sm, 4px);
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}
.skeleton * { visibility: hidden; }
.skeleton-text {
  height: 0.85rem;
  border-radius: 3px;
  margin-bottom: 0.45rem;
}
.skeleton-text:last-child { width: 70%; }
.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skeleton-card {
  height: 90px;
  border-radius: var(--ui-radius, 10px);
}
.skeleton-row {
  height: 2.4rem;
  border-radius: var(--ui-radius-sm, 4px);
  margin-bottom: 0.5rem;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(
    90deg,
    #2a2d35 25%,
    #353840 50%,
    #2a2d35 75%
  );
  background-size: 800px 100%;
}

/* ─── Enhanced Form Validation States ─────────────────────── */
.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--bs-success, #198754);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(.375em + .1875rem) center;
  background-size: calc(.75em + .375rem) calc(.75em + .375rem);
  padding-right: calc(1.5em + .75rem);
}
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--bs-danger, #dc3545);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(.375em + .1875rem) center;
  background-size: calc(.75em + .375rem) calc(.75em + .375rem);
  padding-right: calc(1.5em + .75rem);
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-4px); }
  40%       { transform: translateX(4px); }
  60%       { transform: translateX(-3px); }
  80%       { transform: translateX(3px); }
}
.invalid-feedback {
  display: block;
  font-size: 0.78rem;
  color: var(--bs-danger, #dc3545);
  margin-top: 0.2rem;
}
.valid-feedback {
  display: block;
  font-size: 0.78rem;
  color: var(--bs-success, #198754);
  margin-top: 0.2rem;
}

/* ─── Card Hover Lift Effect ───────────────────────────────── */
.card {
  transition: box-shadow 0.22s ease, transform 0.22s ease;
  will-change: transform;
}
.card-lift:hover,
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
}
[data-theme="dark"] .card-lift:hover,
[data-theme="dark"] .stat-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.2);
}

/* ─── Metric Card Visual Enhancements ──────────────────────── */
.metric-card {
  transition: transform 0.22s cubic-bezier(.22,.68,0,1.1), box-shadow 0.22s ease;
  will-change: transform;
  cursor: default;
}
.metric-card:hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
}
[data-theme="dark"] .metric-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.25);
}
.metric-col {
  transition: z-index 0s;
}
.metric-col:hover {
  z-index: 2;
  position: relative;
}

/* Delta badges */
.delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
}
.delta-badge.delta-zero {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.6);
}

/* Mail KPI cards */
.mail-kpi {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mail-kpi:hover {
  transform: translateY(-2px);
}

/* Panel surface cards get subtle hover */
.panel-surface {
  transition: box-shadow 0.2s ease;
}
.panel-surface:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
[data-theme="dark"] .panel-surface:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

/* ─── Stat Cards ───────────────────────────────────────────── */
.stat-card {
  border-radius: var(--ui-radius, 10px);
  border: 1px solid var(--ui-border, #e5e7eb);
  background: var(--ui-surface, #fff);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: default;
}
.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--ui-primary, #4f7cff) 12%, transparent);
  color: var(--ui-primary, #4f7cff);
}
.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ui-text, #1a1d27);
}
.stat-card .stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ui-muted, #6b7280);
  margin-top: 0.1rem;
}

/* ─── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ui-muted, #6b7280);
}
.empty-state .empty-icon {
  font-size: 3rem;
  opacity: 0.35;
  display: block;
  margin-bottom: 0.75rem;
}
.empty-state h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ui-text, #374151);
  margin-bottom: 0.3rem;
}
.empty-state p {
  font-size: 0.82rem;
  margin: 0;
}

/* ─── Table Enhancements ───────────────────────────────────── */
.table-responsive {
  border-radius: var(--ui-radius, 10px);
  overflow: hidden;
}
.table > tbody > tr {
  transition: background 0.13s ease;
}
/* Row highlight on click (JS adds .row-flash) */
@keyframes row-flash {
  0%   { background: color-mix(in srgb, var(--ui-primary, #4f7cff) 18%, transparent); }
  100% { background: transparent; }
}
tr.row-flash {
  animation: row-flash 0.6s ease forwards;
}

/* ─── Badge Variants ───────────────────────────────────────── */
.badge-soft-primary {
  background: color-mix(in srgb, var(--ui-primary, #4f7cff) 14%, transparent);
  color: var(--ui-primary, #4f7cff);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-soft-success {
  background: color-mix(in srgb, #198754 14%, transparent);
  color: #198754;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-soft-danger {
  background: color-mix(in srgb, #dc3545 14%, transparent);
  color: #dc3545;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-soft-warning {
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  color: #b45309;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-soft-secondary {
  background: color-mix(in srgb, #6b7280 14%, transparent);
  color: #6b7280;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
}
[data-theme="dark"] .badge-soft-warning { color: #fbbf24; }

/* ─── Inline Action Buttons ────────────────────────────────── */
.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 0.85rem;
  transition: background 0.15s, transform 0.12s;
}
.btn-icon:hover {
  transform: scale(1.08);
}

/* ─── Password Strength Meter ──────────────────────────────── */
.pw-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--ui-border, #e5e7eb);
  margin-top: 5px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0%;
}
.pw-strength-fill[data-level="1"] { width: 25%; background: #ef4444; }
.pw-strength-fill[data-level="2"] { width: 50%; background: #f59e0b; }
.pw-strength-fill[data-level="3"] { width: 75%; background: #3b82f6; }
.pw-strength-fill[data-level="4"] { width: 100%; background: #10b981; }
.pw-strength-label {
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 3px;
  color: var(--ui-muted, #6b7280);
}

/* soft-enter tanımı dosya sonundaki ENHANCED PAGE TRANSITIONS bölümünde */

/* ─── Modal Enhancement ────────────────────────────────────── */
.modal-content {
  border: 1px solid var(--ui-border, #e5e7eb);
  border-radius: var(--ui-radius, 10px);
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
}
[data-theme="dark"] .modal-content {
  background: var(--ui-surface, #23262e);
  border-color: #3a3f4b;
}

/* ─── Alert Enhancement ────────────────────────────────────── */
.alert {
  border-left: 4px solid transparent;
  border-radius: var(--ui-radius-sm, 6px);
  font-size: 0.855rem;
}
.alert-success { border-left-color: #198754; }
.alert-danger   { border-left-color: #dc3545; }
.alert-warning  { border-left-color: #f59e0b; }
.alert-info     { border-left-color: var(--ui-primary, #4f7cff); }

/* ─── Pagination Enhancement ───────────────────────────────── */
.pagination .page-link {
  border-radius: 6px !important;
  margin: 0 1px;
  min-width: 34px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  border-color: var(--ui-border, #e5e7eb);
  color: var(--ui-text, #374151);
  transition: background 0.15s, color 0.15s;
}
.pagination .page-item.active .page-link {
  background: var(--ui-primary, #4f7cff);
  border-color: var(--ui-primary, #4f7cff);
}
.pagination .page-link:hover {
  background: color-mix(in srgb, var(--ui-primary, #4f7cff) 12%, transparent);
  color: var(--ui-primary, #4f7cff);
}

/* ─── Dashboard Hero Greeting ──────────────────────────────── */
.dash-greeting-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--ui-radius, 10px);
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--ui-primary, #4f7cff) 10%, var(--ui-surface, #fff)) 0%,
    var(--ui-surface, #fff) 100%
  );
  border: 1px solid color-mix(in srgb, var(--ui-primary, #4f7cff) 18%, var(--ui-border, #e5e7eb));
  margin-bottom: 1rem;
}
[data-theme="dark"] .dash-greeting-strip {
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--ui-primary, #4f7cff) 12%, #23262e) 0%,
    #23262e 100%
  );
  border-color: color-mix(in srgb, var(--ui-primary, #4f7cff) 22%, #3a3f4b);
}
.dash-greeting-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.dash-greeting-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ui-primary, #4f7cff), #7c3aed);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -0.03em;
  overflow: hidden;
  position: relative;
}
.dash-greeting-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dash-greeting-avatar-photo span {
  display: none;
}
.dash-greeting-avatar-photo.is-fallback {
  display: flex;
}
.dash-greeting-avatar-photo.is-fallback span {
  display: inline;
}
.dash-greeting-text .greeting-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ui-text, #1a1d27);
  line-height: 1.2;
}
.dash-greeting-text .greeting-userline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
  flex-wrap: wrap;
}
.dash-greeting-text .greeting-user-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ui-text, #1a1d27);
  line-height: 1.1;
}
.dash-greeting-text .greeting-user-role {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(var(--ui-primary-rgb, 15, 108, 189), 0.12);
  color: var(--ui-primary, #4f7cff);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}
.dash-greeting-text .greeting-sub {
  font-size: 0.76rem;
  color: var(--ui-muted, #6b7280);
  margin-top: 0.22rem;
}
.dash-summary-chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}
.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.dash-chip-danger  { background: color-mix(in srgb, #dc3545 14%, transparent); color: #dc3545; }
.dash-chip-warning { background: color-mix(in srgb, #f59e0b 16%, transparent); color: #b45309; }
.dash-chip-primary { background: color-mix(in srgb, var(--ui-primary, #4f7cff) 14%, transparent); color: var(--ui-primary, #4f7cff); }
.dash-chip-success { background: color-mix(in srgb, #10b981 14%, transparent); color: #065f46; }
.dash-chip-muted   { background: color-mix(in srgb, #6b7280 12%, transparent); color: #4b5563; }
[data-theme="dark"] .dash-chip-muted { color: #94a3b8; }
[data-theme="dark"] .dash-greeting-text .greeting-user-name { color: #eef4ff; }
[data-theme="dark"] .dash-greeting-text .greeting-user-role {
  background: rgba(110, 168, 254, 0.16);
  color: #a9d0ff;
}
[data-theme="dark"] .dash-chip-warning { color: #fbbf24; }
[data-theme="dark"] .dash-chip-success { color: #34d399; }

/* ─── Dashboard Critical Table ─────────────────────────────── */
.tbl-critical tr.row-urgent td:first-child {
  border-left: 3px solid #dc3545;
}
.tbl-critical tr.row-warn td:first-child {
  border-left: 3px solid #f59e0b;
}
.tbl-critical tr.row-info td:first-child {
  border-left: 3px solid var(--ui-primary, #4f7cff);
}
.tbl-critical tr.row-urgent {
  background: color-mix(in srgb, #dc3545 5%, transparent) !important;
}
.tbl-critical .type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 0.78rem;
  margin-right: 5px;
  flex-shrink: 0;
}
.tbl-critical .type-icon-license  { background: color-mix(in srgb, #0a7ea4 15%, transparent); color: #0a7ea4; }
.tbl-critical .type-icon-service  { background: color-mix(in srgb, #1f9d61 15%, transparent); color: #1f9d61; }
.tbl-critical .type-icon-server   { background: color-mix(in srgb, #7352ff 15%, transparent); color: #7352ff; }
.tbl-critical td {
  vertical-align: middle;
}

/* ─── Dashboard Payments Table ─────────────────────────────── */
.tbl-payments tr.row-urgent td:first-child  { border-left: 3px solid #dc3545; }
.tbl-payments tr.row-warn td:first-child    { border-left: 3px solid #f59e0b; }
.tbl-payments tr.row-planned td:first-child { border-left: 3px solid #10b981; }
.tbl-payments tr.row-urgent {
  background: color-mix(in srgb, #dc3545 5%, transparent) !important;
}
.tbl-payments tfoot tr {
  font-weight: 700;
  background: color-mix(in srgb, var(--ui-primary, #4f7cff) 8%, transparent);
}
.tbl-payments td { vertical-align: middle; }

/* ─── Timeline Items (Customer Portal) ─────────────────────── */
.timeline-item {
  border-left: 3px solid var(--ui-border, #e5e7eb);
  padding-left: 0.85rem;
  position: relative;
  margin-bottom: 0.6rem;
  transition: border-color 0.15s;
}
.timeline-item.urgent  { border-left-color: #dc3545; }
.timeline-item.warning { border-left-color: #f59e0b; }
.timeline-item.info    { border-left-color: var(--ui-primary, #4f7cff); }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

/* ─── Count-Up Number (Metric Cards) ───────────────────────── */
.metric-value[data-countup] {
  transition: none;
}

/* ─── Chart Loading Skeleton ────────────────────────────────── */
.chart-wrap.loading canvas {
  display: none;
}
.chart-wrap.loading::after {
  content: '';
  display: block;
  height: 180px;
  border-radius: var(--ui-radius-sm, 4px);
}
.chart-wrap.loading {
  position: relative;
}
.chart-wrap.loading::after {
  background: linear-gradient(90deg, var(--ui-border, #e5e7eb) 25%, color-mix(in srgb, var(--ui-border, #e5e7eb) 50%, white) 50%, var(--ui-border, #e5e7eb) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s infinite linear;
}

/* ─── Confirm Modal ────────────────────────────────────────── */
.td-confirm-content {
  border-radius: 16px;
  border: 1px solid var(--ui-border, #e5e7eb);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
[data-theme="dark"] .td-confirm-content {
  background: #23262e;
  border-color: #3a3f4b;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  color: #e2e8f0;
}
[data-theme="dark"] #tdConfirmModal .modal-content {
  background: #23262e;
  border-color: #3a3f4b;
  color: #e2e8f0;
}
[data-theme="dark"] #tdConfirmModal .modal-backdrop {
  background-color: rgba(0,0,0,.7);
}
[data-theme="dark"] .td-confirm-title {
  color: #f1f5f9;
}
[data-theme="dark"] .td-confirm-sub {
  color: #94a3b8;
}
[data-theme="dark"] .td-confirm-icon {
  background: rgba(220, 53, 69, .2);
}
.td-confirm-body {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
}
.td-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: color-mix(in srgb, #dc3545 12%, transparent);
  color: #dc3545;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.td-confirm-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ui-text, #1a1d27);
  margin-bottom: 0.35rem;
}
.td-confirm-sub {
  font-size: 0.82rem;
  color: var(--ui-muted, #6b7280);
}
.td-confirm-footer {
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem 1.25rem;
  border-top: 1px solid var(--ui-border, #e5e7eb);
  background: color-mix(in srgb, var(--ui-bg, #f4f5f7) 60%, transparent);
}
[data-theme="dark"] .td-confirm-footer {
  background: #1e2028;
  border-top-color: #3a3f4b;
}

/* ─── Back to Top Button ────────────────────────────────────── */
.back-to-top-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--ui-border, #e5e7eb);
  background: var(--ui-surface, #fff);
  color: var(--ui-muted, #6b7280);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, background 0.15s, color 0.15s;
  pointer-events: none;
}
.back-to-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top-btn:hover {
  background: var(--ui-primary, #4f7cff);
  color: white;
  border-color: var(--ui-primary, #4f7cff);
}
[data-theme="dark"] .back-to-top-btn {
  background: #2a2d35;
  border-color: #3a3f4b;
  color: #9aa3b0;
}

/* ─── Keyboard Shortcuts Overlay ────────────────────────────── */
.sc-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(3px);
}
.sc-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.sc-panel {
  background: var(--ui-surface, #fff);
  border: 1px solid var(--ui-border, #e5e7eb);
  border-radius: 16px;
  width: 360px;
  max-width: calc(100vw - 2rem);
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s;
}
.sc-overlay.active .sc-panel {
  transform: scale(1);
}
[data-theme="dark"] .sc-panel {
  background: #23262e;
  border-color: #3a3f4b;
}
.sc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--ui-border, #e5e7eb);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ui-muted, #6b7280);
}
[data-theme="dark"] .sc-header { border-bottom-color: #3a3f4b; }
.sc-close {
  background: none;
  border: none;
  color: var(--ui-muted, #6b7280);
  padding: 2px 5px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1;
}
.sc-close:hover { background: var(--ui-border, #e5e7eb); }
.sc-body {
  padding: 0.75rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.sc-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--ui-text, #374151);
}
.sc-row kbd {
  background: var(--ui-bg, #f4f5f7);
  border: 1px solid var(--ui-border, #d1d5db);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  min-width: 70px;
  text-align: center;
  color: var(--ui-text, #374151);
  box-shadow: 0 1px 0 var(--ui-border, #d1d5db);
}
[data-theme="dark"] .sc-row kbd {
  background: #2a2d35;
  border-color: #4a4f5c;
  color: #cdd5e0;
}

/* ─── Search Clear Button ────────────────────────────────────── */
.search-clear-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-clear-wrap input {
  padding-right: 2rem !important;
  width: 100%;
}
.search-clear-btn {
  position: absolute;
  right: 0.4rem;
  background: none;
  border: none;
  color: var(--ui-muted, #9ca3af);
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
  display: none;
}
.search-clear-btn:hover { color: var(--ui-text, #374151); }

/* ─── Sortable TH visual indicator ─────────────────────────── */
.sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.sortable-th::after {
  content: '\F282';
  font-family: 'bootstrap-icons';
  font-size: 0.7rem;
  margin-left: 4px;
  opacity: 0.3;
  vertical-align: middle;
}
.sortable-th.sort-asc::after {
  content: '\F235';
  opacity: 0.85;
  color: var(--ui-primary, #4f7cff);
}
.sortable-th.sort-desc::after {
  content: '\F229';
  opacity: 0.85;
  color: var(--ui-primary, #4f7cff);
}

/* ─── Password Show/Hide Toggle ─────────────────────────────── */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap input {
  padding-right: 2.4rem !important;
  width: 100%;
}
.pw-toggle {
  position: absolute;
  right: 0.45rem;
  background: none;
  border: none;
  color: var(--ui-muted, #9ca3af);
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
}
.pw-toggle:hover { color: var(--ui-text, #374151); }

/* ─── Copy Button ────────────────────────────────────────────── */
[data-copy], [data-copy-target], [data-copy-input] {
  cursor: pointer;
}

/* ─── Print Styles ─────────────────────────────────────────── */
@media print {
  /* Hide chrome */
  .top-menu-card,
  .col-md-3,
  .left-sidebar-wrap,
  .page-actions,
  .btn,
  .pagination,
  #page-progress,
  .offcanvas,
  .mobile-nav-hamburger,
  .panel-hero .breadcrumb,
  .topbar-actions,
  [data-tooltip]::after,
  [data-tooltip]::before {
    display: none !important;
  }

  /* Full-width content */
  .col-md-9,
  .col-lg-9 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
  .container,
  .container-fluid {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Reset backgrounds and colours */
  body,
  html {
    background: white !important;
    color: black !important;
    font-size: 11pt !important;
  }
  .card {
    border: 1px solid #bbb !important;
    box-shadow: none !important;
    background: white !important;
    color: black !important;
    break-inside: avoid;
    margin-bottom: 0.6rem !important;
  }
  .panel-hero {
    background: none !important;
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    color: black !important;
  }

  /* Tables: prevent mid-row page breaks, keep headers on each page */
  .table {
    font-size: 9pt !important;
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
    color: black !important;
  }
  .table thead {
    display: table-header-group; /* repeat header on every printed page */
  }
  .table tfoot {
    display: table-footer-group;
  }
  .table tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .table th,
  .table td {
    border: 1px solid #bbb !important;
    background: white !important;
    color: black !important;
    padding: 4px 6px !important;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
  }
  .table thead th {
    background: #f0f0f0 !important;
    font-weight: bold;
  }
  /* Prevent overflow-hidden from clipping table */
  .table-responsive {
    overflow: visible !important;
  }

  /* Metric cards: compact, 2-up */
  .metric-card {
    background: #f7f7f7 !important;
    color: black !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }
  .metric-card * { color: black !important; }

  /* Suppress link URL decoration */
  a[href]::after {
    content: none !important;
  }

  /* Page margins */
  @page {
    margin: 1.5cm 1cm;
    size: A4 landscape;
  }
}

/* ============================================================
   V4 — Metric card palette-aware gradient overrides
   Midnight (purple) and Ember (orange) palettes use their own
   accent colours so the cards feel coherent instead of clashing.
   ============================================================ */

/* Midnight palette */
html[data-palette="midnight"] .metric-workplace {
  background: linear-gradient(145deg, #7c3aed, #8b5cf6);
}
html[data-palette="midnight"] .metric-employee {
  background: linear-gradient(145deg, #5b21b6, #7c3aed);
}
html[data-palette="midnight"] .metric-hardware {
  background: linear-gradient(145deg, #4338ca, #6366f1);
}

/* Midnight dark: slightly lighter so they read on the dark bg */
html[data-palette="midnight"][data-theme="dark"] .metric-workplace {
  background: linear-gradient(145deg, #6d28d9, #8b5cf6);
}
html[data-palette="midnight"][data-theme="dark"] .metric-employee {
  background: linear-gradient(145deg, #4c1d95, #7c3aed);
}
html[data-palette="midnight"][data-theme="dark"] .metric-hardware {
  background: linear-gradient(145deg, #3730a3, #4f46e5);
}
html[data-palette="midnight"][data-theme="dark"] .metric-server {
  background: linear-gradient(145deg, #2d3561, #4338ca);
}

/* Ember palette */
html[data-palette="ember"] .metric-workplace {
  background: linear-gradient(145deg, #ea580c, #f97316);
}
html[data-palette="ember"] .metric-employee {
  background: linear-gradient(145deg, #d97706, #f59e0b);
}
html[data-palette="ember"] .metric-hardware {
  background: linear-gradient(145deg, #b45309, #d97706);
}

/* Ember dark */
html[data-palette="ember"][data-theme="dark"] .metric-workplace {
  background: linear-gradient(145deg, #c2410c, #ea580c);
}
html[data-palette="ember"][data-theme="dark"] .metric-employee {
  background: linear-gradient(145deg, #b45309, #d97706);
}
html[data-palette="ember"][data-theme="dark"] .metric-hardware {
  background: linear-gradient(145deg, #92400e, #b45309);
}
html[data-palette="ember"][data-theme="dark"] .metric-server {
  background: linear-gradient(145deg, #5b21b6, #7c3aed);
}

/* Metric card hover: use palette accent glow */
html[data-palette="midnight"] .metric-card:hover {
  box-shadow: 0 12px 32px rgba(139, 92, 246, .35), 0 2px 8px rgba(139, 92, 246, .15);
}
html[data-palette="ember"] .metric-card:hover {
  box-shadow: 0 12px 32px rgba(249, 115, 22, .35), 0 2px 8px rgba(249, 115, 22, .15);
}
html[data-palette="ocean"] .metric-card:hover {
  box-shadow: 0 12px 32px rgba(6, 182, 212, .3), 0 2px 8px rgba(6, 182, 212, .12);
}

/* ============================================================
   V5 — Firefox scrollbar fallback (scrollbar-color / width)
   Works alongside existing ::-webkit-scrollbar rules.
   ============================================================ */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ui-border, #d1d5db) 80%, var(--ui-primary, #4f7cff) 20%) var(--ui-bg, #f4f5f7);
}
[data-theme="dark"] * {
  scrollbar-color: #3a3f4b #1a1d23;
}

/* ============================================================
   V6 — Mobile input min-height: reduce on very small screens
   The 42px min-height is comfortable on ≥375px but cramped at 320px.
   ============================================================ */
@media (max-width: 359.98px) {
  .form-page .form-control,
  .form-page .form-select,
  .form-page textarea {
    min-height: 36px;
    font-size: 0.9rem;
  }
}

/* ============================================================
   HERO BACKGROUND ANIMATIONS
   Subtle floating orbs & shimmer on .panel-hero and .hero
   ============================================================ */

/* --- Keyframes --- */
@keyframes heroOrb1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(18px, -12px) scale(1.08); }
  66%  { transform: translate(-10px, 16px) scale(0.94); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes heroOrb2 {
  0%   { transform: translate(0, 0) scale(1); }
  40%  { transform: translate(-22px, 10px) scale(1.1); }
  70%  { transform: translate(12px, -18px) scale(0.92); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes heroOrb3 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50%  { transform: translate(14px, 10px) scale(1.12); opacity: 0.8; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
}
@keyframes heroShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* --- .panel-hero (main dashboard hero bar) --- */
.panel-hero {
  position: relative;
  overflow: hidden;
}

.panel-hero::before,
.panel-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Orb 1 — top-left glow */
.panel-hero::before {
  width: 160px;
  height: 160px;
  top: -60px;
  left: -40px;
  background: radial-gradient(circle, rgba(var(--ui-primary-rgb), 0.22) 0%, transparent 70%);
  animation: heroOrb1 9s ease-in-out infinite;
}

/* Orb 2 — bottom-right glow */
.panel-hero::after {
  width: 120px;
  height: 120px;
  bottom: -50px;
  right: 80px;
  background: radial-gradient(circle, rgba(var(--ui-primary-rgb), 0.15) 0%, transparent 70%);
  animation: heroOrb2 12s ease-in-out infinite;
}

/* Make sure text stays above pseudo-elements */
.panel-hero > * { position: relative; z-index: 1; }

/* Extra orb via data attribute trick — use a box-shadow shimmer on the hero content */
.panel-hero .hero-copy {
  position: relative;
}
.panel-hero .hero-copy::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -80px;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--ui-primary-rgb), 0.18) 0%, transparent 70%);
  animation: heroOrb3 7s ease-in-out infinite;
  pointer-events: none;
}

/* --- .hero (colored sub-page hero) --- */
.hero::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  width: 200px;
  height: 200px;
  top: -80px;
  right: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.13) 0%, transparent 70%);
  animation: heroOrb1 10s ease-in-out infinite;
}

.hero > * { position: relative; z-index: 1; }

/* Dark mode — slightly stronger orbs */
html[data-theme="dark"] .panel-hero::before {
  background: radial-gradient(circle, rgba(var(--ui-primary-rgb), 0.3) 0%, transparent 70%);
}
html[data-theme="dark"] .panel-hero::after {
  background: radial-gradient(circle, rgba(var(--ui-primary-rgb), 0.2) 0%, transparent 70%);
}

/* ─── Accessibility: Focus States ─────────────────────────── */
/* Global :focus-visible — klavye navigasyonu için belirgin outline */
:focus-visible {
  outline: 2px solid var(--ui-primary, #3b82f6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Butonlar */
.btn:focus-visible,
.top-menu-links .btn:focus-visible,
.top-menu-actions .btn:focus-visible,
.sidebar-link:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--ui-primary, #3b82f6);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(var(--ui-primary-rgb, 59,130,246), 0.18);
}

/* Form elemanları */
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--ui-primary, #3b82f6);
  outline-offset: 0;
}

/* Bootstrap btn-close (modal kapat butonu) */
.btn-close:focus-visible {
  outline: 2px solid var(--ui-primary, #3b82f6);
  outline-offset: 2px;
  box-shadow: none;
}

/* ─── Touch Targets — minimum 44×44px ─────────────────────── */
/* Tablo aksiyon butonları için tam WCAG touch target */
.icon-btn,
.icon-btn.btn-sm {
  min-height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Üst menü nav butonları: masaüstünde ince, mobilde genel .btn kuralı 44px'e çıkarır */
.top-menu-actions .btn,
.top-menu-links .btn {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar linkler için yeterli dokunma alanı */
.sidebar-link {
  min-height: 40px;
  display: flex;
  align-items: center;
}

/* Mobilde tüm buton/link touch targetları büyüt */
@media (max-width: 767.98px) {
  .icon-btn,
  .icon-btn.btn-sm {
    min-height: 44px;
    min-width: 44px;
  }

  .btn {
    min-height: 44px;
  }
  .sidebar-link {
    min-height: 48px;
  }
}

/* ─── Unified Badge / Status Chip System ───────────────────── */
/* Tüm sayfalar bu sınıfları kullanmalı */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.status-chip-ok {
  background: rgba(25,135,84,.12);
  color: #146c43;
}
.status-chip-warn {
  background: rgba(var(--ui-warning-rgb, 183,106,0),.12);
  color: var(--ui-warning, #b76a00);
}
.status-chip-danger {
  background: rgba(var(--ui-danger-rgb, 180,35,60),.12);
  color: var(--ui-danger, #b4233c);
}
.status-chip-info {
  background: rgba(var(--ui-primary-rgb), .12);
  color: var(--ui-primary);
}
.status-chip-neutral {
  background: var(--ui-surface-3, #f1f3f5);
  color: var(--ui-muted);
}
html[data-theme="dark"] .status-chip-ok    { background: rgba(25,135,84,.20); color: #4ade80; }
html[data-theme="dark"] .status-chip-warn  { background: rgba(255,208,127,.15); color: var(--ui-warning); }
html[data-theme="dark"] .status-chip-danger { background: rgba(var(--ui-danger-rgb,180,35,60),.20); color: var(--ui-danger); }
html[data-theme="dark"] .status-chip-info  { background: rgba(var(--ui-primary-rgb),.18); }
html[data-theme="dark"] .status-chip-neutral { background: var(--ui-surface-2); }

/* ─── Empty State — Unified ─────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--ui-muted);
}
.empty-state .empty-icon {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
  display: block;
  line-height: 1;
}
.empty-state h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ui-text);
  margin-bottom: 0.35rem;
}
.empty-state p {
  font-size: 0.88rem;
  color: var(--ui-muted);
  margin-bottom: 0.85rem;
}
.empty-state .btn {
  font-size: 0.82rem;
}

/* ─── Form UX Enhancements ─────────────────────────────────── */

/* Form control focus animasyonu */
.form-control,
.form-select {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.28s ease !important;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--ui-primary-rgb), 0.14) !important;
}

/* Inline validation feedback renkleri palette'e uyumlu */
.form-control.is-valid {
  border-color: #198754 !important;
  box-shadow: 0 0 0 3px rgba(25,135,84,.12) !important;
}
.form-control.is-invalid {
  border-color: var(--ui-danger) !important;
  box-shadow: 0 0 0 3px rgba(var(--ui-danger-rgb, 180,35,60), .12) !important;
}
.invalid-feedback {
  color: var(--ui-danger);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Form section ayırıcı */
.form-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ui-muted);
  padding: 0.5rem 0 0.3rem;
  border-bottom: 1px solid var(--ui-border);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.form-section-title i {
  font-size: 0.85rem;
  color: var(--ui-primary);
  opacity: 0.8;
}

/* Input grup içi ikon rengi */
.input-group-text {
  background: var(--ui-surface-2, var(--ui-surface));
  border-color: var(--ui-border);
  color: var(--ui-muted);
  transition: background-color 0.28s ease, border-color 0.18s ease;
}

/* Şifre göster/gizle butonu */
.pw-toggle-btn {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}
.pw-toggle-btn:hover { color: var(--ui-primary); }

/* Zorunlu alan yıldızı */
.required-star {
  color: var(--ui-danger);
  margin-left: 2px;
  font-size: 0.75em;
}

/* ─── Global Footer ───────────────────────────────────────── */
#globalFooterText {
  padding: 12px 0;
}
.footer-linkedin {
  font-size: 0.75rem;
}
.footer-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
}
.footer-link i {
  margin-right: 4px;
}
.footer-copy {
  font-weight: 600;
  letter-spacing: 0.5px;
}
.footer-sub {
  font-size: 0.75rem;
  opacity: 0.75;
  letter-spacing: 0.3px;
}

/* ─── Responsive Table → Card Mode (<640px) ───────────────── */
/*
  Kullanım: tabloya data-label attribute'u ekle her <td>'ye
  <td data-label="Şirket">...</td>
  CSS otomatik olarak etiket gösterir.
*/
@media (max-width: 639.98px) {
  .table-card-mode thead {
    display: none;
  }
  .table-card-mode,
  .table-card-mode tbody,
  .table-card-mode tr,
  .table-card-mode td {
    display: block;
    width: 100%;
  }
  .table-card-mode tr {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md, 12px);
    margin-bottom: 0.65rem;
    padding: 0.6rem 0.75rem;
    box-shadow: var(--ui-shadow-soft);
  }
  .table-card-mode td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border: none;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--ui-border);
  }
  .table-card-mode td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .table-card-mode td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ui-muted);
    flex: 0 0 45%;
    margin-right: 0.5rem;
  }
  /* Actions sütunu full genişlik */
  .table-card-mode td.td-actions {
    justify-content: flex-end;
    padding-top: 0.45rem;
  }
  .table-card-mode td.td-actions::before {
    display: none;
  }
}

/* ─── Extra-small (<576px) breakpoint ─────────────────────── */
@media (max-width: 575.98px) {
  /* Tipografi küçült */
  body { font-size: 0.9rem; }
  h1, .h1 { font-size: 1.5rem; }
  h2, .h2 { font-size: 1.3rem; }

  /* Kart padding'i azalt */
  .card-body { padding: 0.75rem !important; }
  .glass-card { padding: 0.75rem !important; }

  /* Tablo hücreleri */
  .table-modern thead th,
  .table-modern tbody td { padding: 0.5rem 0.4rem !important; font-size: 0.8rem; }

  /* Panel hero daha kompakt */
  .panel-hero { padding: 0.75rem 0.9rem !important; }
  .panel-hero h2 { font-size: 1.15rem !important; }
  .page-kicker { font-size: 0.65rem !important; }

  /* Form alanları tam genişlik */
  .form-control,
  .form-select { font-size: 1rem; padding: 0.55rem 0.75rem; }

  /* Metric kartlar tam genişlik */
  .metric-card { padding: 0.75rem !important; }
  .metric-value { font-size: 1.6rem !important; }

  /* Top menü logo küçült */
  .top-menu-brand img { max-height: 28px; }

  /* Selector kart */
  .selector-card { padding: 0.85rem !important; }

  /* WiFi stack tek sütun */
  .wifi-stack-row { flex-direction: column !important; }
  .wifi-stack-card { min-width: unset !important; width: 100% !important; }
}

/* ============================================================
   VFX-A — Metric Card Cascade Entry (B)
   Metric kartlar sırayla yukarıdan aşağı kayarak girer.
   ============================================================ */
.metric-card {
  animation: soft-enter 0.45s cubic-bezier(0.22, 0.68, 0, 1.1) both;
}
.metric-col:nth-child(1) .metric-card { animation-delay:   0ms; }
.metric-col:nth-child(2) .metric-card { animation-delay:  85ms; }
.metric-col:nth-child(3) .metric-card { animation-delay: 170ms; }
.metric-col:nth-child(4) .metric-card { animation-delay: 255ms; }
@media (prefers-reduced-motion: reduce) {
  .metric-card { animation: none !important; }
}

/* ============================================================
   VFX-D — Critical Status Chip Pulse (D)
   .status-chip-danger elemanları hafif ring pulse ile titreşir.
   ============================================================ */
@keyframes status-pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(var(--ui-danger-rgb, 180,35,60), 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(var(--ui-danger-rgb, 180,35,60), 0);    }
  100% { box-shadow: 0 0 0 0   rgba(var(--ui-danger-rgb, 180,35,60), 0);    }
}
.status-chip-danger {
  animation: status-pulse-ring 2.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .status-chip-danger { animation: none !important; }
}

/* ============================================================
   VFX-E1 — Tooltip Gelişmiş Giriş (E)
   Tooltip aşağıdan slide-in + scale efektiyle açılır.
   ============================================================ */
[data-tooltip]::after {
  transform: translateX(-50%) translateY(4px) scale(0.9);
  transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-tooltip]::before {
  transform: translateX(-50%) translateY(4px) scale(0.9);
  transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ============================================================
   VFX-E2 — Empty State İkon Animasyonu (E)
   Boş durum ikonları hafif bounce efektiyle canlanır.
   ============================================================ */
@keyframes empty-bounce {
  0%,  100% { transform: translateY(0)    scale(1);    opacity: 0.4;  }
  50%        { transform: translateY(-9px) scale(1.07); opacity: 0.58; }
}
.empty-state .empty-icon {
  animation: empty-bounce 2.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .empty-state .empty-icon { animation: none !important; }
}

/* ============================================================
   VFX-E3 — Sidebar Alt Menü Smooth Transition (E)
   display:none/block yerine max-height + opacity ile açılır.
   ============================================================ */
.sidebar-submenu {
  display: block !important;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.24s ease,
              padding 0.24s ease;
}
.sidebar-entry.open .sidebar-submenu {
  max-height: 500px;
  opacity: 1;
  padding-top: 0.1rem !important;
  padding-bottom: 0.35rem !important;
}

/* ============================================================
   VFX-F — Tablo Satırı Silme / Ekleme Animasyonu (F)
   .row-deleting: silinen satır sola kayarak solar.
   .row-inserting: yeni satır aşağıdan yukarıya girer.
   ============================================================ */
@keyframes row-fade-out {
  from { opacity: 1; transform: translateX(0);    max-height: 100px; }
  to   { opacity: 0; transform: translateX(28px); max-height: 0;     }
}
@keyframes row-fade-in {
  from { opacity: 0; transform: translateY(-8px); background-color: rgba(var(--ui-primary-rgb), 0.12); }
  to   { opacity: 1; transform: translateY(0);    background-color: transparent; }
}
tr.row-deleting td,
.list-group-item.row-deleting {
  animation: row-fade-out 0.38s cubic-bezier(0.4, 0, 0.8, 0.6) forwards;
  pointer-events: none;
}
tr.row-inserting,
.list-group-item.row-inserting {
  animation: row-fade-in 0.42s cubic-bezier(0.22, 0.68, 0, 1.1) both;
}
@media (prefers-reduced-motion: reduce) {
  tr.row-deleting td,
  .list-group-item.row-deleting,
  tr.row-inserting,
  .list-group-item.row-inserting { animation: none !important; }
}

/* ============================================================
   SPLASH SCREEN — İlk açılış giriş animasyonu
   Session başına bir kez gösterilir (sessionStorage flag).
   ============================================================ */
#td-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #060d1e 0%, #0b1730 40%, #0a1528 70%, #060d1e 100%);
  overflow: hidden;
  will-change: opacity, transform;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
#td-splash.td-splash--hide {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* Arka plan halkaları */
.td-splash-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.07);
  animation: splashRingPulse 3.2s ease-in-out infinite;
}
.td-splash-ring-1 { width: 200px; height: 200px; animation-delay: 0s; }
.td-splash-ring-2 { width: 340px; height: 340px; border-color: rgba(255,255,255,0.045); animation-delay: 0.4s; }
.td-splash-ring-3 { width: 500px; height: 500px; border-color: rgba(255,255,255,0.025); animation-delay: 0.8s; }
.td-splash-ring-4 { width: 680px; height: 680px; border-color: rgba(255,255,255,0.012); animation-delay: 1.2s; }

/* Parlayan merkez ışık */
.td-splash-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(79,124,255,0.22) 0%,
    rgba(20,184,166,0.10) 45%,
    transparent 72%
  );
  filter: blur(18px);
  animation: splashGlowPulse 2.8s ease-in-out infinite;
}

/* Logo ikonu */
.td-splash-icon {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: linear-gradient(140deg,
    rgba(79,124,255,0.92) 0%,
    rgba(20,184,166,0.80) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 0 32px rgba(79,124,255,0.45),
    0 8px 32px rgba(0,0,0,0.4);
  animation: splashIconIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
.td-splash-icon::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 23px;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
}
.td-splash-icon img {
  width: 46px;
  height: 46px;
  filter: brightness(0) invert(1);
  position: relative;
  z-index: 1;
}

/* Başlık */
.td-splash-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  margin: 0 0 0.3rem;
  animation: splashTextIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

/* Alt başlık */
.td-splash-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.42);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  animation: splashTextIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

/* Yükleme noktaları */
.td-splash-dots {
  display: flex;
  gap: 7px;
  margin-top: 2.2rem;
  animation: splashTextIn 0.4s ease 0.82s both;
}
.td-splash-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
}
.td-splash-dot:nth-child(1) { animation: splashDotBounce 1.0s ease-in-out 0.90s infinite; }
.td-splash-dot:nth-child(2) { animation: splashDotBounce 1.0s ease-in-out 1.08s infinite; }
.td-splash-dot:nth-child(3) { animation: splashDotBounce 1.0s ease-in-out 1.26s infinite; }

/* Alt progress bar */
.td-splash-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.td-splash-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg,
    rgba(79,124,255,0.9),
    rgba(20,184,166,0.85),
    rgba(79,124,255,0.9)
  );
  background-size: 200% 100%;
  animation:
    splashBarFill 1.65s cubic-bezier(0.4, 0, 0.2, 1) 0.08s forwards,
    splashBarShimmer 0.9s linear 0.08s infinite;
}

/* ── Splash keyframes ── */
@keyframes splashIconIn {
  from { opacity: 0; transform: scale(0.45) translateY(28px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes splashTextIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes splashBarFill {
  0%   { width: 0; }
  55%  { width: 68%; }
  100% { width: 100%; }
}
@keyframes splashBarShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
@keyframes splashRingPulse {
  0%, 100% { transform: scale(1);    opacity: 0.55; }
  50%       { transform: scale(1.05); opacity: 0.15; }
}
@keyframes splashGlowPulse {
  0%, 100% { transform: scale(1);    opacity: 0.65; }
  50%       { transform: scale(1.18); opacity: 1; }
}
@keyframes splashDotBounce {
  0%, 100% { transform: translateY(0)   scale(1);   background: rgba(255,255,255,0.28); }
  50%       { transform: translateY(-5px) scale(1.3); background: rgba(255,255,255,0.82); }
}

@media (prefers-reduced-motion: reduce) {
  #td-splash, #td-splash * { transition: none !important; animation: none !important; }
}

/* ============================================================
   ENHANCED PAGE TRANSITIONS — Daha sinematik sayfa girişi
   ============================================================ */
.soft-enter {
  animation: soft-enter 0.48s cubic-bezier(0.22, 0.68, 0, 1.05) both;
}
@keyframes soft-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.988);
    filter: blur(1.5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Tablo satırları kademeli giriş animasyonu */
.table-modern tbody tr {
  animation: tableRowIn 0.35s cubic-bezier(0.22, 0.68, 0, 1.1) both;
}
.table-modern tbody tr:nth-child(1)  { animation-delay: 0ms; }
.table-modern tbody tr:nth-child(2)  { animation-delay: 28ms; }
.table-modern tbody tr:nth-child(3)  { animation-delay: 56ms; }
.table-modern tbody tr:nth-child(4)  { animation-delay: 84ms; }
.table-modern tbody tr:nth-child(5)  { animation-delay: 112ms; }
.table-modern tbody tr:nth-child(6)  { animation-delay: 140ms; }
.table-modern tbody tr:nth-child(7)  { animation-delay: 168ms; }
.table-modern tbody tr:nth-child(8)  { animation-delay: 196ms; }
.table-modern tbody tr:nth-child(9)  { animation-delay: 224ms; }
.table-modern tbody tr:nth-child(10) { animation-delay: 252ms; }
@keyframes tableRowIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Card grid kademeli giriş */
.card.panel-surface {
  animation: cardSlideIn 0.4s cubic-bezier(0.22, 0.68, 0, 1.05) both;
}
.row > [class*="col-"] .card.panel-surface:first-child { animation-delay: 40ms; }
.row > [class*="col-"]:nth-child(2) .card.panel-surface { animation-delay: 80ms; }
.row > [class*="col-"]:nth-child(3) .card.panel-surface { animation-delay: 120ms; }
.row > [class*="col-"]:nth-child(4) .card.panel-surface { animation-delay: 160ms; }
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .soft-enter,
  .table-modern tbody tr,
  .card.panel-surface { animation: none !important; filter: none !important; }
}

/* ─── Luminescent Palette — Extra Visual Layer ─────────────── */
/* Sidebar'da ince sol kenar çizgisi ile "active" daha belirgin */
html[data-palette="luminescent"][data-theme="dark"] .sidebar-link.active {
  border-left: 3px solid #00cfee !important;
}
html[data-palette="luminescent"][data-theme="dark"] .sidebar-link {
  border-left: 3px solid transparent !important;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease !important;
}

/* Card'lara üst kenarda ince cyan çizgi */
html[data-palette="luminescent"][data-theme="dark"] .card:not(.top-menu-card):not(.left-sidebar-card):hover {
  border-color: rgba(0,207,238,.22) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.45), 0 0 0 1px rgba(0,207,238,.16) !important;
}

/* Metric pill glow efekti */
html[data-palette="luminescent"][data-theme="dark"] .metric-pill {
  background: rgba(12,24,40,0.9) !important;
  border-color: rgba(0,207,238,.20) !important;
}

/* Badge'lar */
html[data-palette="luminescent"][data-theme="dark"] .badge.bg-primary {
  background: rgba(0,207,238,.18) !important;
  color: #5de0f5 !important;
  border: 1px solid rgba(0,207,238,.30) !important;
}
html[data-palette="luminescent"][data-theme="dark"] .badge.bg-success {
  background: rgba(0,212,160,.15) !important;
  color: #00e0aa !important;
  border: 1px solid rgba(0,212,160,.28) !important;
}
html[data-palette="luminescent"][data-theme="dark"] .badge.bg-warning,
html[data-palette="luminescent"][data-theme="dark"] .badge.text-bg-warning {
  background: rgba(245,158,11,.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245,158,11,.28) !important;
}
html[data-palette="luminescent"][data-theme="dark"] .badge.bg-danger {
  background: rgba(255,85,119,.15) !important;
  color: #ff8099 !important;
  border: 1px solid rgba(255,85,119,.28) !important;
}

/* Btn outline primary — luminescent teal varyantı */
html[data-palette="luminescent"][data-theme="dark"] .btn-outline-primary {
  color: #00cfee !important;
  border-color: rgba(0,207,238,.40) !important;
}
html[data-palette="luminescent"][data-theme="dark"] .btn-outline-primary:hover {
  background: rgba(0,207,238,.14) !important;
  border-color: #00cfee !important;
}
html[data-palette="luminescent"] .btn-primary {
  background: #00cfee !important;
  border-color: #00b8d4 !important;
  color: #07101e !important;
  font-weight: 700 !important;
}
html[data-palette="luminescent"] .btn-primary:hover {
  background: #00e5ff !important;
  border-color: #00cfee !important;
}

/* Scrollbar – luminescent */
html[data-palette="luminescent"][data-theme="dark"] ::-webkit-scrollbar-track { background: #07101e; }
html[data-palette="luminescent"][data-theme="dark"] ::-webkit-scrollbar-thumb { background: #163050; }
html[data-palette="luminescent"][data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #00cfee; }

/* Progress bar */
html[data-palette="luminescent"] #page-progress {
  background: linear-gradient(90deg, #00cfee, #00d4a0);
  box-shadow: 0 0 10px rgba(0,207,238,.6);
}
