/* ═══════════════════════════════════════════════════════════
   MultiMarkt Rooster — mobiele optimalisaties (alle pagina's)
   ═══════════════════════════════════════════════════════════ */

/* ── Algemeen ── */
@media (max-width: 991.98px) {
  .welcome-header h1 {
    font-size: 1.375rem;
  }

  .welcome-header p {
    font-size: 0.875rem;
  }

  .card-saas-header:not(.card-saas-header-row) {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .card-saas-header > .btn-secondary-saas,
  .card-saas-header > a.btn-secondary-saas {
    width: 100%;
    justify-content: center;
  }

  .card-saas-body {
    padding: 1rem 1.25rem;
  }

  .form-saas {
    padding: 1rem 1.25rem;
  }

  .form-saas .form-control,
  .form-saas select.form-control {
    min-height: 44px;
    font-size: 1rem;
  }

  .top-header {
    padding: 0 0.875rem;
    gap: 0.5rem;
  }

  .header-date {
    display: none !important;
  }

  .header-icon-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .modal-dialog {
    margin: 0.75rem;
    max-width: calc(100% - 1.5rem);
  }

  .modal-footer,
  .modal-body .btn-primary-saas,
  .modal-body .btn-secondary-saas {
    min-height: 44px;
  }
}

@media (max-width: 575.98px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions a {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
  }

  .hero-title {
    font-size: 1.25rem;
  }

  .hero-sub {
    font-size: 0.875rem;
  }

  .stat-card-v2 {
    padding: 1.125rem 1.25rem;
  }

  .chart-container {
    height: 240px !important;
    padding: 0.75rem 1rem 1rem;
  }

  .week-hours-chart {
    min-height: 180px;
  }
}

/* ── Gedeelde mobiele kaarten ── */
.mobile-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.mobile-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.mobile-card-head .employee-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.mobile-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.mobile-card-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.mobile-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.mobile-card-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.mobile-card-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.mobile-card-value {
  font-weight: 600;
  color: var(--text);
}

.mobile-card-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  margin-top: 0.5rem;
  background: #f6f9fc;
  border-radius: 10px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  touch-action: manipulation;
}

[data-theme="dark"] .mobile-card-phone {
  background: rgba(255, 255, 255, 0.05);
}

.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Dashboard: live aanwezigheid ── */
.present-mobile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

/* ── Kosten mobiel ── */
.kosten-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kosten-mobile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--surface);
}

.kosten-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.kosten-mobile-total {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.kosten-mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.kosten-mobile-grid dt {
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

.kosten-mobile-grid dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.kosten-mobile-summary {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
}

.kosten-mobile-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.875rem;
}

.kosten-mobile-summary-row.total {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid rgba(192, 57, 43, 0.2);
  margin-top: 0.35rem;
  padding-top: 0.625rem;
}

.kosten-period-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.kosten-period-btns a {
  flex: 1 1 calc(50% - 0.25rem);
  text-align: center;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kosten-export-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.kosten-export-btns a {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

/* ── QR pagina ── */
.qr-preview-wrap {
  max-width: 280px;
  margin: 0 auto;
}

.qr-preview-img {
  max-width: 100%;
  height: auto;
}

.qr-action-btns {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 320px;
  margin: 0 auto;
}

.qr-action-btns a {
  width: 100%;
  justify-content: center;
  min-height: 48px;
}

.qr-instructions {
  padding-left: 1.25rem;
  line-height: 1.6;
  font-size: 0.9375rem;
}

@media (min-width: 576px) {
  .qr-action-btns {
    flex-direction: row;
    max-width: none;
  }

  .qr-action-btns a {
    flex: 1;
  }

  .kosten-export-btns {
    flex-direction: row;
  }

  .kosten-export-btns a {
    flex: 1;
    width: auto;
  }
}

/* ── Weekuren ── */
.hours-row {
  padding: 0.875rem 0;
}

@media (max-width: 575.98px) {
  .hours-row-header {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .hours-row-value {
    font-size: 1rem;
  }
}

/* ── Shifts: planning sectie ── */
@media (max-width: 991.98px) {
  .shifts-planning-col {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
  }

  .shifts-planned-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Rooster week nav ── */
@media (max-width: 575.98px) {
  .rooster-week-nav {
    width: 100%;
  }

  .rooster-week-nav .btn-secondary-saas {
    flex: 1;
    justify-content: center;
    min-height: 44px;
  }

  .page-header-row {
    flex-direction: column;
  }
}

/* ── Login ── */
@media (max-width: 575.98px) {
  .login-panel-right {
    padding: 1.25rem;
  }

  .login-card {
    padding: 1.75rem 1.25rem;
  }

  .login-card .btn-primary-saas,
  .login-card button[type="submit"] {
    min-height: 48px;
    width: 100%;
    font-size: 1rem;
  }

  .login-card .form-control {
    min-height: 48px;
    font-size: 1rem;
  }
}
