/* ============================================================
   WebDost App — 3D Glassmorphism Design System & Dashboard
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --body: #050510;
  --surface: rgba(255, 255, 255, 0.03);
  --text: #f0f0f5;
  --text-muted: #9a9ab0;
  --text-dim: #6b6b80;
  --theme: #3b82f6;
  --theme-bright: #60a5fa;
  --theme-dark: #1d4ed8;
  --accent: #a855f7;
  --accent-bright: #c084fc;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
  --gradient-primary: linear-gradient(135deg, var(--theme), var(--accent));
  --gradient-accent: linear-gradient(135deg, var(--accent), var(--pink));
  --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 16px 48px rgba(59, 130, 246, 0.2);
  --shadow-glow: 0 0 50px rgba(59, 130, 246, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --body: #f1f5f9;
  --surface: rgba(0, 0, 0, 0.02);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(203, 213, 225, 0.8);
  --glass-hover: rgba(255, 255, 255, 0.95);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 14px 36px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .hero-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(235, 242, 255, 0.9));
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .hero-heading {
  background: linear-gradient(135deg, #0f172a 30%, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .content-section {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.7);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .empty-state-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.9));
  border: 1px solid rgba(203, 213, 225, 0.8);
}

[data-theme="light"] .empty-title {
  color: #0f172a;
}

[data-theme="light"] .feature-chip {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .space-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .space-card-id {
  color: #0f172a;
}

[data-theme="light"] .space-card-stats {
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

[data-theme="light"] .stat-val {
  color: #0f172a;
}

[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mobile-drawer {
  background: #ffffff;
  border-left: 1px solid rgba(203, 213, 225, 0.8);
}

[data-theme="light"] .spaces-table th {
  background: rgba(241, 245, 249, 0.9);
  color: #475569;
}

[data-theme="light"] .spaces-table td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  color: #0f172a;
}

[data-theme="light"] .input-addon-wrapper {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
}

[data-theme="light"] .domain-addon {
  background: rgba(241, 245, 249, 0.9);
  border-left: 1px solid rgba(203, 213, 225, 0.8);
}

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

::selection {
  color: #ffffff;
  background: rgba(168, 85, 247, 0.4);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--theme) transparent;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: var(--body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

a {
  text-decoration: none;
  color: var(--theme-bright);
  transition: color var(--transition);
}

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

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

p {
  color: var(--text-muted);
}

/* ---------- Ambient Floating Background Orbs ---------- */
.design {
  background-image:
    radial-gradient(rgba(100, 120, 255, 0.12) 0.5px, transparent 0.5px),
    radial-gradient(rgba(100, 120, 255, 0.08) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  z-index: -99;
  opacity: 0.5;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
}

.bg {
  border-radius: 50%;
  width: 300px;
  height: 300px;
  position: fixed;
  filter: blur(90px);
  z-index: -98;
  opacity: 0.45;
  pointer-events: none;
}

.bg1 {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
  top: 5vh;
  left: 10vw;
  animation: float1 10s ease-in-out infinite;
}

.bg2 {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
  top: 40vh;
  right: 10vw;
  animation: float2 12s ease-in-out infinite;
}

.bg3 {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
  bottom: 10vh;
  left: 35vw;
  animation: float3 14s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.1); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 20px) scale(0.95); }
}

/* ---------- App Layout Container ---------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---------- Navigation Bar ---------- */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.nav-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  box-sizing: border-box;
}

.nav-logo .logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.nav-item .nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.nav-item .nav-link i {
  font-size: 0.95rem;
}

.nav-item .nav-link:hover {
  color: var(--text);
  background: var(--glass-hover);
  border-color: var(--glass-border);
}

.nav-item .nav-link.active {
  color: #ffffff;
  background: var(--gradient-primary);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  border-color: transparent;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: var(--glass-blur);
  transition: all var(--transition);
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--glass-hover);
  border-color: rgba(59, 130, 246, 0.4);
  transform: rotate(15deg) scale(1.05);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* Profile Dropdown */
.profile-dropdown {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 6px 14px 6px 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: var(--glass-blur);
  transition: all var(--transition);
}

