/* Auth pages */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 50%, #dcfce7 100%);
}
.auth-card {
  background: white;
  border: 2px solid #c7dff7;
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 6px 0 #b0cce8, 0 0 0 2px #d0e8f8;
}
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo .mc-logo-icon {
  width: 56px; height: 56px;
  font-size: 26px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
}
.auth-title {
  font-size: 22px;
  font-weight: 900;
  color: #1e3a5f;
  margin-bottom: 6px;
  text-align: center;
}
.auth-sub {
  font-size: 13px;
  color: #4a7ab5;
  text-align: center;
  margin-bottom: 24px;
}
.auth-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #4a7ab5;
}
.auth-footer a { color: #3b82f6; font-weight: 800; text-decoration: none; }

/* Pixel decoration tiles */
.mc-pixel-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.mc-pixel-tile {
  position: absolute;
  width: 20px; height: 20px;
  opacity: 0.04;
  background: #1e40af;
}

/* Floating label input */
.mc-input-wrap {
  position: relative;
}
.mc-input-wrap .mc-input {
  padding-right: 40px;
}
.mc-input-wrap .mc-input-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
}
.mc-input-wrap .mc-input-right:hover { color: #3b82f6; }

/* Amount buttons */
.mc-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.mc-amount-btn {
  padding: 10px 6px;
  border: 2px solid #c7dff7;
  border-radius: 8px;
  background: white;
  font-family: var(--mc-font);
  font-size: 12px;
  font-weight: 800;
  color: #1e3a5f;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.mc-amount-btn:hover, .mc-amount-btn.selected {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
}

/* Pending order card */
.mc-pending-card {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 2px solid #fed7aa;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1e3a5f;
  transition: all 0.2s;
}
.mc-pending-card:hover { transform: translateY(-1px); }
.mc-pending-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Banner */
.mc-banner {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-radius: 14px;
  padding: 16px;
  color: white;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.mc-banner-title {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 4px;
}
.mc-banner-sub { font-size: 12px; opacity: 0.9; }
.mc-banner-icons { display: flex; gap: 8px; margin-top: 10px; }
.mc-banner-icons img {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.3);
}
.mc-banner-link {
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Notice bar */
.mc-notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Profile menu list */
.mc-menu-list { list-style: none; }
.mc-menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: #1e3a5f;
  gap: 12px;
  cursor: pointer;
  background: white;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.mc-menu-item:hover { background: #f0f7ff; }
.mc-menu-item i:first-child {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.mc-menu-item.danger i:first-child { background: #fee2e2; color: #dc2626; }
.mc-menu-item.danger { color: #dc2626; }
.mc-menu-item-arrow { margin-left: auto; color: #94a3b8; }

/* Copy button */
.mc-copy-btn {
  background: none;
  border: 2px solid #c7dff7;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #3b82f6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.mc-copy-btn:hover { background: #dbeafe; }
.mc-copy-btn.copied { background: #dcfce7; border-color: #86efac; color: #15803d; }

/* Toast */
.mc-toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s;
  white-space: nowrap;
  max-width: 90%;
}
.mc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.mc-toast.success { background: #15803d; }
.mc-toast.error { background: #b91c1c; }
.mc-toast.warning { background: #d97706; }


  /* ============================
     PREMIUM UPDATES & OAUTH
     ============================ */

  /* OAuth buttons */
  .oauth-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }
  .oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.2s;
    font-family: var(--mc-font, 'Nunito', sans-serif);
  }
  .oauth-github {
    background: #1a1a2e;
    color: white;
    border-color: #333;
  }
  .oauth-github:hover { background: #16213e; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
  .oauth-google {
    background: white;
    color: #1e3a5f;
    border-color: #e2e8f0;
  }
  .oauth-google:hover { background: #f8fafc; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

  /* Auth divider */
  .auth-divider {
    position: relative;
    text-align: center;
    margin: 16px 0;
  }
  .auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: #e2e8f0;
  }
  .auth-divider span {
    position: relative;
    background: white;
    padding: 0 12px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 700;
  }

  /* Premium card hover effects */
  .mc-card {
    transition: box-shadow 0.2s, border-color 0.2s;
  }
  .mc-card:hover { box-shadow: 0 4px 20px rgba(30,58,95,0.08); }

  /* Improved stat cards */
  .mc-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .mc-stat-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.2s;
  }
  .mc-stat-card:hover {
    border-color: #bfdbfe;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59,130,246,0.1);
  }
  .mc-stat-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    margin: 0 auto 8px;
  }
  .mc-stat-icon.blue { background: #dbeafe; color: #1d4ed8; }
  .mc-stat-icon.green { background: #dcfce7; color: #15803d; }
  .mc-stat-icon.orange { background: #fff7ed; color: #c2410c; }
  .mc-stat-icon.purple { background: #ede9fe; color: #7c3aed; }
  .mc-stat-value { font-size: 20px; font-weight: 900; color: #1e3a5f; }
  .mc-stat-label { font-size: 11px; color: #64748b; margin-top: 2px; font-weight: 700; }

  /* Improved balance card */
  .mc-balance-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 50%, #0f172a 100%);
    border-radius: 18px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(30,58,95,0.4);
  }
  .mc-balance-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
  }
  .mc-balance-card::after {
    content: '';
    position: absolute;
    bottom: -30px; left: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
  }

  /* Improved admin nav */
  .mc-admin-nav {
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  .mc-admin-nav-inner {
    display: flex;
    overflow-x: auto;
    padding: 0 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .mc-admin-nav-inner::-webkit-scrollbar { display: none; }
  .mc-admin-nav-item {
    white-space: nowrap;
    padding: 14px 16px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .mc-admin-nav-item.active,
  .mc-admin-nav-item:hover {
    color: white;
    border-bottom-color: #60a5fa;
    background: rgba(255,255,255,0.05);
  }

  /* Premium table */
  .mc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  .mc-table th {
    background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
    color: #1e3a5f;
    font-weight: 900;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #c7dff7;
  }
  .mc-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
  }
  .mc-table tr:hover td { background: #f8fafc; }

  /* Toast improvements */
  .mc-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    max-width: 300px;
    text-align: center;
  }
  .mc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .mc-toast.success { background: linear-gradient(135deg, #15803d, #166534); border: 1px solid #4ade80; }
  .mc-toast.error { background: linear-gradient(135deg, #dc2626, #b91c1c); border: 1px solid #f87171; }

  /* Responsive improvements */
  @media (max-width: 400px) {
    .mc-page { padding: 12px; }
    .mc-amount-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (min-width: 768px) {
    .mc-page { max-width: 600px; margin: 0 auto; }
    .mc-header { max-width: 600px; margin: 0 auto; }
    .mc-bottom-nav { max-width: 600px; left: 50%; transform: translateX(-50%); }
    .auth-card { max-width: 420px; }
  }
  @media (min-width: 1024px) {
    body.mc-body { background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%); }
    .mc-page { padding: 20px; }
  }

  /* Search input */
  .mc-search {
    position: relative;
    margin-bottom: 14px;
  }
  .mc-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
  .mc-search input { 
    width: 100%; padding: 11px 14px 11px 40px; 
    border: 2px solid #e2e8f0; border-radius: 10px;
    font-size: 14px; font-weight: 600; font-family: inherit;
    background: white; color: #1e3a5f;
    transition: border-color 0.2s;
    box-sizing: border-box;
  }
  .mc-search input:focus { outline: none; border-color: #93c5fd; }

  /* Smooth page transitions */
  .mc-page { animation: fadeInUp 0.3s ease-out; }
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Pixel header */
  .mc-pixel-header {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #1e3a5f;
    letter-spacing: 2px;
    opacity: 0.4;
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  /* Improved order items */
  .mc-order-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #1e3a5f;
    display: block;
    transition: all 0.2s;
  }
  .mc-order-item:hover { border-color: #bfdbfe; box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-1px); }
  .mc-order-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .mc-order-service { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; }
  .mc-order-service img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
  .mc-order-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: #64748b; font-weight: 600; }

  /* Status badges */
  .mc-status { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 800; }
  .mc-status-pending { background: #fef3c7; color: #b45309; }
  .mc-status-received { background: #dcfce7; color: #15803d; }
  .mc-status-completed { background: #dcfce7; color: #15803d; }
  .mc-status-canceled { background: #fee2e2; color: #dc2626; }
  .mc-status-expiring { background: #fff7ed; color: #c2410c; }
  .mc-status-success { background: #dcfce7; color: #15803d; }
  .mc-status-cancel { background: #fee2e2; color: #dc2626; }

  /* QR Box */
  .mc-qr-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 16px;
    margin: 0 auto;
  }
  .mc-qr-box img { max-width: 200px; border-radius: 8px; }

  /* Timer */
  .mc-timer {
    font-family: 'Press Start 2P', monospace;
    font-size: 20px;
    color: #f97316;
    text-align: center;
    margin: 8px 0;
    letter-spacing: 2px;
  }

  /* Receipt rows */
  .mc-receipt { background: #f8fafc; border-radius: 10px; padding: 12px; }
  .mc-receipt-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; }
  .mc-receipt-row .label { color: #64748b; font-weight: 600; }
  .mc-receipt-row .value { font-weight: 800; color: #1e3a5f; }

  /* Modal */
  .mc-modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
  }
  .mc-modal-overlay.open { opacity: 1; pointer-events: all; }
  .mc-modal {
    background: white; width: 100%; max-width: 440px;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 32px;
    transform: translateY(20px);
    transition: transform 0.3s;
    max-height: 90vh;
    overflow-y: auto;
  }
  .mc-modal-overlay.open .mc-modal { transform: translateY(0); }
  .mc-modal-handle {
    width: 40px; height: 4px;
    background: #e2e8f0; border-radius: 4px;
    margin: 0 auto 16px;
  }
  