:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-input: #1f2937;
  --bg-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --bg-accent-subtle: rgba(99, 102, 241, 0.12);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #38bdf8;
  --info-bg: rgba(56, 189, 248, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(217, 70, 239, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Glassmorphism utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Header */
.app-header {
  height: 72px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-glow);
  animation: pulse-glow 3s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 25px rgba(217, 70, 239, 0.6); transform: scale(1.03); }
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 30%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-accent-subtle);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-weight: 600;
}

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

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: rgba(17, 24, 39, 0.6);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.status-indicator.active {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* Main Layout */
.app-container {
  display: flex;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  gap: 2rem;
}

/* Sidebar Nav */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  transform: translateX(3px);
}

.nav-item.active {
  background: var(--bg-accent-subtle);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.35);
  font-weight: 600;
}

.nav-item .icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: white;
  font-weight: 700;
  display: none;
}

.nav-badge.show {
  display: inline-block;
}

/* Main Content Area */
.content-area {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.tab-pane {
  display: none;
  width: 100%;
  max-width: 100%;
  animation: fadeIn 0.3s ease-in-out;
}

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

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

/* Typography & Section headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Metric Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}

.metric-info h4 {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.metric-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.metric-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  font-family: inherit;
  outline: none;
}

.btn-primary {
  background: var(--bg-accent);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover {
  filter: brightness(1.1);
}

.btn-danger {
  background: var(--danger-bg);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: var(--danger);
  color: white;
}

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

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Two columns overview */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Telegram Bubble Simulator */
.telegram-sim-box {
  background: #0e1621;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.telegram-bubble {
  background: #182533;
  border-radius: 14px 14px 14px 2px;
  padding: 14px 18px;
  max-width: 90%;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  align-self: flex-start;
  color: #f5f5f5;
  font-size: 0.94rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.telegram-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.72rem;
  color: #6c7883;
}

.telegram-sender {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64b5f6;
  margin-bottom: 4px;
}

/* Table styles */
.table-card {
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.table-toolbar {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}

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

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
  min-height: 360px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) rgba(17, 24, 39, 0.8);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.table-responsive::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(17, 24, 39, 0.8);
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  min-width: 840px;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #111827;
  box-shadow: 0 1px 0 var(--border-color);
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 0.86rem;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Sticky Action Column on scroll */
th:last-child, td:last-child {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #111827;
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.3);
}

th:last-child {
  z-index: 6;
}

tr:hover td:last-child {
  background: #172033;
}