.profile-btn i.fa-user-circle {
  font-size: 1.6rem;
  color: var(--theme-bright);
}

.profile-btn:hover {
  background: var(--glass-hover);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.nav-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.nav-user-details {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}

.nav-user-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-email {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  min-width: 260px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1100;
  animation: fadeInUp 0.2s ease forwards;
}

[data-theme="dark"] .dropdown-menu {
  background: rgba(15, 17, 32, 0.95);
}

[data-theme="light"] .dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.dropdown-item i {
  color: var(--theme-bright);
  font-size: 1rem;
}

.dropdown-item:hover {
  background: var(--glass-hover);
  color: var(--theme-bright) !important;
  transform: translateX(4px);
}

.dropdown-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 0;
}

.mobile-toggle {
  display: none;
  position: relative;
  width: 38px;
  height: 38px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  overflow: hidden;
}

.mobile-toggle:hover {
  background: var(--glass-hover);
  border-color: rgba(59, 130, 246, 0.4);
}

.mobile-toggle span {
  position: absolute;
  left: 9px;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: 50% 50%;
}

.mobile-toggle span:nth-child(1) {
  top: 12px;
}

.mobile-toggle span:nth-child(2) {
  top: 18px;
}

.mobile-toggle span:nth-child(3) {
  top: 24px;
}

.mobile-toggle.active span:nth-child(1) {
  top: 18px;
  transform: rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active span:nth-child(3) {
  top: 18px;
  transform: rotate(-45deg);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  padding: 16px 0;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
  font-size: 0.88rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  color: var(--text-dim);
  margin-left: 4px;
}

.breadcrumb-item.active {
  color: var(--theme-bright);
  font-weight: 600;
}

.breadcrumb-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.breadcrumb-link:hover {
  color: var(--text);
}

/* ---------- Main Content Area ---------- */
.main-content {
  flex: 1;
  padding: 10px 0 60px;
}

/* ---------- Welcome Hero Banner ---------- */
.hero-section {
  margin-bottom: 32px;
}

.hero-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ---------- Section Container & Headers ---------- */
.content-section {
  margin-bottom: 36px;
}

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

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  outline: none;
}

.btn-primary, .create-space-btn {
  background: var(--gradient-primary);
  color: #ffffff !important;
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover, .create-space-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(59, 130, 246, 0.45);
  filter: brightness(1.1);
}

.btn-secondary, .show-deleted-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover, .show-deleted-btn:hover {
  background: var(--glass-hover);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--theme-bright);
}

.btn-manage {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--text) !important;
  padding: 8px 18px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.btn-manage:hover:not(:disabled) {
  background: var(--gradient-primary);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.btn-manage:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--glass-border);
}

.btn-outline-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171 !important;
  backdrop-filter: var(--glass-blur);
  transition: all var(--transition);
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 1px solid #ef4444;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  transform: translateY(-2px);
}

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

.btn-xs {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
}

[data-theme="light"] .btn-outline-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
  color: #dc2626 !important;
}

[data-theme="light"] .btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #991b1b !important;
}

/* ---------- Hosting Spaces Table ---------- */
.spaces-table-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.spaces-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.spaces-table th {
  padding: 16px 24px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.15);
}

.spaces-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
}

.spaces-table tbody tr {
  transition: background var(--transition);
}

.spaces-table tbody tr:last-child td {
  border-bottom: none;
}

.spaces-table tbody tr:hover {
  background: var(--glass-hover);
}

.space-id-cell .space-id-link {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--theme-bright);
}

