/* Dashboard / Admin / Auth ortak stilleri */

.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
}

.auth-card {
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-brand-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #1d1d1f;
}

.auth-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  color: #1d1d1f;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
}

.auth-input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}

.auth-input:focus {
  border-color: rgba(0, 113, 227, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.auth-submit {
  justify-self: start;
  margin-top: 4px;
}

.auth-footer {
  margin-top: 14px;
  font-size: 13px;
  color: #6e6e73;
}

.auth-link {
  color: #0071e3;
  font-weight: 600;
}

.auth-message {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 14px;
}

.auth-message--error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.auth-message--info {
  background: rgba(0, 113, 227, 0.1);
  color: #0a4aa6;
  border: 1px solid rgba(0, 113, 227, 0.25);
}

/* Layout shared */
.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 70vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  background: #f5f5f7;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding: 18px 16px;
  height: calc(100vh - 20px);
}

.app-sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.app-sidebar-title .logo-img {
  height: 26px;
}

.app-nav {
  display: grid;
  gap: 6px;
}

.app-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #424245;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.app-nav a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1d1d1f;
}

.app-nav a.is-active {
  background: rgba(0, 113, 227, 0.12);
  color: #0071e3;
}

.app-content {
  padding: 30px 18px 60px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.app-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1d1d1f;
}

.app-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: #6e6e73;
}

.card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi .kpi-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1d1d1f;
}

.kpi .kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: #6e6e73;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  text-align: left;
  color: #424245;
}

.table th {
  color: #6e6e73;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.02);
}

.table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  font-size: 12px;
  font-weight: 700;
  color: #424245;
}

.badge--green {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.22);
  color: #0f766e;
}

.badge--red {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.22);
  color: #b91c1c;
}

.badge--blue {
  background: rgba(0, 113, 227, 0.12);
  border-color: rgba(0, 113, 227, 0.22);
  color: #0a4aa6;
}

.badge--gray {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #6e6e73;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
  color: #1d1d1f;
}

.field input,
.field textarea,
.field select {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.field textarea {
  height: 92px;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
}

.field select {
  cursor: pointer;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================
   PAGE LOADER
   ============================================ */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: opacity 0.28s ease;
  pointer-events: all;
}

.page-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loader__ring {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(0, 113, 227, 0.15);
  border-top-color: #0071e3;
  border-radius: 50%;
  animation: page-spin 0.65s linear infinite;
}

@keyframes page-spin {
  to { transform: rotate(360deg); }
}

.page-loader__label {
  font-size: 13px;
  font-weight: 600;
  color: #6e6e73;
  letter-spacing: 0.01em;
}

/* ============================================
   SKELETON LOADER
   ============================================ */

@keyframes sk-shimmer {
  0%   { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.sk {
  display: block;
  border-radius: 7px;
  background: linear-gradient(90deg, #ebebeb 25%, #d8d8d8 50%, #ebebeb 75%);
  background-size: 936px 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}

.sk--h12 { height: 12px; }
.sk--h14 { height: 14px; }
.sk--h16 { height: 16px; }
.sk--h28 { height: 28px; }
.sk--h34 { height: 34px; }
.sk--w20 { width: 20%; }
.sk--w30 { width: 30%; }
.sk--w40 { width: 40%; }
.sk--w50 { width: 50%; }
.sk--w60 { width: 60%; }
.sk--w70 { width: 70%; }
.sk--w80 { width: 80%; }
.sk--full { width: 100%; }

.sk-card-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0;
}

.sk-table-row td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: middle;
}

/* Visibility toggles based on loading state */
.sk-content     { display: none !important; }
.sk-tbody       { display: none !important; }

html.is-loading .sk-content  { display: block !important; }
html.is-loading .sk-tbody    { display: table-row-group !important; }
html.is-loading .real-content { display: none !important; }
html.is-loading .real-tbody  { display: none !important; }

/* ============================================
   Responsive */
@media (max-width: 980px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   Client (Dashboard) Redesign
   =========================== */

.client-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: #f4f6f9; /* screenshot açık gri */
}

/* Sidebar: açık tema */
.cl-sidebar {
  background: #ffffff;
  border-right: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
}

.cl-sidebar-brand {
  background: #17a2b8; /* teal band */
  color: #ffffff;
  padding: 14px 18px;
  font-weight: 900;
  letter-spacing: 0.09em;
  font-size: 12px;
  text-transform: uppercase;
}

.cl-sidebar-inner {
  padding: 18px 16px 22px;
}

.cl-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 16px;
}

.cl-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cl-user-meta {
  display: grid;
  gap: 2px;
}

.cl-user-name {
  font-weight: 900;
  color: #111827;
  font-size: 14px;
}

.cl-user-email {
  font-size: 12px;
  color: #6b7280;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.cl-nav {
  display: grid;
  gap: 6px;
}

.cl-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  color: #111827;
  font-weight: 900;
  font-size: 13px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cl-nav a:hover {
  background: rgba(0, 0, 0, 0.04);
}

.cl-nav a.is-active {
  background: #17a2b8;
  color: #ffffff;
}

.cl-nav-ico {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 162, 184, 0.12);
  color: #0ea5e9;
  font-size: 14px;
}

