/* ==========================================================================
   Telegram Bonus Portal - Master Stylesheet
   ========================================================================== */

:root {
  /* Solibet Dark Casino Color Palette */
  --bg-dark: #06140c;
  --bg-card: rgba(8, 26, 17, 0.85);
  --bg-card-hover: rgba(13, 38, 25, 0.92);
  --border-color: rgba(212, 175, 55, 0.25);
  --border-focus: rgba(247, 210, 104, 0.7);

  --text-main: #ffffff;
  --text-muted: #a4b8ab;
  --text-dim: #5c7566;

  --accent-gold: #f7d268;
  --accent-gold-dark: #c89524;
  --accent-gold-light: #ffe89f;
  --accent-blue: #f7d268;
  --telegram-blue: #f7d268;

  --status-pending: #f59e0b;
  --status-pending-bg: rgba(245, 158, 11, 0.18);
  --status-approved: #34d399;
  --status-approved-bg: rgba(16, 185, 129, 0.18);
  --status-rejected: #f87171;
  --status-rejected-bg: rgba(239, 68, 68, 0.18);

  --gradient-accent: linear-gradient(135deg, #f7d268 0%, #c89524 100%);
  --gradient-gold-text: linear-gradient(135deg, #ffffff 10%, #f7d268 60%, #c89524 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.22) 0%, transparent 70%);

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-lg: 0 20px 45px -10px rgba(0, 0, 0, 0.85), 0 0 25px rgba(212, 175, 55, 0.12);
  --shadow-glow: 0 0 30px rgba(247, 210, 104, 0.35);
  --backdrop-blur: blur(16px);

  /* Fonts & Transitions */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: #06140c;
  background-image: 
    var(--gradient-glow),
    linear-gradient(180deg, rgba(6, 20, 12, 0.78) 0%, rgba(6, 20, 12, 0.94) 100%),
    url('../images/casino_bg.png');
  background-size: cover, cover, cover;
  background-position: center top, center, center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-dark {
  background-color: var(--bg-dark);
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--accent-cyan);
}

/* Glassmorphism Cards */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.card-glass:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Layout Components */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 650px;
}

.install-card {
  width: 100%;
  max-width: 550px;
  padding: 35px;
}

/* Typography & Headers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.text-gradient {
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

.brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--gradient-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #081a10;
  margin-bottom: 20px;
  box-shadow: var(--shadow-glow);
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-label svg {
  color: var(--accent-gold);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(5, 18, 11, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

.form-control::placeholder {
  color: var(--text-dim);
}

.form-control:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px rgba(247, 210, 104, 0.2);
  background: rgba(8, 26, 17, 0.95);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #081a10;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(200, 149, 36, 0.45);
  border: 1px solid #f7d268;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffe083 0%, #db9d2b 100%);
  color: #05130b;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(200, 149, 36, 0.65);
}

.btn-secondary {
  background: rgba(13, 38, 25, 0.75);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.btn-secondary:hover {
  background: rgba(20, 55, 36, 0.9);
  border-color: var(--accent-gold);
  color: #ffffff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #10b981;
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 30px;
  font-size: 1.05rem;
}

/* Badges & Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-pending {
  background: var(--status-pending-bg);
  color: var(--status-pending);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-approved {
  background: var(--status-approved-bg);
  color: var(--status-approved);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-rejected {
  background: var(--status-rejected-bg);
  color: var(--status-rejected);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Alert Boxes */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-info {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(247, 210, 104, 0.35);
  color: #f7d268;
}

/* Header & Navbar */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(5, 18, 11, 0.92);
  backdrop-filter: var(--backdrop-blur);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.nav-brand .icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #081a10;
}

/* Hero Section */
.hero-section {
  padding: 60px 0 30px;
  text-align: center;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-section p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Main Form Card */
.form-card {
  padding: 40px;
  margin-bottom: 60px;
}

.form-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.telegram-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(247, 210, 104, 0.35);
  color: #f7d268;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Stats Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.total { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon.pending { background: var(--status-pending-bg); color: var(--status-pending); }
.stat-icon.approved { background: var(--status-approved-bg); color: var(--status-approved); }
.stat-icon.rejected { background: var(--status-rejected-bg); color: var(--status-rejected); }

.stat-info h3 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  table-layout: auto;
}

.data-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  color: var(--text-main);
  word-break: break-word;
  white-space: normal;
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.user-cell {
  display: flex;
  flex-direction: column;
  max-width: 220px;
}

.user-cell .primary-name {
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.user-cell .secondary-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* Modal Helper Styles & Overlay */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-content {
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-color, #334155);
  border-radius: var(--radius-lg, 16px);
  padding: 30px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg, 0 20px 25px -5px rgba(0, 0, 0, 0.5));
  position: relative;
  margin: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 15px;
}

.detail-item {
  background: rgba(10, 15, 26, 0.6);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.detail-item label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  font-weight: 700;
}

.detail-item span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

.qr-box {
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
  display: inline-block;
  margin: 15px 0;
}

.secret-key-display {
  background: rgba(10, 15, 26, 0.8);
  border: 1px dashed var(--accent-blue);
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: #38bdf8;
  margin: 10px 0;
  word-break: break-all;
}

/* Search & Filter Bar */
.filter-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-box input {
  padding-left: 44px;
}

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.filter-tabs {
  display: flex;
  gap: 8px;
  background: rgba(10, 15, 26, 0.6);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.filter-tab {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-tab.active {
  background: var(--gradient-accent);
  color: #fff;
}

/* Success Modal / Result View */
.success-card {
  text-align: center;
  padding: 50px 30px;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10b981;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

/* Utility Helpers */
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Header Brand Icon & Logo */
.site-header .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.15rem;
}

.site-header .icon-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(6, 20, 12, 0.8);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(247, 210, 104, 0.35);
  padding: 0 !important;
}

.site-header .icon-box img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}
