:root {
  --bg-primary: #070a11;
  --bg-secondary: #0d1322;
  --card-bg: rgba(16, 24, 40, 0.72);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(0, 242, 254, 0.25);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #7928ca;
  --accent-pink: #ff0080;
  
  --gradient-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --gradient-accent: linear-gradient(135deg, #7928ca 0%, #ff0080 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --status-active-bg: rgba(16, 185, 129, 0.15);
  --status-active-text: #10b981;
  --status-active-border: rgba(16, 185, 129, 0.3);
  
  --status-expired-bg: rgba(239, 68, 68, 0.15);
  --status-expired-text: #ef4444;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-glow-cyan: 0 0 24px -4px rgba(0, 242, 254, 0.35);
  --shadow-glow-purple: 0 0 24px -4px rgba(121, 40, 202, 0.35);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 242, 254, 0.1) 0%, transparent 60%),
    radial-gradient(circle at 100% 40%, rgba(121, 40, 202, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* Header */
.app-header {
  padding: calc(12px + var(--safe-top)) 18px 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 10, 17, 0.85);
  border-bottom: 1px solid var(--card-border);
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #16243d, #0b1424);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.brand-logo-glow {
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: var(--gradient-primary);
  opacity: 0.3;
  filter: blur(6px);
  z-index: -1;
}

.brand-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-icon-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.1);
}

.lang-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  padding: 2px 4px;
}

/* Scroll Area */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px calc(80px + var(--safe-bottom)) 16px;
  -webkit-overflow-scrolling: touch;
}