.cl-nav a.is-active .cl-nav-ico {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.cl-main {
  padding: 22px 18px 60px;
}

.cl-topbar {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.cl-topbar-left {
  display: grid;
  gap: 4px;
}

.cl-topbar-title {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.cl-topbar-subtitle {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
}

.cl-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cl-search {
  width: 360px;
  max-width: 42vw;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 10px 14px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.cl-search input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

.cl-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-weight: 900;
  cursor: pointer;
}

.cl-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  padding: 16px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 120px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
  flex-shrink: 0;
}

.kpi-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-nav-ico svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-meta {
  display: grid;
  gap: 6px;
  width: 100%;
}

.kpi-label {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b7280;
}

.kpi-value {
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.kpi-action {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 1000;
}

.kpi-action a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kpi-card--credits .kpi-icon {
  background: #10b981;
}
.kpi-card--orders .kpi-icon {
  background: #17a2b8;
}
.kpi-card--history .kpi-icon {
  background: #f59e0b;
}
.kpi-card--imei .kpi-icon {
  background: #ec4899;
}

.oi-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  overflow: hidden;
}

.oi-tabs {
  display: flex;
  background: #17a2b8;
}

.oi-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #ffffff;
  font-weight: 1000;
  padding: 14px 10px;
  cursor: pointer;
}

.oi-tab.is-active {
  background: #ffffff;
  color: #17a2b8;
}

.oi-panel {
  padding: 14px;
}

.oi-panel--header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(0, 113, 227, 0.04);
}

.oi-subtitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.oi-subtitle-left {
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.02em;
  color: #6b7280;
  text-transform: uppercase;
}

.oi-subtitle-link {
  font-size: 12px;
  font-weight: 1000;
  color: #17a2b8;
}

.oi-empty {
  padding: 18px 14px;
  color: #6e6e73;
  font-weight: 900;
}

.oi-panel--hidden {
  display: none;
}

.oi-table th,
.oi-table td {
  text-align: left;
  vertical-align: middle;
}

.oi-table td:first-child {
  text-align: center;
}

.oi-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: #111827;
}

.oi-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.oi-dot--ok {
  background: #10b981;
}
.oi-dot--pending {
  background: #17a2b8;
}
.oi-dot--failed {
  background: #ef4444;
}

/* Status icon used in Orders/Invoices rows */
.oi-status-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.oi-status-icon svg {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.oi-status-icon--ok {
  background: #10b981;
}

.oi-status-icon--pending {
  background: #17a2b8;
}

.oi-status-icon--failed {
  background: #ef4444;
}

.oi-detail-title {
  font-weight: 1000;
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
}

/* Bottom layout: Orders + 2 feature cards */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.dash-orders-card {
  min-height: 380px;
}

.dash-feature-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  padding: 20px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.dash-feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.dash-feature-icon svg {
  width: 30px;
  height: 30px;
  stroke: #0ea5e9;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-feature-title {
  font-weight: 1000;
  font-size: 16px;
  color: #111827;
}

.dash-feature-subtitle {
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
  text-align: center;
  line-height: 1.35;
}

.dash-feature-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.dash-feature-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.dash-feature-btn--primary {
  background: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
  color: #0b3b2b;
}

.dash-feature-btn--secondary {
  background: #17a2b8;
  border-color: rgba(23, 162, 184, 0.3);
  color: #08303b;
}

.dash-feature-btn--blue {
  background: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.3);
  color: #05293a;
}

@media (max-width: 1200px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cl-search {
    width: 280px;
  }
}

@media (max-width: 820px) {
  .client-layout {
    grid-template-columns: 1fr;
  }
  .cl-sidebar {
    position: relative;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }
  .cl-main {
    padding: 14px 12px 50px;
  }
  .cl-search {
    display: none;
  }

  .dash-bottom-grid {
    grid-template-columns: 1fr;
  }
}

