/* Tesseract Hosting — Panel theme (dark only) */
@import url('variables.css');

.theme-tesseract {
  --bs-body-bg: var(--bg-base);
  --bs-body-color: var(--text-primary);
  --primary-color: var(--brand-purple);
  --secondary-color: var(--accent-plasma);
}

.theme-tesseract,
.theme-tesseract body {
  background: var(--bg-base) !important;
  color: var(--text-primary);
  font-family: 'DM Sans', system-ui, sans-serif;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar — solid dark, no gradient */
.theme-tesseract .sidebar {
  background: var(--bg-surface) !important;
  border-right: 1px solid var(--border-card);
  box-shadow: none;
}

.theme-tesseract .main-header {
  border-bottom: 1px solid rgba(99, 51, 255, 0.2);
  height: 64px;
}

.theme-tesseract .main-header #header-logo a {
  padding: 14px 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.theme-tesseract .tesseract-logo-wordmark,
.theme-tesseract .logo-custom.tesseract-logo-wordmark {
  font-family: 'Rajdhani', sans-serif !important;
  font-weight: 600 !important;
  font-size: 1.25rem !important;
  color: var(--text-primary) !important;
  letter-spacing: 0.02em;
}

.theme-tesseract .tesseract-logo-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.theme-tesseract .tesseract-icon-svg {
  width: 28px;
  height: 28px;
}

/* Content top / navbar (main content area header) — stack above main content so dropdown doesn’t overlap behind */
.theme-tesseract .content-top {
  background: rgba(7, 7, 26, 0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(99, 51, 255, 0.2);
  height: 64px;
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1030;
}

/* Menu */
.theme-tesseract #main-menu .menu .menu-item-label,
.theme-tesseract #main-menu .menu .menu-icon {
  color: var(--text-muted) !important;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-tesseract #main-menu .menu .menu-item:hover .menu-item-label,
.theme-tesseract #main-menu .menu .menu-item:hover .menu-icon {
  color: var(--accent-cyan) !important;
}

.theme-tesseract #main-menu .menu .menu-item.active {
  background: rgba(99, 51, 255, 0.2) !important;
  border-left: 3px solid var(--accent-cyan);
}

.theme-tesseract #main-menu .menu .menu-item.active .menu-item-label,
.theme-tesseract #main-menu .menu .menu-item.active .menu-icon {
  color: var(--accent-cyan) !important;
}

.theme-tesseract .sidebar {
  border-right-color: var(--border-card);
}

/* Cards / panels */
.theme-tesseract .card,
.theme-tesseract .dashboard-header {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  box-shadow: var(--glow-purple);
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-tesseract .card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-cyan);
}

