/**
 * SARASTUDIO.APP — Executive Luxury Dark UI & RTL Stylesheet (public/styles.css)
 */

:root {
  --bg-deep: #070913;
  --bg-panel: #0f1324;
  --bg-card: rgba(20, 26, 48, 0.86);
  --bg-card-hover: rgba(28, 36, 66, 0.95);
  --border-subtle: rgba(139, 92, 246, 0.24);
  --border-gold: rgba(245, 158, 11, 0.45);
  --primary: #8b5cf6;
  --primary-glow: #a78bfa;
  --accent-pink: #ec4899;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-glow: 0 12px 35px -8px rgba(139, 92, 246, 0.28);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(circle at 15% 10%, #1a103c 0%, var(--bg-deep) 55%),
              radial-gradient(circle at 85% 85%, #111c38 0%, var(--bg-deep) 60%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Automatic RTL Support for Arabic (ar) */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
  font-family: 'Tahoma', 'Segoe UI', 'Inter', sans-serif;
}

html[dir="rtl"] .topbar-actions,
html[dir="rtl"] .brand-wrap,
html[dir="rtl"] .flex-row {
  flex-direction: row-reverse;
}

/* Top Executive Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 28px;
  background: rgba(7, 9, 19, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.sara-orb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--primary), var(--accent-pink), var(--accent-cyan), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 0 22px rgba(236, 72, 153, 0.55);
  animation: pulseOrb 3s infinite ease-in-out;
  cursor: pointer;
}

.sara-orb.speaking {
  animation: speakingWave 0.65s infinite alternate ease-in-out;
  box-shadow: 0 0 34px rgba(16, 185, 129, 0.9);
}

@keyframes pulseOrb {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes speakingWave {
  0% { transform: scale(0.96); box-shadow: 0 0 15px var(--accent-pink); }
  100% { transform: scale(1.15); box-shadow: 0 0 38px var(--accent-cyan); }
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #c4b5fd, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(139, 92, 246, 0.14);
  color: #e2e8f0;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--border-gold);
  color: #fde68a;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

/* Inputs, Selects & Buttons */
select, input, textarea {
  background: rgba(11, 15, 29, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}

.lang-select {
  width: auto;
  min-width: 150px;
  font-weight: 600;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-pink {
  background: linear-gradient(135deg, var(--accent-pink), #be185d);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #090d16;
  font-weight: 700;
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-main);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.18);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* Main Container */
.container {
  max-width: 1420px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px;
  background: rgba(15, 19, 36, 0.85);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  padding: 10px 16px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(236, 72, 153, 0.25));
  color: #fff;
  border: 1px solid rgba(167, 139, 250, 0.45);
}

/* Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
}

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

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

.card-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  margin: 6px 0;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Pricing Cards (Paywall) */
.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.22s, border-color 0.22s;
}

.plan-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-pink);
}

.plan-price {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  margin: 10px 0 4px;
}

.plan-features {
  list-style: none;
  margin: 14px 0 20px;
  font-size: 0.84rem;
  color: #cbd5e1;
}

.plan-features li {
  padding: 5px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.14);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th, td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

html[dir="rtl"] th,
html[dir="rtl"] td {
  text-align: right;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
}

/* Progress Bars for Contabo Servers */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 5px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--primary));
  border-radius: 999px;
}

/* Form Groups */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.consent-box {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0;
}

.consent-box input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
}

/* Toast Notification */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}

.toast {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.96);
  border-left: 4px solid var(--accent-emerald);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.86rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .topbar {
    padding: 12px 16px;
  }
  .container {
    padding: 16px;
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

