/* ==========================================   TECH UMS ECK – ADMIN DASHBOARD   ========================================== */

.admin-page {
  min-height: 100vh;
  background: #f7f8fa;
  padding: 60px 20px 100px;
  font-family: "Raleway", sans-serif;
}

.admin-container {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 35px;
}

.admin-eyebrow {
  color: var(--bs-primary);
  font-family: "Cairo", sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.admin-header h1 {
  margin: 0;
  font-family: "Cairo", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
}

.admin-header p {
  margin: 10px 0 0;
  color: var(--bs-secondary);
  font-size: 1.05rem;
}

.admin-refresh {
  border-radius: 12px;
  padding: 11px 20px;
  font-weight: 600;
}

/* ==========================================   STATISTIKEN   ========================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 25px;
}

.stat-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, .06);
}

.stat-label {
  display: block;
  color: var(--bs-secondary);
  font-size: .85rem;
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-family: "Cairo", sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

/* ==========================================   BESTELLUNGEN   ========================================== */

.orders-card {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid rgba(0, 0, 0, .06);
  overflow: hidden;
}

.orders-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding: 28px 30px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.orders-toolbar h2 {
  margin: 0;
  font-family: "Cairo", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.orders-toolbar span {
  display: block;
  margin-top: 3px;
  color: var(--bs-secondary);
  font-size: .85rem;
}

.search-wrapper {
  width: min(400px, 100%);
}

.search-wrapper input {
  border-radius: 10px;
  padding: 11px 14px;
}

/* ==========================================   TABELLE   ========================================== */

.admin-table {
  margin: 0;
}

.admin-table thead th {
  background: #fafafa;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  padding: 15px 20px;
  color: var(--bs-secondary);
  font-family: "Cairo", sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table tbody td {
  padding: 18px 20px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover {
  background: #fafafa;
}

.order-status-select {
  min-width: 145px;
  border-radius: 8px;
  font-size: .85rem;
}

/* ==========================================   MELDUNGEN   ========================================== */

.admin-message {
  padding: 45px 30px;
  text-align: center;
  color: var(--bs-secondary);
}

.admin-loading {
  color: var(--bs-primary);
}

.admin-error {
  color: #dc3545;
}

/* ==========================================   BESTELLDETAILS MODAL   ========================================== */

.order-modal {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  font-family: "Raleway", sans-serif;
}

.order-modal .modal-header {
  padding: 28px 32px;
  border-bottom: 1px solid #edf0f3;
}

.order-modal .modal-title {
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  font-size: 1.65rem;
}

.order-modal .modal-body {
  padding: 30px 32px;
}

.order-modal .modal-footer {
  padding: 18px 32px;
  border-top: 1px solid #edf0f3;
}

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

.order-detail-header > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-caption, .detail-item span {
  color: #78818c;
  font-size: .82rem;
}

.order-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 30px;
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-paid {
  background: #e6f7ec;
  color: #198754;
}

.status-in_production {
  background: #e7f0ff;
  color: #0d6efd;
}

.status-ready {
  background: #fff3d6;
  color: #946200;
}

.status-completed {
  background: #e9ecef;
  color: #495057;
}

.status-cancelled {
  background: #fde8e8;
  color: #dc3545;
}

.detail-section-title {
  font-family: "Cairo", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 30px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf0f3;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.detail-item strong {
  font-size: .93rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.detail-full {
  grid-column: 1 / -1;
}

.detail-pricing {
  background: #f7f8fa;
  border-radius: 14px;
  padding: 22px;
}

.detail-pricing > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.detail-pricing > div:last-child {
  margin-bottom: 0;
}

.detail-pricing span {
  color: #667085;
}

.detail-total {
  border-top: 1px solid #dfe3e8;
  padding-top: 16px;
  margin-top: 16px;
  font-size: 1.2rem;
}

.detail-total strong {
  color: var(--bs-primary);
  font-family: "Cairo", sans-serif;
  font-weight: 800;
}

/* ==========================================   RESPONSIVE   ========================================== */

@media (max-width: 1000px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1000px) {
  .orders-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 1000px) {
  .search-wrapper {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .admin-page {
    padding: 35px 12px 60px;
  }
}

@media (max-width: 600px) {
  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .admin-refresh {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .stat-card {
    padding: 18px;
  }
}

@media (max-width: 600px) {
  .order-modal .modal-header, .order-modal .modal-body, .order-modal .modal-footer {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

