/* /home/ubuntu/Hosting/Host2/panel/public/css/components.css */

/* Prevent Bootstrap reset conflicts on core layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Bootstrap overrides for Custom Glassmorphism Theme */
.form-control, .form-select {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 12px var(--accent-glow) !important;
  color: var(--text-primary) !important;
  background: var(--bg-input) !important;
}
.form-control::placeholder {
  color: var(--text-muted) !important;
}
/* dropdown options styles so they stay readable in all themes */
.form-select option {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}
/* Ensure Bootstrap table integrates with glass theme */
.table {
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--text-secondary) !important;
  --bs-table-border-color: var(--border-subtle) !important;
}
.table th {
  color: var(--text-primary) !important;
  background: rgba(var(--accent-rgb), 0.05) !important;
  border-bottom-width: 1px !important;
}
.table td {
  vertical-align: middle !important;
}

/* Profile Section Styling */
.profile-avatar-wrapper {
  position: relative;
  cursor: pointer;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-glow);
  transition: all 0.3s ease;
}
.profile-avatar-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--accent-glow);
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.5rem;
  color: white;
}
.profile-avatar-upload-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: block;
}

/* OAuth Link Cards */
.oauth-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}
.oauth-provider-info {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}
.oauth-provider-logo {
  height: 20px;
  width: auto;
  margin-right: 0.5rem;
}
.oauth-status-badge {
  font-size: 0.7rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 0.5rem;
  font-weight: bold;
}

/* Neutralizar fondo violeta por defecto de los logos */
.logo-icon, .brand-icon {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  display: flex !important;
}

/* Glassmorphism Cards & Panels */
.service-card, .form-panel, .table-panel, .table-container, .panel, .file-item, .force-password-card, .console-output, .card, .metric-card, .metric-card-simple, .console-input-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  box-shadow: var(--shadow-panel);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tab-content {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.user-info {
  background: transparent;
  background-color: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.console-header {
  display: none; /* This was explicitly set to none in dashboard.js, so keeping it here */
}

.service-card:hover, .file-item:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 25px var(--accent-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* Side Nav / Sidebar styling */
.sidebar, #sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  --webkit-backdrop-filter: blur(20px);
}

.sidebar {
  overflow-y: scroll;
}

.nav-item, .tab-btn {
  color: var(--text-secondary);
  background: transparent;
  border: none;
  transition: all 0.2s ease;
}

.nav-item:hover, .tab-btn:hover {
  color: var(--accent-primary);
  background: transparent;
  border: none;
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Cyberpunk active glow elements */
.sidebar .nav-item.active,
.sidebar .tab-btn.active,
#sidebar .nav-item.active,
#sidebar .tab-btn.active,
.tab-btn.active,
.nav-item.active {
  background: transparent;
  background-color: transparent;
  border: none;
  color: var(--accent-primary);
  text-shadow: 0 0 8px var(--accent-glow);
}

.tab-btn.active *, .nav-item.active * {
  color: var(--accent-primary);
}

.tab-btn.active svg, .nav-item.active svg,
.tab-btn.active svg *, .nav-item.active svg * {
  stroke: var(--accent-primary);
}

.btn {
  border-radius: 8px !important;
  font-weight: 600 !important;
  padding: 0.55rem 1.25rem !important;
  transition: all 0.2s ease !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 4px 25px rgba(var(--accent-rgb), 0.5);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--accent-primary) !important;
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: var(--accent-danger) !important;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  max-width: 600px;
}
.profile-tabs .tab-btn {
  font-size: 0.95rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
}
.profile-tabs .tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Forms, Controls, and Labels */
.form-label, label {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: block;
}

.form-input, select.form-input, input.form-input, textarea.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.form-input:focus, select.form-input:focus, input.form-input:focus, textarea.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
  outline: none;
}

select.form-input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Tables styling */
table, .table {
  color: var(--text-secondary);
  width: 100%;
  border-collapse: collapse;
}

thead th, th {
  background: rgba(var(--accent-rgb), 0.05);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.75rem;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.02);
}

td {
  padding: 0.75rem;
}

/* Accent text and stats */
.service-title span, .metric-limit {
  color: var(--accent-primary);
  text-shadow: 0 0 5px var(--accent-glow);
}

.section-title, h3, h4 {
  color: var(--text-primary);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* Network list layout */
.network-panel {
  padding: 1.5rem;
}

.network-title {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.network-help {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.network-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.network-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  transition: all 0.2s ease;
}

.network-list-item:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.network-list-index {
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-primary);
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.network-list-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.network-list-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.network-list-value {
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.98rem;
  font-weight: 700;
  word-break: break-word;
}

.network-list-action {
  color: var(--accent-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.network-list-item-copy {
  cursor: pointer;
}

.network-list-item-copy:focus-visible,
.network-list-item-expand:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.5);
  outline-offset: 2px;
}

.network-list-item-edit {
  align-items: flex-start;
}

.network-list-subtitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.network-subdomain-input,
.network-custom-domain-input {
  max-width: 320px;
  font-family: monospace;
}

.network-subdomain-input {
  width: 160px;
  text-align: right;
}

.network-domain-suffix,
.network-port-pill,
.network-inline-code {
  font-family: monospace;
  font-weight: 700;
}

.network-domain-suffix {
  color: var(--text-secondary);
}

.network-port-pill {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.network-save-btn {
  min-height: auto;
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
  border-radius: 10px;
}

.network-list-item-expand {
  cursor: pointer;
}

.network-plus-value {
  font-size: 1.4rem;
  line-height: 1;
}

.network-custom-domain-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px dashed var(--border-subtle);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.network-custom-domain-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.network-custom-domain-title {
  color: var(--text-primary);
  font-weight: 700;
}

.network-custom-domain-help {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.network-custom-domain-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.network-note {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Scrollbar customizing */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-secondary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Dashboard specific styles */
#dashboard-systems-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 1150px;
  width: 100%;
}

.service-card {
  height: auto;
  min-height: 0;
}

.service-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  width: 100%;
  gap: 1.25rem;
  flex-wrap: nowrap;
  height: auto;
  min-height: 0;
}

.service-main-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  flex-grow: 1;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.player-dropdown-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .service-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .service-main-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Estilos para la distribución del Dashboard del contenedor */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  width: 100%;
}

.dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Estilos para el indicador/luz de estado en los contenedores */
.service-info-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 200px;
  flex-shrink: 0;
}

.service-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  flex-shrink: 0;
}

.service-status-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
}
.service-status-dot.online {
  background: var(--accent-success);
  box-shadow: 0 0 8px var(--accent-success);
}
.service-status-dot.offline, .service-status-dot.suspended {
  background: var(--accent-danger);
  box-shadow: 0 0 8px var(--accent-danger);
}