.space-id-cell .space-id-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.space-domain {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.status-suspended {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-deleted {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.empty-message {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
  font-style: italic;
}

.spaces-summary {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.deleted-spaces-info {
  margin-top: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.deleted-spaces-info p:not(:last-child) {
  margin-bottom: 8px;
}

/* ---------- Space Details Header & Dashboard ---------- */
.space-header {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.space-info .space-domain {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.space-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.space-id {
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
}

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

/* ---------- Usage Statistics Section ---------- */
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.usage-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.usage-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-hover);
}

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

.usage-header h3 {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.usage-header i {
  font-size: 1.3rem;
  color: var(--theme-bright);
}

.usage-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}

.usage-limit {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 14px;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  transition: width 0.8s ease;
}

/* ---------- Quick Actions Grid ---------- */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.action-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.action-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 36px rgba(168, 85, 247, 0.2);
  background: var(--glass-hover);
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-glow);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.3rem;
  color: var(--theme-bright);
  transition: all var(--transition);
}

.action-card:hover .action-icon {
  transform: scale(1.1);
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.4);
}

.action-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.action-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Info Grids & Details ---------- */
.info-section {
  margin-bottom: 32px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: var(--glass-blur);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.info-item span {
  font-size: 0.98rem;
  color: var(--text);
  font-weight: 500;
}

.info-item span.code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
  width: fit-content;
}

.nameservers-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.nameserver-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: monospace;
  font-size: 0.95rem;
}

.nameserver-item i {
  color: var(--theme-bright);
}

/* ---------- Form Controls & Cards ---------- */
.form-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  max-width: 650px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.98rem;
  outline: none;
  transition: all var(--transition);
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--theme-bright);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

