/* ===== Variables ===== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* ===== واجهة العميل - ثيم فاتح ===== */
body.client-theme {
  --bg: #ffffff;
  --bg-card: #f8fafc;
  --bg-hover: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  background: #ffffff;
  color: #0f172a;
}

body.client-theme .navbar {
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
}

body.client-theme .logo {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.client-theme .hero h1 {
  background: linear-gradient(135deg, #0f172a, var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.client-theme .page-header {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

body.client-theme .nav-extra {
  background: rgba(99, 102, 241, 0.08);
}

body.client-theme .nav-btn.active {
  background: rgba(99, 102, 241, 0.12);
}

body.client-theme .lang-btn {
  background: #f1f5f9;
  color: #0f172a;
}

body.client-theme .lang-btn:hover {
  color: #ffffff;
}

body.client-theme .form-control {
  background: #ffffff;
}

body.client-theme th {
  background: #f8fafc;
}

body.client-theme tr:hover td {
  background: #f1f5f9;
}

body.client-theme .agent-card,
body.client-theme .agent-card-pro,
body.client-theme .service-card,
body.client-theme .quick-card,
body.client-theme .card {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

body.client-theme .agent-card:hover,
body.client-theme .agent-card-pro:hover,
body.client-theme .service-card:hover,
body.client-theme .quick-card:hover {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

body.client-theme .modal {
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
}

body.client-theme a {
  color: var(--primary-dark);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Navbar ===== */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-inner {
  flex-wrap: wrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.nav-btn {
  padding: 8px 18px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
  text-decoration: none;
}

.nav-btn.active {
  color: var(--primary-light);
  background: rgba(99,102,241,0.15);
  border-color: var(--primary);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-extras {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-extra {
  background: rgba(99,102,241,0.1);
  border-color: var(--primary) !important;
  font-size: 0.85rem !important;
  padding: 6px 14px !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-btn {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  min-width: 80px;
}

.lang-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.card-subtitle {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--primary-light);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; align-items: center; gap: 12px; }

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.balance-badge {
  background: linear-gradient(135deg, var(--success), #059669);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.4); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary-light);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ===== Sections ===== */
.section { padding: 40px 0; }
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

/* ===== Agents ===== */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.agent-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.agent-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 12px;
}

.agent-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }

.agent-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.agent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.agent-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  letter-spacing: 0.01em;
}

.agent-link-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.agent-link-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.agent-link-text {
  line-height: 1;
  white-space: nowrap;
}

.agent-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  filter: brightness(1.03);
  text-decoration: none;
  color: #ffffff;
}

.agent-link-btn:active {
  transform: translateY(0);
}

.agent-link-phone { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.agent-link-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.agent-link-telegram { background: linear-gradient(135deg, #2aabee, #229ed9); }
.agent-link-web { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.search-box {
  margin-bottom: 16px;
  position: relative;
}

.search-box .form-control {
  padding-right: 16px;
  padding-left: 120px;
}

.search-count {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.input-with-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-with-preview .form-control {
  flex: 1;
}

.link-preview {
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-preview a,
.admin-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  text-decoration: none;
  transition: transform 0.2s;
}

.link-preview a:hover,
.admin-link-icon:hover {
  transform: scale(1.1);
}

.preview-phone { background: #3b82f6; }
.preview-whatsapp { background: #25d366; }
.preview-telegram { background: #0088cc; }
.preview-web { background: #8b5cf6; }

.admin-contact-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.service-card-clickable {
  cursor: pointer;
  user-select: none;
}

.service-card-clickable:hover {
  border-color: #ff6900;
  box-shadow: 0 8px 24px rgba(255, 105, 0, 0.12);
}

.service-card-clickable:focus {
  outline: 2px solid #ff6900;
  outline-offset: 2px;
}

.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.service-view-hint {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff6900;
}

body.client-theme .service-view-hint {
  color: #ff6900;
}

.service-detail-page {
  padding-top: 24px;
  padding-bottom: 60px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: #ff6900;
  text-decoration: none;
}

.service-detail-full {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 40px 48px;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.08);
  max-width: 900px;
  margin: 0 auto;
}

.service-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 28px;
}

.service-detail-name {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  flex: 1;
}

.service-detail-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: #10b981;
  white-space: nowrap;
}

.service-detail-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
}

.service-detail-desc-full {
  padding: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #334155;
  font-size: 1rem;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 120px;
}

.service-detail-actions {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 2px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .service-detail-full {
    padding: 24px 20px;
  }

  .service-detail-name {
    font-size: 1.5rem;
  }

  .service-detail-price {
    font-size: 1.75rem;
  }

  .service-detail-actions .btn {
    width: 100%;
  }
}

.service-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  flex: 1;
}

.service-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; flex: 1; }

.service-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0;
}

.service-category {
  display: inline-block;
  background: var(--bg-hover);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

tr:hover td { background: var(--bg-hover); }

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-success { background: rgba(16,185,129,0.2); color: var(--success); }
.badge-danger { background: rgba(239,68,68,0.2); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.2); color: var(--warning); }
.badge-info { background: rgba(99,102,241,0.2); color: var(--primary-light); }

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 500;
  animation: slideDown 0.3s ease;
  min-width: 280px;
  text-align: center;
}

.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 24px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

/* ===== Page Header ===== */
.page-header {
  text-align: center;
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== Quick Cards (home) ===== */
.quick-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s;
}

.quick-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  text-decoration: none;
}

.quick-icon { font-size: 2.5rem; margin-bottom: 12px; }
.quick-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.quick-card p { color: var(--text-muted); font-size: 0.95rem; }

.modal-footer-link {
  text-align: center;
  margin-top: 16px;
  color: var(--text-muted);
}

.purchase-price {
  text-align: center;
  color: var(--success);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ===== Tabs (client) ===== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab {
  padding: 12px 24px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
}

.tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== Admin Layout ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 24px 24px;
  font-size: 1.3rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-nav { list-style: none; }

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-muted);
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: var(--bg-hover);
  color: var(--text);
  border-right: 3px solid var(--primary);
}

.admin-main {
  margin-right: 260px;
  flex: 1;
  padding: 32px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.admin-header h1 { font-size: 1.75rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-light);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.actions-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.agent-image-preview {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 160px;
}

.agent-image-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

.account-profile-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px;
}

.account-profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.account-profile-row:last-of-type {
  border-bottom: none;
}

.account-profile-label {
  color: var(--text-muted);
  font-weight: 600;
}

.account-profile-value {
  font-weight: 600;
  color: var(--text);
  text-align: end;
}

.account-profile-actions {
  margin-top: 24px;
  padding-top: 8px;
}

/* ===== Floating Telegram FAB ===== */
.fab-telegram {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.fab-tg-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2aabee 0%, #229ed9 100%);
  border: none;
  box-shadow: 0 6px 24px rgba(34, 158, 217, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fab-tg-btn svg {
  width: 28px;
  height: 28px;
}

.fab-tg-btn:hover,
.fab-tg-btn.active {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(34, 158, 217, 0.55);
}

.fab-tg-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  animation: fabSlideUp 0.28s ease;
}

.fab-tg-menu.hidden {
  display: none;
}

.fab-tg-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  max-width: 300px;
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
  text-decoration: none;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fab-tg-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  border-color: #93c5fd;
  text-decoration: none;
  color: #1e293b;
}

.fab-tg-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fab-tg-item-icon svg {
  width: 20px;
  height: 20px;
}

.fab-tg-item-icon-channel {
  background: rgba(42, 171, 238, 0.12);
  color: #229ed9;
}

.fab-tg-item-icon-support {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.fab-tg-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.fab-tg-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
}

.fab-tg-item-hint {
  font-size: 0.78rem;
  color: #64748b;
}

.fab-tg-notif-dot {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.fab-tg-notif-dot-support {
  background: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

@keyframes fabSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .fab-telegram {
    bottom: 16px;
    right: 16px;
  }

  .fab-tg-item {
    min-width: 210px;
    max-width: calc(100vw - 32px);
  }

  .nav-extras {
    order: 2;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-menu {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .navbar-inner { justify-content: space-between; }

  .sidebar {
    width: 100%;
    position: relative;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }

  .admin-main { margin-right: 0; padding: 16px; }
  .admin-layout { flex-direction: column; }

  .hero h1 { font-size: 1.75rem; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { flex-wrap: wrap; }
}

.hidden { display: none !important; }