/* Table Pagination */
.table-pagination {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border-color);
  background: rgba(17, 24, 39, 0.95);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 32px;
  text-align: center;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
  color: #fff;
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.pagination-size select {
  padding: 4px 8px;
  font-size: 0.82rem;
  width: auto;
  border-radius: var(--radius-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-primary { background: var(--bg-accent-subtle); color: #a5b4fc; }
.badge-success { background: var(--success-bg); color: #6ee7b7; }
.badge-warning { background: var(--warning-bg); color: #fcd34d; }
.badge-danger { background: var(--danger-bg); color: #fca5a5; }
.badge-info { background: var(--info-bg); color: #7dd3fc; }

/* Filter Tabs / Pills */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-pill {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--bg-accent);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* Template Cards Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.template-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: var(--transition);
}

.template-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.template-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.template-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.template-body {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow-y: auto;
  font-family: inherit;
}

.template-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* Moderation Queue Card */
.queue-card {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--warning);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-card.approved {
  border-left-color: var(--success);
}

.queue-card.rejected {
  border-left-color: var(--danger);
  opacity: 0.7;
}

.queue-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
}

.queue-textarea:focus {
  border-color: var(--primary);
  outline: none;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: white;
}

/* Form inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

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

.placeholder-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.placeholder-tag {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: monospace;
  cursor: pointer;
  transition: var(--transition);
}

.placeholder-tag:hover {
  background: var(--primary);
  color: white;
}

/* Toggle Switch */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #374151;
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: white;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.toast-success { border-color: var(--success); }
.toast.toast-error { border-color: var(--danger); }

/* Comprehensive Responsive Adjustments */
@media (max-width: 1024px) {
  .app-container {
    padding: 1rem 1.25rem;
    gap: 1.25rem;
  }
  .sidebar {
    width: 220px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .app-header {
    height: auto;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .app-container {
    flex-direction: column;
    padding: 0.75rem;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-item {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .modal-content {
    padding: 1.25rem;
    max-width: 95vw;
    border-radius: var(--radius-md);
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrap {
    max-width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Prevent iOS zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 1.05rem;
  }
  .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .btn {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
  .templates-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== ANNOUNCEMENTS STYLES ==================== */
.announcements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.announcement-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 4px solid var(--primary);
  position: relative;
  transition: var(--transition);
}

.announcement-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #818cf8;
}

.announcement-card.sent {
  border-left-color: var(--success);
}

.announcement-card.scheduled {
  border-left-color: var(--info);
}

.announcement-card.draft {
  border-left-color: var(--text-dim);
}

/* ==================== TELEGRAM MESSAGE BUBBLE PREVIEW ==================== */
.telegram-bubble {
  background: #18222d;
  border-radius: 14px 14px 14px 4px;
  padding: 14px 18px;
  color: #e4ecf2;
  font-size: 0.92rem;
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  word-break: break-word;
}

.telegram-bubble b {
  color: #ffffff;
}

.telegram-bubble a {
  color: #64b5f6;
  text-decoration: underline;
}

.telegram-bubble .bubble-time {
  font-size: 0.72rem;
  color: #708499;
  text-align: right;
  margin-top: 6px;
}

/* ==================== TELEGRAM POLL PREVIEW ==================== */
.telegram-poll-box {
  background: #1e293b;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poll-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.poll-option-row:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.poll-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #818cf8;
  flex-shrink: 0;
}

/* ==================== KUDOS PODIUM ==================== */
.kudos-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 2.5rem 0;
  padding: 1rem 0;
}

.podium-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 140px;
  padding: 1.25rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.podium-step:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.podium-step.first {
  order: 2;
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.12) 0%, rgba(17, 24, 39, 0.8) 100%);
  min-height: 230px;
}

.podium-step.second {
  order: 1;
  border-color: rgba(148, 163, 184, 0.4);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.1) 0%, rgba(17, 24, 39, 0.8) 100%);
  min-height: 195px;
}

.podium-step.third {
  order: 3;
  border-color: rgba(217, 119, 6, 0.4);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.1) 0%, rgba(17, 24, 39, 0.8) 100%);
  min-height: 175px;
}

.podium-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.podium-step.first .podium-avatar {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #111827;
  border: 3px solid #fef08a;
}

.podium-step.second .podium-avatar {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: #111827;
  border: 3px solid #e2e8f0;
}

.podium-step.third .podium-avatar {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
  color: #fff;
  border: 3px solid #fed7aa;
}

/* ==================== RANDOM COFFEE PAIRS ==================== */
.coffee-pairs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.coffee-pair-card {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.coffee-pair-card:hover {
  border-color: #818cf8;
  transform: translateY(-2px);
}

.coffee-separator {
  font-size: 1.3rem;
  color: #fbbf24;
  padding: 0 4px;
  animation: pulse-glow 2s infinite ease-in-out;
}

/* ==================== FRIDAY FEATURES DUAL LAYOUT ==================== */
.friday-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .friday-dual-grid {
    grid-template-columns: 1fr;
  }
  .announcements-grid {
    grid-template-columns: 1fr;
  }
  .kudos-podium {
    flex-direction: column;
    align-items: stretch;
  }
  .podium-step.first,
  .podium-step.second,
  .podium-step.third {
    order: unset;
    min-height: auto;
  }
}

/* ==================== BANK LINK PRESETS & TOOLS ==================== */
.bank-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.bank-preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bank-preset-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: #818cf8;
  color: #c7d2fe;
}

/* ==================== ACTIVITIES SUB-NAV ==================== */
.activity-subnav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.subnav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.subnav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.subnav-btn.active {
  color: #fff;
  background: var(--bg-accent-subtle);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ==================== KUDOS FEED ==================== */
.thanks-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thanks-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.thanks-feed-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

/* ==================== POLL OPTIONS EDITOR ==================== */
.poll-option-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.poll-option-input-row .form-control {
  flex: 1;
}

/* ==================== TELEGRAM SECRET MESSAGE SIMULATOR ==================== */
.sim-secret-box {
  background: #141c26;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  color: #e0f2fe;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.sim-secret-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}



