/* Eastern Banquet - Next-Gen Luxury Dashboard Layout */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --sidebar-width: 260px;
  --header-height: 72px;
  --bg-main: #060911;
  --card-bg: #0f172a;
  --card-bg-elevated: #1e293b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 158, 11, 0.3);
  
  --gold-primary: #f59e0b;
  --gold-bright: #fbbf24;
  --gold-light: #fef08a;
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --success: #10b981;
  --error: #f43f5e;
  --info: #3b82f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(30, 27, 75, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(120, 53, 15, 0.25) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logoPulseGlow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(251, 191, 36, 0.95));
  }
}

/* APP LAYOUT STRUCTURE */
.app-container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  background: transparent;
  padding: 0;
  border: none;
}

.sidebar-brand-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.sidebar-menu {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.nav-item:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.08);
}

.nav-item.active {
  color: var(--gold-bright);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(180, 83, 9, 0.15));
  border: 1px solid var(--border-gold);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 9, 17, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.user-role {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-signout {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 18px;
  transition: color 0.2s ease;
}
.btn-signout:hover { color: var(--error); }

/* MAIN CONTENT AREA */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* TOP HEADER */
.top-header {
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-clock {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

/* CONTENT CONTAINER */
.content-body {
  padding: 32px;
  flex: 1;
}

/* METRIC STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.stat-info span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-info h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.gold { background: rgba(245, 158, 11, 0.15); color: var(--gold-bright); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.stat-icon.red { background: rgba(244, 63, 94, 0.15); color: var(--error); }

/* VIEW PANELS */
.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

/* CARD CONTAINER */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* SPLIT GENERATE VIEW */
.generate-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  background: #060911;
  color: #fff;
  transition: all 0.25s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

input.uppercase {
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
}

/* BUTTONS */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.btn-primary {
  background: var(--gold-gradient);
  color: #000;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}

.btn-blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
}

.btn-green {
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
}

.btn-gray {
  background: linear-gradient(135deg, #475569, #334155);
  color: #fff;
}

/* GOLDEN TICKET PREVIEW CARD BOX */
.ticket-preview-box {
  background: rgba(6, 9, 17, 0.6);
  border: 1px dashed var(--border-gold);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

/* FLAT CLEAN CREDIT CARD PROPORTIONS (580px x 360px) */
.voucher-card {
  width: 580px;
  height: 360px;
  background: linear-gradient(135deg, #050811 0%, #0f172a 55%, #1e1b4b 100%);
  border: 2px solid #fbbf24;
  border-radius: 20px;
  padding: 22px 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* HEADER SECTION */
.header-section {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.voucher-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  background: transparent;
  padding: 0;
  border: none;
  flex-shrink: 0;
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fbbf24;
  line-height: 1.2;
}

.brand-sub {
  font-size: 9.5px;
  color: #cbd5e1;
  letter-spacing: 0.5px;
  margin-top: 3px;
  font-weight: 600;
}

.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #f59e0b 30%, #fef08a 50%, #f59e0b 70%, transparent);
  margin: 8px 0;
}

/* CENTER VOUCHER CODE SECTION - FLAT CLEAN CENTERING */
.center-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.voucher-tag {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #fbbf24;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.code-box {
  font-size: 32px;
  letter-spacing: 10px;
  text-indent: 10px;
  font-weight: 900;
  padding: 10px 28px;
  border: 1.5px solid #fbbf24;
  border-radius: 14px;
  color: #fff;
  background: #060911;
  display: inline-block;
  text-align: center;
}

/* BOTTOM METADATA & CEO SIGNATURE ROW */
.bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.meta-grid {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  flex: 1;
}

.meta-box {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  white-space: nowrap;
}

.meta-box label {
  display: block;
  font-size: 8px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.meta-box span {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
}

.signature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.ceo-signature {
  height: 56px;
  object-fit: contain;
}

.sig-label {
  font-size: 8.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
  margin-top: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer-terms {
  font-size: 9.5px;
  color: #cbd5e1;
  line-height: 1.2;
}

/* REDEMPTION WIZARD */
.redeem-wizard {
  max-width: 540px;
  margin: 0 auto;
}

.otp-box {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-subtle);
  animation: fadeIn 0.4s ease-out;
}

.otp-alert {
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed var(--gold-primary);
  color: var(--gold-bright);
  padding: 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
}

.result-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.result-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--success);
  color: #34d399;
}

.result-box.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid var(--error);
  color: #fb7185;
}

.details-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}

.details-table td {
  padding: 8px 0;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* DATA TABLE */
.table-header-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.search-input {
  width: 320px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

th, td {
  padding: 14px 16px;
  text-align: left;
}

th {
  background: rgba(6, 9, 17, 0.9);
  color: var(--gold-bright);
  font-family: 'Cinzel', serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-gold);
}

td {
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13.5px;
}

tr:hover td {
  background: rgba(245, 158, 11, 0.08);
}

.status-valid { color: #34d399; font-weight: 700; }
.status-redeemed { color: var(--gold-bright); font-weight: 700; }
.status-expired { color: #fb7185; font-weight: 700; }

/* LOGIN SCREEN STYLING */
.login-body {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(30, 27, 75, 0.5) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(120, 53, 15, 0.25) 0%, transparent 50%);
  margin: 0;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(25px);
  border: 1px solid var(--border-gold);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  text-align: center;
  animation: fadeIn 0.5s ease-out;
}

.login-logo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  background: transparent;
  padding: 0;
  border: none;
  margin-bottom: 16px;
  animation: logoPulseGlow 3.5s infinite ease-in-out;
}

.login-title {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px 0;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
  letter-spacing: 0.5px;
}

.login-error-alert {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid var(--error);
  color: #fb7185;
  padding: 12px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 18px;
  text-align: center;
}

@media (max-width: 992px) {
  .sidebar { width: 80px; }
  .sidebar-brand-title, .sidebar-brand-sub, .nav-text, .user-details { display: none; }
  .main-wrapper { margin-left: 80px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .generate-split { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
  .stats-grid { grid-template-columns: 1fr; }
  .top-header { padding: 0 16px; }
  .content-body { padding: 16px; }
  .voucher-card { width: 100%; height: auto; }
}