.content-scroll::-webkit-scrollbar {
  width: 4px;
}
.content-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.content-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass Cards */
.glass-card {
  background: var(--card-bg);
  background-image: var(--gradient-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease;
}

.glass-card:hover {
  border-color: var(--card-hover-border);
}

.card-header-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title-group {
  display: flex;
  flex-direction: column;
}

.card-subtitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* User Hero Card */
.user-hero-card {
  padding: 14px 16px;
}

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

.user-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #00f2fe22, #7928ca22);
  border: 1px solid rgba(0, 242, 254, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-initial {
  font-size: 18px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-details {
  flex: 1;
}

.user-greeting {
  font-size: 12px;
  color: var(--text-secondary);
}

.user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.status-active {
  background: var(--status-active-bg);
  color: var(--status-active-text);
  border: 1px solid var(--status-active-border);
}

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

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Traffic Meter */
.traffic-card {
  position: relative;
  overflow: hidden;
}

.metric-highlight {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 14px 0;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.progress-bar-glow {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 16px;
  background: #ffffff;
  opacity: 0.7;
  filter: blur(3px);
}

.traffic-stats-row {
  display: flex;
  justify-content: space-between;
}

.traffic-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.text-right {
  text-align: right;
}

/* Quick Actions Row */
.quick-actions-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #050b14;
}

.btn-glow {
  box-shadow: var(--shadow-glow-cyan);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-sm {
  padding: 9px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

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

.btn-danger-ghost:active {
  background: rgba(239, 68, 68, 0.1);
}

/* 3-Column Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.metric-card {
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  margin-bottom: 0;
}

.metric-card:active {
  transform: scale(0.96);
}

.metric-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.icon-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.icon-cyan {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
}

.icon-purple {
  background: rgba(121, 40, 202, 0.18);
  color: #c084fc;
}

.metric-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-number {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Guide Preview Card */
.guide-preview-card {
  cursor: pointer;
  margin-bottom: 0;
  transition: all 0.2s ease;
}

.guide-preview-card:active {
  transform: scale(0.98);
}

.guide-flex {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guide-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-texts {
  flex: 1;
}

.guide-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.guide-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.guide-arrow {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
}

/* SUBSCRIPTION TAB */
.tariff-headline {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tariff-countdown-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.countdown-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.countdown-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 4px 0 2px 0;
  letter-spacing: -0.3px;
}

.countdown-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.glass-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.glass-input:focus {
  border-color: var(--accent-cyan);
}

.glass-textarea {
  resize: vertical;
  min-height: 80px;
}

.input-with-button {
  display: flex;
  gap: 8px;
  position: relative;
}

.input-with-button .glass-input {
  flex: 1;
}

.input-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.input-action-btn:active {
  transform: scale(0.92);
  background: rgba(0, 242, 254, 0.2);
}

.sub-link-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.section-hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.count-pill {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.25);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

/* Devices List */
.devices-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.device-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.device-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.device-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.device-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-sub {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-delete-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.device-delete-btn:active {
  transform: scale(0.9);
  background: rgba(239, 68, 68, 0.25);
}

.devices-card-footer {
  display: flex;
  justify-content: flex-end;
}

/* BALANCE TAB */
.balance-hero-card {
  text-align: center;
  padding: 26px 18px;
}

.balance-hero-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}

.balance-hero-amount {
  font-size: 38px;
  font-weight: 800;
  margin: 6px 0;
  letter-spacing: -1px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.balance-subtext {
  font-size: 12px;
  color: var(--text-secondary);
}

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

.amount-pills-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.amount-pill {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.amount-pill.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.custom-amount-wrap {
  margin-top: 6px;
}

.mt-3 {
  margin-top: 14px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

/* Payment Methods Grid */
.payment-methods-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.payment-method-card {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-method-card.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--accent-cyan);
}

.pay-icon-wrap {
  font-size: 20px;
  margin-right: 12px;
}

.pay-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pay-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.pay-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.pay-check {
  color: var(--accent-cyan);
  font-weight: 800;
  opacity: 0;
}

.payment-method-card.active .pay-check {
  opacity: 1;
}

.icon-text-btn {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.tx-desc {
  color: var(--text-primary);
  font-weight: 600;
}

.tx-date {
  font-size: 11px;
  color: var(--text-muted);
}

.tx-amount-plus {
  color: #10b981;
  font-weight: 700;
}

.tx-amount-minus {
  color: #ef4444;
  font-weight: 700;
}

/* REFERRALS TAB */
.partner-hero-card {
  position: relative;
  overflow: hidden;
}

.partner-badge {
  display: inline-block;
  background: rgba(121, 40, 202, 0.2);
  border: 1px solid rgba(121, 40, 202, 0.4);
  color: #d8b4fe;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.partner-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.partner-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 14px;
}

.highlight-cyan {
  color: var(--accent-cyan);
  font-weight: 700;
}

.highlight-amber {
  color: #f59e0b;
}

.ref-link-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-btns-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
}

/* Withdrawal Payouts Grid (User Screenshot 1) */
.withdrawal-card {
  border-color: rgba(0, 242, 254, 0.2);
}

.withdrawal-header {
  margin-bottom: 14px;
}

.withdrawal-huge-val {
  font-size: 32px;
  font-weight: 800;
  color: #10b981;
  margin-top: 4px;
}

.payout-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payout-stat-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payout-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.payout-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.min-withdraw-caption {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* SUPPORT TAB (User Screenshot 2 & 3) */
.support-top-actions {
  margin-bottom: 14px;
}

.plus-icon {
  font-size: 18px;
  line-height: 1;
}

.contact-help-card {
  padding: 14px 16px;
}

.contact-flex {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-icon-bubble {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
}

.contact-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.contact-handle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Empty tickets (Screenshot 3 Parity) */
.empty-tickets-view {
  padding: 36px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-tickets-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-tickets-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-tickets-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 220px;
}

.ticket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ticket-item:active {
  transform: scale(0.98);
}

.ticket-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticket-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.ticket-date {
  font-size: 11px;
  color: var(--text-muted);
}

.ticket-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}

.ticket-open {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
}

.ticket-closed {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(7, 10, 17, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-item.active {
  color: var(--accent-cyan);
}

.nav-item.active .nav-icon-wrap {
  transform: translateY(-2px);
  color: var(--accent-cyan);
}

.nav-icon-wrap {
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-backdrop.hidden {
  display: none;
  opacity: 0;
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  background: #0f1626;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 16px 20px calc(24px + var(--safe-bottom)) 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-sheet-center {
  margin: auto;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 90%;
  max-width: 380px;
  padding: 20px;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-drag-handle {
  width: 38px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  margin: 0 auto 14px auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.alert-info-box {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--accent-cyan);
}

.alert-message {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  margin-top: 8px;
}

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

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

.hidden {
  display: none !important;
}

/* QR Box */
.qr-box {
  width: 220px;
  height: 220px;
  margin: 10px auto;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Toast */
.toast {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 24, 40, 0.95);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.empty-state-mini {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Brand Logo Image ===== */
.brand-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

/* ===== Sidebar Backdrop ===== */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Sidebar Drawer ===== */
.sidebar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: rgba(10, 14, 24, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(0, 242, 254, 0.12);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.sidebar-drawer.active {
  transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 16px;
}

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

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-username {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-handle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-close-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.12);
}

/* Sidebar Divider */
.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.15), transparent);
  margin: 0 18px;
}

/* Sidebar Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.sidebar-nav-item:hover,
.sidebar-nav-item:active {
  background: rgba(0, 242, 254, 0.06);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(79, 172, 254, 0.08));
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.sidebar-nav-item.active svg {
  color: var(--accent-cyan);
}

.sidebar-nav-secondary {
  padding-top: 4px;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding: 16px 18px 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.7;
}

.sidebar-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  opacity: 0.6;
}

/* ==========================================================================
   TARIFF PLANS & PERIODS STYLES
   ========================================================================== */
.tariffs-card {
  margin-top: 14px;
}

/* Tariff Tier Tabs */
.tariff-tabs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.tariff-tab-btn {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  position: relative;
  user-select: none;
}

.tariff-tab-btn:hover {
  border-color: rgba(0, 242, 254, 0.3);
  background: rgba(0, 242, 254, 0.05);
}

.tariff-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(121, 40, 202, 0.12));
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.15);
}

.tariff-tab-name {
  font-size: 13px;
  font-weight: 700;
}

.tariff-tab-tag {
  font-size: 10px;
  color: var(--text-muted);
}

.tariff-tab-btn.active .tariff-tab-tag {
  color: var(--accent-cyan);
}

/* Tariff Feature Banner */
.tariff-feature-banner {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.tariff-feature-specs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.tariff-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

.tariff-feature-pill.pill-devices {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
}

.tariff-feature-pill.pill-whitelist {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.tariff-feature-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.tariff-periods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.tariff-period-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.tariff-period-card:hover {
  background: rgba(0, 242, 254, 0.04);
  border-color: rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

.tariff-period-card.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(121, 40, 202, 0.08));
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.15);
}

.tariff-period-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  background: linear-gradient(135deg, var(--accent-cyan), #4facfe);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.tariff-period-badge.badge-hot {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

.tariff-period-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.tariff-period-card.active .tariff-period-name {
  color: var(--accent-cyan);
}

.tariff-period-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.tariff-period-monthly {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Modal Scrollable & Guides */
.modal-sheet-scrollable {
  max-height: 85vh;
  overflow-y: auto;
}

.modal-desc-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.info-guide-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}

.guide-item-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
}

.guide-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.guide-os-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.guide-app-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
}

.guide-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-item-desc b {
  color: var(--text-primary);
}

.faq-accordion-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.faq-q {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.faq-a {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   DESKTOP BROWSER RESPONSIVENESS (for cabinet.sabergate.com)
   ========================================================================== */

/* Hide desktop nav on mobile phones by default */
.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background-image: 
      radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.12) 0%, transparent 45%),
      radial-gradient(circle at 85% 85%, rgba(121, 40, 202, 0.14) 0%, transparent 45%),
      radial-gradient(circle at 50% 50%, rgba(7, 10, 17, 0.98) 0%, #070a11 100%);
  }

  .app-container {
    max-width: 1060px;
    width: 100%;
    height: 92vh;
    max-height: 960px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
      0 24px 80px rgba(0, 0, 0, 0.8),
      0 0 50px rgba(0, 242, 254, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  .app-header {
    padding: 18px 32px;
  }

  .brand-logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .brand-title {
    font-size: 19px;
  }

  /* Desktop Header Nav */
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 8px;
    border-radius: 999px;
    backdrop-filter: blur(16px);
  }

  .desktop-nav-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .desktop-nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
  }

  .desktop-nav-item.active {
    color: #070a11;
    background: var(--gradient-primary);
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.45);
  }

  /* Hide bottom bar on desktop screens since top nav is active */
  .bottom-nav {
    display: none !important;
  }

  .content-scroll {
    padding: 28px 36px 40px 36px;
  }

  /* Custom Desktop Scrollbar */
  .content-scroll::-webkit-scrollbar {
    width: 6px;
  }
  .content-scroll::-webkit-scrollbar-track {
    background: transparent;
  }
  .content-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.25);
    border-radius: 10px;
  }
  .content-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 254, 0.55);
  }

  /* Tariff Periods Grid: 3 columns on desktop */
  .tariff-periods-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }

  /* Instructions and Device Cards in wide grids */
  .instructions-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .devices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .faq-accordion {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (min-width: 1200px) {
  .app-container {
    max-width: 1160px;
  }
}