/* Messages */
.message {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

/* ---------- Modal Overlay & Content ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--body);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-card);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

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

.modal-header h2 {
  font-size: 1.4rem;
}

.modal-close {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  padding: 24px 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-right strong {
  color: var(--theme-bright);
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 900px) {
  .nav-menu {
    display: none !important;
  }

  .mobile-toggle {
    display: flex !important;
  }

  .hero-content {
    padding: 22px 20px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

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

  .spaces-table th:nth-child(2),
  .spaces-table td:nth-child(2) {
    display: table-cell;
  }

  .footer-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding-bottom: 70px;
  }
}

/* ============================================================
   NEW 3D GLASSMORPHISM DASHBOARD & MOBILE APP COMPONENTS
   ============================================================ */

/* --- Hero Card --- */
.hero-card {
  background: linear-gradient(135deg, rgba(30, 35, 65, 0.7), rgba(15, 18, 38, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(168, 85, 247, 0.15) 60%, transparent 80%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.hero-heading {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 40%, var(--theme-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-heading .emoji-native {
  display: inline-block;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  color: initial !important;
}

.hero-subtext {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.6;
}

.btn-glow {
  position: relative;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.5);
  transition: all var(--transition);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.7);
}

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

.stat-card {
  background: linear-gradient(135deg, rgba(25, 28, 55, 0.65), rgba(15, 17, 35, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 36px rgba(59, 130, 246, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

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

.icon-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); box-shadow: 0 0 15px rgba(59, 130, 246, 0.2); }
.icon-purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); box-shadow: 0 0 15px rgba(168, 85, 247, 0.2); }
.icon-pink { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.4); box-shadow: 0 0 15px rgba(236, 72, 153, 0.2); }
.icon-cyan { background: rgba(6, 182, 212, 0.2); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.4); box-shadow: 0 0 15px rgba(6, 182, 212, 0.2); }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.stat-limit {
  font-size: 0.95rem;
  color: var(--text-dim);
}

.stat-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.stat-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  transition: width 0.6s ease;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.stat-pill.success { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-pill.info { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

/* --- Section Grouping & Controls --- */
.content-section {
  background: linear-gradient(135deg, rgba(22, 25, 50, 0.6), rgba(14, 16, 32, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
}

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

.section-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-badge {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--theme-bright);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 14px;
}

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

.view-toggle-group {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 3px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.view-btn.active, .view-btn:hover {
  background: var(--theme);
  color: #ffffff;
}

/* --- Empty State Card --- */
.empty-state-card {
  background: linear-gradient(135deg, rgba(30, 35, 65, 0.5), rgba(18, 20, 40, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.empty-icon-glow {
  width: 84px;
  height: 84px;
  margin: 0 auto 24px auto;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 45px rgba(168, 85, 247, 0.3);
}

.empty-icon {
  font-size: 2.4rem;
  color: var(--theme-bright);
}

.empty-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffffff;
}

.empty-desc {
  font-size: 0.96rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

.empty-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.feature-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #f0f0f5;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.05rem;
}

/* --- Spaces Grid View --- */
.spaces-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.space-card {
  background: linear-gradient(135deg, rgba(28, 32, 60, 0.7), rgba(16, 18, 36, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: all var(--transition);
}

.space-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 14px 40px rgba(59, 130, 246, 0.25);
}

.space-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.space-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--theme-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.space-card-meta {
  flex: 1;
  min-width: 0;
}

.space-card-id {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.space-card-domain {
  font-size: 0.86rem;
  color: var(--theme-bright);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.space-card-stats {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-val {
  color: #ffffff;
  font-weight: 600;
}

.stat-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
}

.bar-fill.cyan {
  background: linear-gradient(135deg, var(--cyan), var(--theme));
}

.space-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.space-card-actions .btn {
  flex: 1;
  justify-content: center;
}

/* --- Input Addon Styling --- */
.input-addon-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.input-addon-wrapper input {
  border: none !important;
  background: transparent !important;
  flex: 1;
  border-radius: 0 !important;
}

.domain-addon {
  padding: 0 14px;
  font-weight: 600;
  color: var(--theme-bright);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border-left: 1px solid var(--glass-border);
  height: 100%;
  display: flex;
  align-items: center;
}

/* --- Mobile Bottom Navigation (Disabled) --- */
.mobile-bottom-nav {
  display: none !important;
}

/* --- Mobile Slide-out Drawer --- */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #0d0f22;
  border-left: 1px solid var(--glass-border);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  visibility: hidden;
  overflow-y: auto;
}

[data-theme="light"] .mobile-drawer {
  background: #ffffff;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 20px;
}

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

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.drawer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
}

.drawer-item:hover, .drawer-item.active {
  background: var(--glass-bg);
  color: var(--text);
}

.drawer-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 12px 0;
}

.text-danger {
  color: #ef4444 !important;
}

/* --- Mobile Breakpoints --- */
@media (max-width: 768px) {
  .view-toggle-group {
    display: none;
  }

  .hero-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .empty-state-card {
    padding: 32px 18px;
  }

  .main-content {
    padding-bottom: 80px;
  }

  .profile-layout {
    grid-template-columns: 1fr !important;
  }

  .profile-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   PROFILE UI/UX SYSTEM STYLES (INFINITYFREE REFERENCE MATCH)
   ============================================================ */

/* --- Navbar Profile Dropdown --- */
.profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 6px 14px 6px 8px;
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition);
}

.profile-btn:hover {
  background: var(--glass-hover);
  border-color: rgba(59, 130, 246, 0.4);
}

.nav-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbcfe8, #f472b6);
  color: #831843;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(244, 114, 182, 0.3);
}

.nav-user-details {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.nav-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-email {
  display: none !important;
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 2px;
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--glass-border);
}

.dropdown-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbcfe8, #f472b6);
  color: #831843;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.dropdown-user-info strong {
  font-size: 0.92rem;
  color: var(--text);
}

.dropdown-user-info span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* --- Profile Layout & Sidebar --- */
.profile-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.profile-sidebar {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.sidebar-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 16px 0;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-header {
  padding: 8px 20px 14px 20px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 8px;
}

.sidebar-header h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.sidebar-link i {
  width: 18px;
  font-size: 1rem;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.sidebar-link.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--theme-bright);
  font-weight: 600;
  border-left-color: var(--theme);
}

.sidebar-link.danger-link:hover, .sidebar-link.danger-link.active {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-left-color: #ef4444;
}

/* --- Profile Content & Cards Grid --- */
.profile-content {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.single-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.profile-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.profile-card .card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}

.profile-card .card-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.profile-card .card-body {
  padding: 24px;
  min-width: 0;
  box-sizing: border-box;
}

.text-center {
  text-align: center !important;
}

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

.text-left {
  text-align: left !important;
}

.card-body.text-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-large-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbcfe8, #f472b6);
  color: #831843;
  font-weight: 800;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 8px 24px rgba(244, 114, 182, 0.35);
  flex-shrink: 0;
}

.avatar-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.input-readonly {
  background: rgba(0, 0, 0, 0.25) !important;
  border-color: var(--glass-border) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Auth Summary Table --- */
.auth-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.auth-summary-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
}

.auth-summary-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

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

.badge.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.badge-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.7rem;
}

.badge-circle.badge-success {
  background: #10b981;
  color: #ffffff;
}

.badge-circle.badge-danger {
  background: #ef4444;
  color: #ffffff;
}

.card-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.input-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 6px;
  display: block;
}

/* --- Manage Auth Blocks --- */
.auth-section-block {
  padding: 16px 0;
}

.auth-section-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-section-block p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.auth-method-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.auth-method-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  flex: 1 1 160px;
}

.auth-method-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: normal;
}