/* Buttons — primary (cyan outline) */
.theme-tesseract .btn-primary,
.theme-tesseract .btn.primary {
  background: transparent !important;
  border: 1px solid var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
  border-radius: 4px;
  padding: 10px 24px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-tesseract .btn-primary:hover,
.theme-tesseract .btn.primary:hover {
  box-shadow: var(--glow-cyan);
}

/* Icons inside primary/outline buttons — match accent-cyan */
.theme-tesseract .btn-primary i,
.theme-tesseract .btn-primary .fa,
.theme-tesseract .btn-primary .fas,
.theme-tesseract .btn.primary .far,
.theme-tesseract .btn.primary .fab,
.theme-tesseract .btn.primary .fal,
.theme-tesseract .btn.primary .fad,
.theme-tesseract .btn.primary .svg-inline--fa,
.theme-tesseract .btn-outline-primary i,
.theme-tesseract .btn-outline-primary .fa,
.theme-tesseract .btn-outline-primary .fas,
.theme-tesseract .btn-outline-primary .far,
.theme-tesseract .btn.primary i,
.theme-tesseract .btn.primary .fa,
.theme-tesseract .btn.primary .fas {
  color: var(--accent-cyan) !important;
}

.theme-tesseract .btn-primary:hover i,
.theme-tesseract .btn-primary:hover .fa,
.theme-tesseract .btn-outline-primary:hover i,
.theme-tesseract .btn-outline-primary:hover .fa,
.theme-tesseract .btn-outline-primary:hover .fas {
  color: var(--accent-cyan) !important;
}

/* Buttons — filled (brand purple) */
.theme-tesseract .btn-success,
.theme-tesseract .btn.success {
  background: var(--brand-purple) !important;
  border: 1px solid var(--brand-purple) !important;
  color: #fff !important;
  border-radius: 4px;
  padding: 10px 24px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
}

.theme-tesseract .btn-success:hover,
.theme-tesseract .btn.success:hover {
  filter: brightness(1.1);
  box-shadow: var(--glow-purple);
}

/* Outline buttons */
.theme-tesseract .btn-outline-primary {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.theme-tesseract .btn-outline-primary:hover {
  background: rgba(0, 229, 255, 0.1);
  box-shadow: var(--glow-cyan);
}

/* Form inputs */
.theme-tesseract .form-control,
.theme-tesseract .form-select {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-primary);
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.theme-tesseract .form-control:focus,
.theme-tesseract .form-select:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
  outline: none;
}

/* Status badges */
.theme-tesseract .badge.bg-success,
.theme-tesseract .badge.status-online {
  background: rgba(16, 185, 129, 0.2) !important;
  color: var(--status-online);
  border-radius: 20px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.theme-tesseract .badge.bg-warning,
.theme-tesseract .badge.status-warn {
  background: rgba(245, 158, 11, 0.2) !important;
  color: var(--status-warn);
  border-radius: 20px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.theme-tesseract .badge.bg-danger,
.theme-tesseract .badge.status-error {
  background: rgba(239, 68, 68, 0.2) !important;
  color: var(--status-error);
  border-radius: 20px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.theme-tesseract .badge.bg-info {
  background: rgba(0, 229, 255, 0.2) !important;
  color: var(--accent-cyan);
  border-radius: 20px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.theme-tesseract .badge.bg-primary {
  background: rgba(99, 51, 255, 0.3) !important;
  color: var(--text-primary);
  border-radius: 20px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

/* Stat cards (dashboard) */
.theme-tesseract .card .list-group-item,
.theme-tesseract .dashboard-header {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(99, 51, 255, 0.2);
  border-radius: 10px;
}

.theme-tesseract .content-wrapper {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

/* Price / currency — JetBrains Mono */
.theme-tesseract .fw-bold.text-success,
.theme-tesseract [class*="price"],
.theme-tesseract .product-summary-box span,
.theme-tesseract .user-balance {
  font-family: 'JetBrains Mono', monospace !important;
}

/* Price calculation & any .bg-light — dark surface, readable text (no white-on-white) */
.theme-tesseract .bg-light,
.theme-tesseract .card-body .bg-light,
.theme-tesseract .server-specs .bg-light,
.theme-tesseract .server-card .bg-light,
.theme-tesseract .server-specs div.bg-light.rounded-3,
.theme-tesseract .server-card div.p-3.bg-light.rounded-3,
.theme-tesseract div.p-3.bg-light.rounded-3 {
  background: rgba(255, 255, 255, 0.03) !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-card);
  color: var(--text-primary);
}

.theme-tesseract .bg-light .text-muted,
.theme-tesseract .server-specs .bg-light .text-muted {
  color: var(--text-faint) !important;
}

.theme-tesseract .bg-light .fw-semibold,
.theme-tesseract .bg-light .fw-bold {
  color: var(--text-primary) !important;
}

.theme-tesseract .bg-light .text-success {
  color: var(--status-online) !important;
}

/* Server specs — placeholder text (IP, RAM, Disk, CPU values) readable on dark */
.theme-tesseract .server-specs .placeholder {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.theme-tesseract .server-specs .bg-light small.fw-semibold,
.theme-tesseract .server-card .bg-light small.fw-semibold {
  color: var(--text-faint) !important;
}

/* Force server metric boxes (IP, RAM, Disk, CPU, Valid until) to dark in all contexts */
body.theme-tesseract .server-specs .p-3.bg-light,
body.theme-tesseract .server-card .p-3.bg-light.rounded-3,
body.theme-tesseract .server-specs .mt-3.p-3.bg-light.rounded-3 {
  background: rgba(255, 255, 255, 0.03) !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-card) !important;
  color: var(--text-primary) !important;
}

.theme-tesseract .product-summary-box {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-card);
  color: var(--text-primary);
}

.theme-tesseract .product-summary-box .text-muted {
  color: var(--text-faint) !important;
}

.theme-tesseract .product-summary-box .text-success {
  color: var(--status-online) !important;
}

/* Responsive header (mobile) */
.theme-tesseract .responsive-header {
  background: rgba(7, 7, 26, 0.95) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(99, 51, 255, 0.2);
}

.theme-tesseract .responsive-header .responsive-logo.tesseract-logo {
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-tesseract .responsive-header .tesseract-logo-icon .tesseract-icon-svg {
  width: 22px;
  height: 22px;
}

/* Dropdowns / modals — dropdown item icons use accent; ensure menu paints above content */
.theme-tesseract .dropdown-menu {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  z-index: 1050 !important;
}

.theme-tesseract .content-top .dropdown-menu {
  z-index: 1050 !important;
}

.theme-tesseract .content-top .dropdown {
  position: relative;
  z-index: 1040;
}

.theme-tesseract .dropdown-menu .dropdown-item .fa,
.theme-tesseract .dropdown-menu .dropdown-item .fas,
.theme-tesseract .dropdown-menu .dropdown-item .far,
.theme-tesseract .dropdown-menu .dropdown-item i {
  color: var(--text-faint) !important;
}

.theme-tesseract .dropdown-menu .dropdown-item:hover .fa,
.theme-tesseract .dropdown-menu .dropdown-item:hover .fas,
.theme-tesseract .dropdown-menu .dropdown-item:hover .far,
.theme-tesseract .dropdown-menu .dropdown-item:hover i {
  color: var(--accent-cyan) !important;
}

/* Content area — section title icons (Dashboard, My servers, etc.) */
.theme-tesseract .content-header .fa,
.theme-tesseract .content-header .fas,
.theme-tesseract .content-header .far,
.theme-tesseract .content-header-title .fa,
.theme-tesseract .content-header-title .fas,
.theme-tesseract .content-header-title i,
.theme-tesseract .content-body .card-header .fa,
.theme-tesseract .content-body .card-header .fas,
.theme-tesseract .content-body .card-header i {
  color: var(--accent-cyan) !important;
}

/* Top bar — balance (Hexacoin) icon stays accent-cyan (override navbar icon color) */
.theme-tesseract .content-top .user-balance a .fa,
.theme-tesseract .content-top .user-balance a .fas,
.theme-tesseract .content-top .user-balance .fa,
.theme-tesseract .content-top .user-balance .fas,
.theme-tesseract .responsive-header .user-balance .fa,
.theme-tesseract .responsive-header .user-balance .fas {
  color: var(--accent-cyan) !important;
}

/* Top bar — user menu icon muted, cyan on hover */
.theme-tesseract .content-top .user-details .fa,
.theme-tesseract .content-top .user-details .fas,
.theme-tesseract .content-top .user-details i.fa,
.theme-tesseract .content-top .user-details .fa,
.theme-tesseract .content-top .user-details .fas,
.theme-tesseract .content-top .user-details i.fa,
.theme-tesseract .content-top .navbar-custom-menu .fa,
.theme-tesseract .content-top .navbar-custom-menu .fas {
  color: var(--text-muted) !important;
}

.theme-tesseract .content-top .user-details:hover .fa,
.theme-tesseract .content-top .user-details:hover .fas,
.theme-tesseract .content-top .navbar-custom-menu a:hover .fa,
.theme-tesseract .content-top .navbar-custom-menu a:hover .fas {
  color: var(--accent-cyan) !important;
}

/* Settings gear in content-top */
.theme-tesseract .content-top .dropdown-settings-button .fa,
.theme-tesseract .content-top .dropdown-settings-button .fas {
  color: var(--text-muted) !important;
}

.theme-tesseract .content-top .dropdown-settings-button:hover .fa,
.theme-tesseract .content-top .dropdown-settings-button:hover .fas {
  color: var(--accent-cyan) !important;
}

.theme-tesseract .content-search .form-control {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Login split screen overrides when theme-tesseract */
.theme-tesseract.page-login-split {
  background: var(--bg-base) !important;
}

.theme-tesseract.page-login-split .login-split-left {
  background: var(--bg-surface) !important;
  border-right: 1px solid var(--border-card);
}

.theme-tesseract.page-login-split .login-split-right {
  background: var(--bg-base) !important;
}

.theme-tesseract.page-login-split .login-form-wrapper {
  background: transparent !important;
}

.theme-tesseract.page-login-split .login-brand-title {
  font-family: 'Rajdhani', sans-serif;
  color: var(--text-primary);
}

.theme-tesseract.page-login-split .login-brand-subtitle,
.theme-tesseract.page-login-split .text-muted {
  color: var(--text-muted);
}

.theme-tesseract.page-login-split .login-feature-item {
  color: var(--text-muted);
}

.theme-tesseract.page-login-split .form-control {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--border-card) !important;
  color: var(--text-primary);
}

.theme-tesseract.page-login-split .form-control:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

.theme-tesseract.page-login-split .text-dark {
  color: var(--text-primary) !important;
}

/* Global footer */
.theme-tesseract .global-footer {
  border-top-color: var(--border-card);
}

.theme-tesseract .global-footer .text-muted {
  color: var(--text-faint) !important;
}

.theme-tesseract .global-footer a {
  color: var(--text-muted);
}

/* Interactive elements transition */
.theme-tesseract a,
.theme-tesseract button,
.theme-tesseract .btn,
.theme-tesseract .menu-item,
.theme-tesseract .dropdown-item {
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Manage themes page — marketplace sidebar / iframe has set width */
.theme-tesseract #plugin-page-layout .marketplace-sidebar-panel,
.theme-tesseract #plugin-page-layout #marketplace-sidebar {
  width: 320px;
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
}

.theme-tesseract #plugin-page-layout iframe {
  max-width: 100%;
  width: 320px;
}
