/* ==========================================================
   DPRO FLOWER NEXT-8
   店頭・iPad受付
   ========================================================== */

.ipad-next-body {
  min-width: 680px;
  background: #f1f3ed;
}

.ipad-shell {
  min-height: 100vh;
}

.ipad-dark-eyebrow {
  color: var(--sage);
}

.ipad-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ipad-login-card {
  width: min(700px, 100%);
  padding: 46px;
  text-align: center;
}

.ipad-login-card h1 {
  margin: 4px 0 8px;
  color: var(--forest-2);
  font-size: 2.4rem;
}

.ipad-login-card p {
  color: var(--muted);
  font-size: 1rem;
}

.ipad-login-mark {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
  border-radius: 27px;
  color: white;
  background: linear-gradient(145deg, var(--forest), var(--sage));
  box-shadow: 0 18px 38px rgba(33,76,59,.22);
  font-size: 2.5rem;
}

.ipad-login-code-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-top: 24px;
}

.ipad-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  color: white;
  background: linear-gradient(110deg, #17392d, #285941);
  box-shadow: 0 8px 28px rgba(22,57,44,.17);
}

.ipad-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ipad-brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--forest);
  background: #eef5ed;
  font-size: 1.5rem;
}

.ipad-brand strong,
.ipad-brand span {
  display: block;
}

.ipad-brand strong {
  font-size: 1rem;
}

.ipad-brand span {
  margin-top: 2px;
  color: rgba(255,255,255,.66);
  font-size: .72rem;
}

.ipad-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ipad-header-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  color: #17392d;
  background: white;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 850;
  cursor: pointer;
}

.ipad-header-link.secondary {
  color: white;
  background: rgba(255,255,255,.10);
}

.ipad-header-link.danger {
  color: #ffd9d4;
  background: rgba(255,255,255,.06);
}

.ipad-content {
  padding: 24px;
}

.ipad-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.ipad-title-row h1 {
  margin: 0;
  color: var(--forest-2);
  font-size: 2.25rem;
}

.ipad-title-row p {
  margin: 5px 0 0;
  color: var(--muted);
}

.ipad-date-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.ipad-date-field {
  width: 240px;
}

.ipad-date-control {
  position: relative;
  width: 100%;
}

.ipad-date-control input[type="date"] {
  width: 100%;
  color: transparent;
  caret-color: transparent;
}

.ipad-date-control input[type="date"]::-webkit-datetime-edit,
.ipad-date-control input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.ipad-date-control input[type="date"]::-webkit-datetime-edit-text,
.ipad-date-control input[type="date"]::-webkit-datetime-edit-month-field,
.ipad-date-control input[type="date"]::-webkit-datetime-edit-day-field,
.ipad-date-control input[type="date"]::-webkit-datetime-edit-year-field {
  color: transparent;
}

.ipad-date-readable {
  position: absolute;
  left: 14px;
  right: 46px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 750;
  white-space: nowrap;
}

.ipad-page-alert {
  position: sticky;
  top: 88px;
  z-index: 55;
  box-shadow: 0 10px 30px rgba(30,63,48,.12);
}

.ipad-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 11px;
  margin-bottom: 16px;
}

.ipad-summary-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: white;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(38,68,54,.05);
}

.ipad-summary-card.active,
.ipad-summary-card:hover {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(33,76,59,.09);
}

.ipad-summary-card span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}

.ipad-summary-card strong {
  color: var(--forest-2);
  font-size: 2rem;
  line-height: 1.1;
}

.ipad-summary-card small {
  color: var(--muted);
  font-size: .65rem;
}

.ipad-summary-card.attention { background: linear-gradient(145deg, #fff, #fff3df); }
.ipad-summary-card.pickup { background: linear-gradient(145deg, #fff, #eef5ed); }
.ipad-summary-card.delivery { background: linear-gradient(145deg, #fff, #eaf4f8); }
.ipad-summary-card.completed { background: linear-gradient(145deg, #fff, #f0f1ef); }

.ipad-toolbar {
  display: flex;
  align-items: end;
  gap: 11px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.94);
}

.ipad-search-field {
  flex: 1;
}

.ipad-inline-check {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font-weight: 750;
}

.ipad-inline-check input {
  width: 21px;
  height: 21px;
  min-height: auto;
  accent-color: var(--forest);
}

.ipad-updated-at {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: .7rem;
}

.ipad-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 14px;
}

.ipad-order-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 9px 28px rgba(38,68,54,.07);
}

.ipad-order-card.completed {
  opacity: .72;
}

.ipad-order-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.ipad-order-number {
  color: var(--forest-2);
  font-size: 1.05rem;
  font-weight: 900;
}

.ipad-order-time {
  margin-top: 3px;
  color: var(--muted);
  font-size: .76rem;
}

.ipad-order-body {
  padding: 16px;
}

.ipad-customer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ipad-customer-row h2 {
  margin: 0;
  color: var(--forest-2);
  font-size: 1.23rem;
}

.ipad-phone-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #cad8cc;
  border-radius: 999px;
  color: var(--forest);
  background: #f3f8f2;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 850;
}

.ipad-items {
  margin: 12px 0;
  padding: 11px;
  border-radius: 12px;
  color: var(--forest-2);
  background: #f6f8f5;
  font-weight: 800;
}

.ipad-order-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ipad-order-detail {
  padding: 9px;
  border-radius: 10px;
  background: #f7f9f6;
}

.ipad-order-detail span,
.ipad-order-detail strong {
  display: block;
}

.ipad-order-detail span {
  color: var(--muted);
  font-size: .63rem;
  font-weight: 850;
}

.ipad-order-detail strong {
  margin-top: 3px;
  color: var(--forest-2);
  font-size: .77rem;
}

.ipad-order-note {
  margin-top: 9px;
  padding: 10px 12px;
  border-left: 5px solid var(--rose);
  border-radius: 0 10px 10px 0;
  color: #70413c;
  background: #fff4f2;
  white-space: pre-wrap;
  font-size: .78rem;
}

.ipad-action-area {
  margin-top: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8faf7;
}

.ipad-primary-action {
  width: 100%;
  min-height: 58px;
  font-size: .98rem;
}

.ipad-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.ipad-secondary-actions .btn {
  width: 100%;
  min-height: 46px;
}

.ipad-empty {
  grid-column: 1 / -1;
  padding: 70px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: white;
  text-align: center;
}

.ipad-empty div {
  margin-bottom: 8px;
  font-size: 2.8rem;
}

.ipad-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 30px 0 10px;
  color: var(--muted);
  font-size: .7rem;
}

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

  .ipad-header-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .ipad-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ipad-date-controls {
    align-items: end;
  }

  .ipad-summary-grid {
    grid-template-columns: repeat(5, minmax(105px, 1fr));
  }

  .ipad-order-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ipad-next-body {
    min-width: 320px;
  }

  .ipad-content,
  .ipad-login-shell {
    padding: 10px;
  }

  .ipad-login-card {
    padding: 28px 18px;
  }

  .ipad-login-code-row {
    grid-template-columns: 1fr;
  }

  .ipad-header {
    position: relative;
    padding: 12px;
  }

  .ipad-header-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .ipad-date-controls,
  .ipad-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ipad-date-field {
    width: 100%;
  }

  .ipad-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ipad-summary-card.all {
    grid-column: 1 / -1;
  }

  .ipad-updated-at {
    padding-bottom: 0;
  }

  .ipad-order-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ipad-footer {
    flex-direction: column;
  }
}