.auth-method-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-method-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.badge-muted {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

.auth-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 16px 0;
}

/* --- Audit History Table --- */
.table-responsive {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}

.history-table td {
  padding: 14px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text);
}

.history-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-pill {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--theme);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* --- Warnings & Alert Boxes --- */
.warning-alert-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.warning-icon {
  font-size: 1.5rem;
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}

.warning-content strong {
  color: #f59e0b;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 4px;
}

.warning-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.danger-zone-box {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
  border-radius: var(--radius);
  padding: 24px;
}

.danger-zone-box h3 {
  color: #ef4444;
  margin-bottom: 8px;
}

/* --- Light Mode Profile Overrides --- */
[data-theme="light"] .profile-btn {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.8);
}

[data-theme="light"] .dropdown-header {
  background: #f8fafc;
}

[data-theme="light"] .sidebar-card,
[data-theme="light"] .profile-card {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .sidebar-link:hover {
  background: #f1f5f9;
}

[data-theme="light"] .sidebar-link.active {
  background: #e0e7ff;
  color: #4f46e5;
}

[data-theme="light"] .auth-method-row {
  background: #f8fafc;
  border-color: rgba(203, 213, 225, 0.8);
}

[data-theme="light"] .input-readonly {
  background: #f1f5f9 !important;
  color: #64748b !important;
}

[data-theme="light"] .history-table th {
  background: #f8fafc;
}

[data-theme="light"] .history-table td {
  border-bottom-color: #e2e8f0;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM FOR PHONE & TABLET
   ============================================================ */

/* --- TABLET BREAKPOINT (max-width: 992px) --- */
@media (max-width: 992px) {
  .container {
    padding: 0 18px;
  }

  .nav-menu {
    gap: 4px;
  }

  .nav-item .nav-link {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .nav-user-email {
    display: none !important;
  }

  .profile-btn .nav-user-details {
    display: none !important;
  }

  .profile-btn {
    padding: 4px 8px !important;
    gap: 6px !important;
    border-radius: 20px !important;
  }

  .nav-container {
    padding: 0 16px !important;
  }

  /* Profile Layout on Tablet: Stack sidebar on top as a clean horizontal tab bar */
  .profile-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .profile-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .sidebar-card {
    padding: 8px 10px !important;
    border-radius: var(--radius) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .sidebar-header {
    display: none !important;
  }

  .sidebar-menu {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    scrollbar-width: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-bottom: 2px !important;
  }

  .sidebar-menu::-webkit-scrollbar {
    display: none;
  }

  .sidebar-link {
    padding: 7px 12px !important;
    border-radius: var(--radius-sm) !important;
    border-left: none !important;
    border-bottom: 2px solid transparent !important;
    background: rgba(255, 255, 255, 0.04) !important;
    white-space: nowrap !important;
    font-size: 0.82rem !important;
    flex-shrink: 0 !important;
    gap: 6px !important;
  }

  .sidebar-link.active {
    background: rgba(99, 102, 241, 0.2) !important;
    border-bottom-color: var(--theme) !important;
    color: var(--theme-bright) !important;
  }

  [data-theme="light"] .sidebar-link {
    background: #f1f5f9;
  }

  [data-theme="light"] .sidebar-link.active {
    background: #e0e7ff;
    color: #4f46e5;
  }

  .profile-content {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .profile-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .spaces-grid-view {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
  }
}

/* --- MOBILE & SMALL TABLET BREAKPOINT (max-width: 820px) --- */
@media (max-width: 820px) {
  .container {
    padding: 0 14px;
  }

  .nav-container {
    padding: 0 14px;
    height: 64px;
  }

  .nav-logo img {
    height: 32px;
    width: auto;
  }

  /* Hide verbose name/email on mobile so navbar doesn't burst */
  .profile-btn .nav-user-details {
    display: none !important;
  }

  .profile-btn {
    padding: 4px 8px;
    gap: 6px;
    border-radius: 20px;
  }

  .profile-btn .dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 0;
  }

  .dropdown-menu {
    right: 0;
    max-width: calc(100vw - 20px);
    width: 250px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .hero-card {
    padding: 22px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
  }

  .hero-heading {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .hero-subtext {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .content-section {
    padding: 20px 16px;
    border-radius: var(--radius);
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
  }

  .section-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .create-space-btn {
    width: 100%;
    justify-content: center;
  }

  .spaces-grid-view {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
  }

  .space-card {
    padding: 18px 16px;
    border-radius: var(--radius-sm);
  }

  .space-card-id {
    font-size: 1.05rem;
    word-break: break-all;
  }

  .space-card-domain {
    font-size: 0.82rem;
    word-break: break-all;
  }

  .space-card-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .profile-card .card-header {
    padding: 14px 18px;
  }

  .profile-card .card-body {
    padding: 18px 16px;
  }

  /* Responsive table containers */
  .spaces-table-container,
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }

  .spaces-table {
    min-width: 580px;
  }

  .history-table {
    min-width: 500px;
  }

  .history-table th,
  .history-table td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  /* Modals */
  .modal-overlay {
    padding: 12px;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 22px 16px;
    border-radius: var(--radius);
    max-height: 92vh;
    overflow-y: auto;
  }

  .modal-header h2 {
    font-size: 1.15rem;
  }

  .main-content {
    padding-bottom: 24px !important;
  }
}

/* --- MOBILE PHONE BREAKPOINT (max-width: 640px) --- */
@media (max-width: 640px) {
  /* Auth Method Rows in Profile Security Tab - Keep horizontal, use icon-mode on buttons */
  .auth-method-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 12px 14px !important;
  }

  .auth-method-title {
    font-size: 0.88rem !important;
  }

  .auth-method-subtitle {
    font-size: 0.76rem !important;
    max-width: 140px !important;
  }

  .auth-method-right {
    gap: 6px !important;
  }

  .auth-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
  }

  .btn-icon-mobile .btn-text {
    display: none !important;
  }

  .btn-icon-mobile {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    min-width: 36px !important;
    flex-shrink: 0 !important;
  }

  .passkey-item-row {
    padding: 8px 12px !important;
  }
}

/* --- SMALL PHONES BREAKPOINT (max-width: 480px) --- */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .nav-container {
    padding: 0 10px;
    height: 58px;
  }

  .nav-logo img {
    height: 28px;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .hero-card {
    padding: 18px 14px;
  }

  .hero-heading {
    font-size: 1.25rem;
  }

  .welcome-badge {
    font-size: 0.72rem;
    padding: 3px 10px;
  }

  .profile-card .card-header {
    padding: 12px 14px;
  }

  .profile-card .card-body {
    padding: 16px 12px;
  }

  .avatar-large-circle {
    width: 76px;
    height: 76px;
    font-size: 1.8rem;
    margin: 0 auto 12px auto;
  }

  .auth-summary-table td {
    padding: 10px 0;
    font-size: 0.84rem;
  }

  .badge-text {
    display: none !important;
  }

  .badge {
    padding: 4px 6px !important;
    font-size: 0.78rem !important;
  }

  .auth-method-subtitle {
    max-width: 120px !important;
  }

  .sidebar-link {
    padding: 7px 12px;
    font-size: 0.8rem;
    gap: 8px;
  }

  .sidebar-link i {
    font-size: 0.9rem;
    width: 14px;
  }

  .breadcrumb-list {
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: 4px;
  }

  .warning-alert-box {
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px;
  }

  .danger-zone-box {
    padding: 18px 14px;
  }
}




