/* Minimal styles: white background, subtle card UI */
:root{
  --bg: #ffffff;
  --surface: #ffffff;
  --muted: #6b7280;
  --border: #e6e9ee;
  --accent: #0f1724;
}

*{box-sizing:border-box}

body{
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: var(--bg);
  color: var(--accent);
  margin:0;
  padding:0;
  -webkit-font-smoothing:antialiased;
}

.container{
  max-width:980px;
  margin:36px auto;
  padding:28px;
  background: var(--surface);
  border-radius:8px;
  border:1px solid var(--border);
  box-shadow:0 4px 12px rgba(16,24,40,0.04);
}

.header-futuristic{margin-bottom:20px}
.gradient-text{font-size:1.6rem;font-weight:700;color:var(--accent);margin:0}
#input-area{display:flex;gap:12px;align-items:center}

/* Header row with logout button */
.header-row{display:flex;align-items:center;gap:12px}
/* style both the class and the id to ensure the button is always styled */
.logout-btn, #logoutBtn{margin-left:auto;padding:8px 12px;border-radius:8px;border:1px solid var(--border);background:#f8fafc;color:var(--accent);cursor:pointer;font-size:0.95rem}
.logout-btn:hover, #logoutBtn:hover{background:#f1f5f9}
.input-area{display:flex;gap:12px;align-items:center}

#searchInput, #searchType{padding:10px 12px;border-radius:8px;border:1px solid var(--border);background:transparent;color:var(--accent);outline:none;font-size:1.05rem}
#searchInput{flex:1}
#searchType{min-width:160px;height:40px;line-height:1.2;-webkit-appearance:none;-moz-appearance:none;appearance:none}
/* Make payment filter visually match other inputs */
#paymentFilter{padding:10px 12px;border-radius:8px;border:1px solid var(--border);background:transparent;color:var(--accent);outline:none;font-size:1.05rem;height:40px;min-width:120px;-webkit-appearance:none;-moz-appearance:none;appearance:none}
#searchInput::placeholder{color:var(--muted)}

#fetchBtn{padding:10px 14px;border-radius:8px;border:1px solid var(--border);background:#f8fafc;color:var(--accent);cursor:pointer}
#fetchBtn:hover{background:#f1f5f9}

.orders-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px;margin-top:18px}
.order-card{background:#fff;border:1px solid var(--border);border-radius:10px;padding:16px;color:var(--accent);box-shadow:0 2px 8px rgba(16,24,40,0.03);position:relative}
.card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px}
/* left area takes ~80%, right area (qr-container) takes ~20% */
.card-header > div:first-child{flex:1 1 80%}
.qr-container{width:20%;display:flex;justify-content:flex-end;align-items:flex-start}
.qr-code-img{max-width:100%;height:auto;max-height:120px;min-width:60px;border:1px solid var(--border);border-radius:6px;object-fit:contain}
.ticket-name{font-weight:700;margin-bottom:8px}
.order-card b{color:var(--accent)}
.error-card,.loading-card{grid-column:1/-1;background:#fff;border:1px solid var(--border);padding:16px;border-radius:10px;text-align:center;color:var(--muted)}

/* Event name shown next to order number */
.event-name{font-size:0.95rem;color:#6b7280;margin-left:8px;display:inline-block;vertical-align:middle}

/* Resend email button */
.resend-email-btn{padding:6px 10px;border-radius:8px;border:1px solid var(--border);background:#f8fafc;color:var(--accent);cursor:pointer;font-size:0.9rem}
.resend-email-btn:hover{background:#f1f5f9}
.resend-email-btn:disabled{opacity:0.6;cursor:not-allowed}

@media (max-width:600px){
  .card-header{flex-direction:column;align-items:flex-start}
  .qr-container{width:100%;justify-content:flex-start;margin-top:8px}
  .qr-code-img{width:80px;height:auto}
}

@media (max-width:480px){
  .qr-code-img{width:70px;height:auto}
}

/* Login */
.login-container{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--bg)}
.login-card{width:360px;background:var(--surface);border:1px solid var(--border);padding:20px;border-radius:10px;box-shadow:0 6px 18px rgba(16,24,40,0.04)}
.login-card h2{margin:0 0 10px 0;font-size:1.25rem;color:var(--accent)}
.login-card form{display:flex;flex-direction:column;gap:10px}
.login-card input{padding:10px;border-radius:8px;border:1px solid var(--border);background:transparent;color:var(--accent)}
.login-card button{padding:10px;border-radius:8px;border:1px solid var(--border);background:#f8fafc;cursor:pointer}
.message{font-size:0.95rem;color:var(--muted)}

@media (max-width:480px){.container{margin:16px;padding:16px}.login-card{width:100%}}
