/* =========================
   RESET / GLOBAL
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #f7f7f5;
  color: #002d56;
}

button,
input {
  font-family: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
}

.app {
  width: 100%;
  min-height: 100vh;
}

.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
}

.screen.active {
  display: flex;
}


/* =========================
   HOME
========================= */

#homeScreen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 24px;
}

.brand {
  width: 100%;
  max-width: 650px;
  text-align: center;
  margin-bottom: 48px;
}

.koufu-logo {
  width: 190px;
  height: auto;
  max-width: 50%;
  margin: 0 auto 30px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #d82c20;
  margin-bottom: 13px;
}

.brand h1 {
  font-size: clamp(40px, 7vw, 62px);
  line-height: 1.05;
  color: #002d56;
  margin-bottom: 18px;
}

.subtitle {
  font-size: 19px;
  color: #677687;
}


/* =========================
   HOME DRINK BUTTONS
========================= */

.drink-options {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drink-card {
  width: 100%;
  min-height: 150px;
  border: none;
  border-radius: 26px;
  padding: 28px 32px;

  background: #002d56;
  color: white;

  display: grid;
  grid-template-columns: 105px 1fr 40px;
  align-items: center;

  text-align: left;
  cursor: pointer;

  box-shadow:
    0 14px 30px
    rgba(0, 45, 86, 0.20);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.drink-card:hover {
  transform: translateY(-3px);

  box-shadow:
    0 18px 34px
    rgba(0, 45, 86, 0.27);
}

.drink-card:active {
  transform: scale(0.985);
}

.drink-icon-box {
  width: 85px;
  height: 85px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.drink-icon-img {
  width: 85px;
  height: 85px;
  object-fit: contain;
}

.drink-text {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.drink-name {
  font-size: 31px;
  font-weight: 800;
}

.drink-description {
  font-size: 15px;
  opacity: 0.82;
}

.arrow {
  font-size: 47px;
  text-align: right;
  font-weight: 300;
}

.footer-text {
  margin-top: 32px;
  font-size: 13px;
  color: #8c99a5;
}


/* =========================
   ORDER PAGE
========================= */

#coffeeScreen,
#teaScreen {
  justify-content: center;
  align-items: flex-start;
}

.order-page {
  width: 100%;
  max-width: 720px;
  padding: 28px 22px 60px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 35px;
  min-height: 90px;
}

.small-logo {
  width: 120px;
  height: auto;
  max-height: 90px;
  object-fit: contain;
}

.back-btn {
  background: transparent;
  border: none;

  color: #002d56;

  font-size: 16px;
  font-weight: 800;

  cursor: pointer;
}

.order-header {
  margin-bottom: 32px;
}

.order-header h2 {
  font-size: 48px;
  color: #002d56;
  margin-bottom: 8px;
}

.order-header p:last-child {
  font-size: 17px;
  color: #73808d;
}


/* =========================
   SECTION CARDS
========================= */

.section-card {
  background: white;
  border-radius: 22px;
  padding: 26px;
  margin-bottom: 18px;

  box-shadow:
    0 6px 20px
    rgba(0, 45, 86, 0.06);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;
  margin-bottom: 20px;
}

.section-heading h3 {
  font-size: 21px;
  color: #002d56;
}

.section-heading span {
  font-size: 13px;
  color: #95a0ab;
}


/* =========================
   INPUT
========================= */

.nickname-input {
  width: 100%;

  border: 2px solid #dfe4e8;
  border-radius: 14px;

  padding: 18px;

  font-size: 18px;
  color: #002d56;

  background: #ffffff;

  outline: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.nickname-input:focus {
  border-color: #002d56;

  box-shadow:
    0 0 0 4px
    rgba(0, 45, 86, 0.07);
}


/* =========================
   OPTION BUTTONS
========================= */

.option-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.option-btn {
  width: 100%;

  background: white;

  border: 2px solid #e1e5e8;
  border-radius: 15px;

  padding: 18px 20px;

  font-size: 18px;
  font-weight: 700;
  color: #002d56;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.1s ease;
}

.option-btn:active {
  transform: scale(0.99);
}

.option-btn.selected {
  border-color: #d82c20;
  background: #fff3f2;
  color: #d82c20;
}

.check {
  width: 28px;
  height: 28px;

  border-radius: 50%;

  background: #d82c20;
  color: white;

  display: none;
  align-items: center;
  justify-content: center;

  font-size: 16px;
}

.option-btn.selected .check {
  display: flex;
}


/* =========================
   SUMMARY
========================= */

.summary-card {
  background: #002d56;
  color: white;

  border-radius: 22px;

  padding: 26px;

  margin-top: 28px;
  margin-bottom: 18px;
}

.summary-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;

  color: white;

  opacity: 0.62;

  margin-bottom: 9px;
}

.summary-card h3 {
  font-size: 25px;
  margin-bottom: 8px;
}

.summary-card p:last-child {
  color: #bcc9d5;
}


/* =========================
   SUBMIT BUTTON
========================= */

.submit-btn {
  width: 100%;

  border: none;
  border-radius: 17px;

  padding: 20px;

  background: #d82c20;
  color: white;

  font-size: 19px;
  font-weight: 800;

  cursor: pointer;

  box-shadow:
    0 10px 22px
    rgba(216, 44, 32, 0.18);

  transition:
    transform 0.1s ease,
    opacity 0.15s ease;
}

.submit-btn:active {
  transform: scale(0.99);
}

.submit-btn:disabled {
  background: #c9ced2;
  box-shadow: none;
  cursor: not-allowed;
}


/* =========================
   SUCCESS
========================= */

#successScreen {
  justify-content: center;
  align-items: center;
  padding: 30px 22px;
}

.success-page {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.success-logo {
  width: 170px;
  height: auto;
  max-width: 50%;
  margin: 0 auto 35px;
}

.success-icon {
  width: 88px;
  height: 88px;

  margin: 0 auto 26px;

  background: #d82c20;
  color: white;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 46px;
  font-weight: bold;
}

.success-page h2 {
  font-size: 46px;
  color: #002d56;
  margin-bottom: 12px;
}

.success-message {
  font-size: 18px;
  color: #75818d;
  margin-bottom: 30px;
}

.success-order-card {
  background: white;

  border-radius: 22px;

  padding: 27px;

  margin-bottom: 24px;

  box-shadow:
    0 8px 25px
    rgba(0, 45, 86, 0.08);
}

.success-order-card p {
  color: #82909d;
  margin-bottom: 8px;
}

.success-order-card h3 {
  color: #002d56;
  font-size: 26px;
}


/* =========================
   ADMIN LOGIN
========================= */

.admin-login-screen {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background: #f7f7f5;
}

.admin-login-card {
  width: 100%;
  max-width: 430px;

  background: white;

  border-radius: 24px;

  padding: 42px;

  text-align: center;

  box-shadow:
    0 10px 35px
    rgba(0, 45, 86, 0.10);
}

.admin-login-logo {
  width: 110px;
  height: auto;

  margin: 0 auto 25px;
}

.admin-login-card h1 {
  color: #002d56;

  font-size: 34px;

  margin-bottom: 28px;
}

.admin-login-input {
  width: 100%;

  padding: 17px;

  margin-bottom: 14px;

  border:
    2px solid
    #dfe4e8;

  border-radius: 14px;

  font-size: 17px;

  color: #002d56;

  background: white;

  outline: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.admin-login-input:focus {
  border-color: #002d56;

  box-shadow:
    0 0 0 4px
    rgba(0, 45, 86, 0.07);
}

.admin-login-button {
  width: 100%;

  border: none;

  border-radius: 14px;

  padding: 17px;

  background: #002d56;

  color: white;

  font-size: 17px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.1s ease,
    opacity 0.15s ease;
}

.admin-login-button:active {
  transform: scale(0.99);
}

.admin-login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-login-error {
  color: #d82c20;

  font-size: 14px;
  font-weight: 700;

  margin-top: 16px;
}


/* =========================
   ADMIN DASHBOARD
========================= */

.admin-page {
  width: 100%;
  max-width: 1100px;

  margin: 0 auto;

  padding: 40px 30px 70px;
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 18px;

  margin-bottom: 40px;
}

.admin-logo {
  width: 65px;
  height: 65px;
  object-fit: contain;
  flex-shrink: 0;
}

.admin-header h1 {
  color: #002d56;
  font-size: 38px;
  line-height: 1.1;
}


/* =========================
   ADMIN STATS
========================= */

.admin-stats {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 16px;

  margin-bottom: 40px;
}

.stat-card {
  background: white;

  border-radius: 20px;

  padding: 25px;

  min-height: 140px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  box-shadow:
    0 6px 20px
    rgba(0, 45, 86, 0.07);
}

.stat-card p {
  color: #7b8995;
  font-size: 14px;
  font-weight: 700;

  margin-bottom: 10px;
}

.stat-card h2 {
  color: #002d56;
  font-size: 42px;
  line-height: 1;
}

.main-stat {
  background: #002d56;
}

.main-stat p,
.main-stat h2 {
  color: white;
}

.extra-card h2 {
  color: #d82c20;
}


/* =========================
   ADMIN QUEUE
========================= */

.queue-section {
  background: white;

  border-radius: 24px;

  padding: 28px;

  box-shadow:
    0 6px 20px
    rgba(0, 45, 86, 0.07);
}

.queue-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;

  margin-bottom: 25px;
}

.queue-heading h2 {
  font-size: 30px;
  color: #002d56;
}

#pendingText {
  color: #7c8893;
  font-weight: 700;
}


/* =========================
   ADMIN ORDER ITEMS
========================= */

.order-queue {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-item {
  display: grid;

  grid-template-columns:
    45px
    1fr
    auto;

  gap: 18px;

  align-items: center;

  border: 2px solid #edf0f2;
  border-radius: 16px;

  padding: 17px 18px;
}

.order-number {
  width: 36px;
  height: 36px;

  border-radius: 50%;

  background: #002d56;
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 800;
}

.order-name {
  color: #002d56;

  font-weight: 800;
  font-size: 18px;

  margin-bottom: 4px;
}

.order-drink {
  color: #788692;
  font-size: 14px;
}

.done-btn {
  border: none;
  border-radius: 12px;

  padding: 12px 18px;

  background: #d82c20;
  color: white;

  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.1s ease,
    opacity 0.15s ease;
}

.done-btn:active {
  transform: scale(0.98);
}

.empty-queue {
  padding: 40px;
  text-align: center;
  color: #9aa4ad;
}


/* =========================
   ADMIN ACTION BUTTONS
========================= */

.admin-actions {
  display: flex;
  justify-content: flex-end;

  gap: 14px;

  margin-top: 22px;
}

.admin-btn {
  border: none;
  border-radius: 14px;

  padding: 16px 22px;

  font-size: 15px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.1s ease,
    opacity 0.15s ease;
}

.admin-btn:active {
  transform: scale(0.98);
}

.export-btn {
  background: #002d56;
  color: white;
}

.reset-btn {
  background: #d82c20;
  color: white;
}

.logout-btn {
  background: #7d8892;
  color: white;
}


/* =========================
   TABLET
========================= */

@media (max-width: 850px) {

  .admin-stats {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* =========================
   MOBILE / SMALL TABLET
========================= */

@media (max-width: 700px) {

  #homeScreen {
    padding: 35px 20px;
  }

  .brand {
    margin-bottom: 38px;
  }

  .koufu-logo {
    width: 160px;
    margin-bottom: 25px;
  }

  .brand h1 {
    font-size: 42px;
  }

  .subtitle {
    font-size: 17px;
  }

  .drink-card {
    min-height: 135px;

    grid-template-columns:
      95px
      1fr
      28px;

    padding: 22px;
  }

  .drink-icon-box {
    width: 85px;
    height: 85px;
  }

  .drink-icon-img {
    width: 85px;
    height: 85px;
  }

  .drink-name {
    font-size: 27px;
  }

  .drink-description {
    font-size: 14px;
  }

  .arrow {
    font-size: 38px;
  }

  .order-header h2 {
    font-size: 40px;
  }

  .section-card {
    padding: 22px;
  }

  .small-logo {
    width: 95px;
  }

  .success-logo {
    width: 145px;
  }

  .success-page h2 {
    font-size: 39px;
  }

  .admin-login-card {
    padding: 34px 28px;
  }

}


/* =========================
   VERY SMALL SCREEN
========================= */

@media (max-width: 520px) {

  .admin-page {
    padding: 25px 16px 50px;
  }

  .admin-header {
    gap: 14px;
  }

  .admin-logo {
    width: 55px;
    height: 55px;
  }

  .admin-header h1 {
    font-size: 28px;
  }

  .admin-stats {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 10px;
  }

  .stat-card {
    min-height: 110px;
    padding: 18px;
  }

  .stat-card h2 {
    font-size: 34px;
  }

  .queue-section {
    padding: 20px;
  }

  .queue-heading {
    align-items: flex-start;
  }

  .queue-heading h2 {
    font-size: 25px;
  }

  .order-item {
    grid-template-columns:
      38px
      1fr
      auto;

    gap: 10px;

    padding: 14px;
  }

  .order-number {
    width: 32px;
    height: 32px;
  }

  .done-btn {
    padding: 10px 14px;
  }

  .admin-actions {
    flex-direction: column;
  }

  .admin-btn {
    width: 100%;
  }

  .admin-login-card {
    padding: 30px 22px;
  }

  .admin-login-logo {
    width: 95px;
  }

  .admin-login-card h1 {
    font-size: 29px;
  }

}