/* Xyris Dashboard Styles - Matching Landing Page Aesthetic */

@font-face {
  font-family: 'Kunst Grotesk';
  src: url('/fonts/Kunst Grotesk Regular (1).woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Kunst Grotesk';
  src: url('/fonts/Kunst Grotesk Medium (1).woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

:root {
  --bg-primary: #f9fafb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --accent-blue: #111827;
  --accent-blue-dark: #374151;
  --success: #16a34a;
  --warning: #fbbf24;
  --error: #ef4444;
  --border: #e5e7eb;
}

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

body {
  font-family: 'Kunst Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Dithered background effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.012) 2px, rgba(0,0,0,0.012) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.012) 2px, rgba(0,0,0,0.012) 4px);
  pointer-events: none;
  z-index: 1;
}

/* Scanline effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 2;
  display: none;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* Auth Container */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  z-index: 3;
}

.auth-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.auth-box h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-blue);
}

.auth-box p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Dashboard Layout */
.dashboard-header-bar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 72px;
  background: rgba(249, 250, 251, 0.82);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 2px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
}

.dashboard-logo {
  display: block;
  width: auto;
  height: 32px;
  filter: invert(1);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
}

.user-name {
  color: var(--text-primary);
  font-weight: 500;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 200px;
  display: none;
  flex-direction: column;
}

.user-menu:hover .user-dropdown {
  display: flex;
}

.user-menu:focus-within .user-dropdown { display: flex; }

.user-dropdown a {
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s;
}

.user-dropdown a:hover {
  background: var(--bg-tertiary);
}

.logout-form button {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.logout-form button:hover { background: var(--bg-tertiary); }

.dashboard-container {
  display: flex;
  margin-top: 104px;
  min-height: calc(100vh - 104px);
  position: relative;
  z-index: 3;
}

.dashboard-sidebar {
  width: 250px;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid var(--border);
  padding: 2rem 0;
  position: fixed;
  left: 16px;
  top: 104px;
  bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.04);
  overflow-y: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border: 0;
  border-radius: 8px;
  margin: 3px 10px;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: #111827;
  color: #ffffff;
}

.nav-icon {
  font-size: 1.25rem;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
}

.package-badge {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.badge-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-value {
  font-size: 1rem;
  color: var(--accent-blue);
  font-weight: 500;
}

.dashboard-main {
  flex: 1;
  margin-left: 282px;
  padding: 2rem;
  max-width: 1400px;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.dashboard-header p {
  color: var(--text-secondary);
}

/* Resource Cards */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.resource-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
}

.resource-icon {
  font-size: 2rem;
}

.resource-info {
  flex: 1;
}

.resource-info h3 {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.resource-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.resource-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue-dark), var(--accent-blue));
  transition: width 0.3s;
}

.resource-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Package Info */
.package-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.package-info h2 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.package-info p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Servers Section */
.servers-section {
  margin-bottom: 2rem;
}

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

.section-header h2 {
  color: var(--text-primary);
}

.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.server-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.server-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.server-header h3 {
  color: var(--text-primary);
}

.server-status {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 500;
}

.server-status.running {
  background: rgba(74, 222, 128, 0.2);
  color: var(--success);
}

.server-status.stopped {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.server-info {
  margin-bottom: 1rem;
}

.server-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.server-actions {
  display: flex;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-blue-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.34);
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 5% auto;
  padding: 2rem;
  max-width: 500px;
  position: relative;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.close:hover {
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* Store */
.store-section {
  margin-bottom: 3rem;
}

.store-section h2 {
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.package-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.package-card.current {
  border-color: var(--accent-blue);
}

.package-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.package-header h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 500;
}

.badge-current {
  background: rgba(135, 206, 235, 0.2);
  color: var(--accent-blue);
}

.package-price {
  margin-bottom: 1.5rem;
}

.price {
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--accent-blue);
}

.period {
  color: var(--text-secondary);
  font-size: 1rem;
}

.package-features {
  flex: 1;
  margin-bottom: 1.5rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.feature-icon {
  font-size: 1.25rem;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.resource-purchase-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.resource-purchase-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.resource-price {
  font-size: 2rem;
  color: var(--accent-blue);
  margin-bottom: 1rem;
}

.resource-quantity {
  margin-bottom: 1rem;
}

.quantity-input {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  text-align: center;
}

.payment-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}

.payment-info h3 {
  margin-bottom: 0.5rem;
  color: var(--accent-blue);
}

/* Account */
.account-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.account-section h2 {
  margin-bottom: 1.5rem;
  color: var(--accent-blue);
}

.account-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-item label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.info-item p {
  color: var(--text-primary);
  font-size: 1rem;
}

.resources-table table,
.transactions-table table {
  width: 100%;
  border-collapse: collapse;
}

.resources-table th,
.transactions-table th {
  text-align: left;
  padding: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}

.resources-table td,
.transactions-table td {
  padding: 0.75rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 500;
}

.status-completed {
  background: rgba(74, 222, 128, 0.2);
  color: var(--success);
}

.status-pending {
  background: rgba(251, 191, 36, 0.2);
  color: var(--warning);
}

.status-failed {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.danger-zone {
  border-color: var(--error);
}

.danger-zone h2 {
  color: var(--error);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

/* Notifications */
.notification {
  position: fixed;
  top: 80px;
  right: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  min-width: 300px;
  z-index: 2000;
  transform: translateX(400px);
  transition: transform 0.3s;
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  border-left: 4px solid var(--success);
}

.notification-error {
  border-left: 4px solid var(--error);
}

.notification-info {
  border-left: 4px solid var(--accent-blue);
}

/* Verification queue */
.queue-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  z-index: 3;
}

.queue-card {
  width: min(100%, 680px);
  padding: 48px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
  text-align: center;
  backdrop-filter: blur(14px);
}

.queue-logo {
  display: inline-block;
  margin-bottom: 36px;
}

.queue-logo img {
  display: block;
  height: 34px;
  width: auto;
  filter: invert(1);
}

.queue-status-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-tertiary);
}

.queue-status-icon.rejected {
  color: var(--error);
  background: #fef2f2;
  border-color: #fecaca;
  font-size: 24px;
  font-weight: 600;
}

.queue-pulse {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #111827;
  box-shadow: 0 0 0 0 rgba(17, 24, 39, 0.22);
  animation: queue-pulse 2s infinite;
}

@keyframes queue-pulse {
  70% { box-shadow: 0 0 0 16px rgba(17, 24, 39, 0); }
  100% { box-shadow: 0 0 0 0 rgba(17, 24, 39, 0); }
}

.eyebrow {
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.queue-card h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.queue-copy {
  max-width: 540px;
  margin: 0 auto 28px;
  color: var(--text-secondary);
  font-size: 16px;
}

.queue-position {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 28px;
  padding: 18px 20px;
  max-width: 360px;
  background: #111827;
  border-radius: 12px;
  color: #fff;
}

.queue-position span { color: rgba(255, 255, 255, 0.68); }
.queue-position strong { font-size: 26px; line-height: 1; }

.queue-steps {
  display: grid;
  gap: 10px;
  margin: 0 auto 30px;
  max-width: 440px;
  text-align: left;
}

.queue-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  color: #9ca3af;
}

.queue-step > span {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  font-size: 13px;
}

.queue-step div { display: grid; }
.queue-step small { color: #9ca3af; }
.queue-step.complete, .queue-step.active { color: #111827; }
.queue-step.complete > span { background: #111827; border-color: #111827; color: #fff; }
.queue-step.active { background: #f3f4f6; border-radius: 12px; }

.queue-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.queue-note {
  margin-top: 16px;
  color: #9ca3af;
  font-size: 12px;
}

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

.section-heading-row h2,
.section-heading-row .eyebrow { margin-bottom: 0; }

.queue-count,
.verification-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #f9fafb;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.verification-badge.approved { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.verification-badge.rejected { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.verification-badge.pending { background: #fffbeb; border-color: #fde68a; color: #a16207; }

.verification-list { display: grid; gap: 10px; }

.verification-user {
  display: grid;
  grid-template-columns: 42px minmax(160px, 1.3fr) minmax(150px, 1fr) 120px auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fafb;
}

.queue-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #111827;
  color: #fff;
  font-size: 13px;
}

.verification-identity,
.verification-meta { display: grid; min-width: 0; }
.verification-identity span,
.verification-meta span { color: var(--text-secondary); font-size: 12px; }
.verification-identity strong,
.verification-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verification-meta strong { font-size: 13px; font-weight: 500; }
.verification-actions { display: flex; justify-content: flex-end; gap: 8px; }

.admin-empty-state {
  padding: 34px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  text-align: center;
}

.admin-empty-state p { margin-top: 4px; color: var(--text-secondary); }

@media (max-width: 1050px) {
  .verification-user { grid-template-columns: 42px 1fr auto; }
  .verification-meta { display: none; }
}

@media (max-width: 600px) {
  .queue-card { padding: 34px 22px; border-radius: 20px; }
  .queue-actions { flex-direction: column; }
  .verification-user { grid-template-columns: 36px 1fr; }
  .verification-actions { grid-column: 1 / -1; }
  .verification-actions .btn { flex: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
  }
  
  .dashboard-main {
    margin-left: 0;
  }
  
  .resource-grid,
  .servers-grid,
  .packages-grid {
    grid-template-columns: 1fr;
  }
}


/* Premium dashboard refinement */
.nav-group { display: grid; gap: 0.35rem; margin: 0.35rem 0; }
.nav-group-label { padding: 0.55rem 0.9rem 0.2rem; color: var(--text-muted, #8d96a8); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.nav-subitem { padding-left: 1.35rem; }
.modal-dialog { border: 1px solid var(--border, #2b3342); border-radius: 16px; background: var(--surface, #111722); color: inherit; padding: 0; }
.modal-dialog::backdrop { background: rgb(0 0 0 / 65%); }
.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.console-panel { margin: 1rem 0; padding: 1.25rem; border: 1px solid var(--border, #2b3342); border-radius: 16px; background: var(--surface, #111722); }
.console-output { min-height: 260px; max-height: 420px; overflow: auto; padding: 1rem; border-radius: 10px; background: #070a10; color: #b8f7cb; font: 0.8rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.console-input { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.console-input input { flex: 1; min-width: 0; }
.file-manager { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.5fr); gap: 1rem; }
.file-list, .file-editor { padding: 1rem; border: 1px solid var(--border, #2b3342); border-radius: 14px; background: var(--surface, #111722); }
.file-list { display: grid; align-content: start; gap: 0.35rem; }
.file-entry { border: 0; border-radius: 8px; padding: 0.65rem; text-align: left; background: transparent; color: inherit; cursor: pointer; }
.file-entry:hover { background: rgb(255 255 255 / 8%); }
.file-editor { display: grid; gap: 0.75rem; }
.file-editor textarea { min-height: 420px; resize: vertical; font: 0.85rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
@media (max-width: 768px) { .overview-grid { grid-template-columns: 1fr; } .console-input { flex-direction: column; } }
@media (max-width: 768px) { .file-manager { grid-template-columns: 1fr; } }
.db1-main { max-width: 1380px; }
.db1-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.status-pill { border-radius: 999px; padding: 0.4rem 0.8rem; font-size: 0.75rem; font-weight: 700; }
.status-online { background: rgb(52 211 153 / 14%); color: #6ee7b7; border: 1px solid rgb(52 211 153 / 30%); }
.db1-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; margin: 1.5rem 0; }
.db1-stat, .db1-card { border: 1px solid var(--border, #2b3342); border-radius: 16px; background: var(--surface, #111722); }
.db1-stat { padding: 1rem 1.15rem; display: grid; gap: 0.35rem; }
.db1-stat span, .db1-query-footer, .db1-database small { color: var(--text-muted, #8d96a8); font-size: 0.78rem; }
.db1-stat strong { font-size: 1.25rem; }
.db1-layout { display: grid; grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.5fr); gap: 1rem; }
.db1-card { padding: 1.25rem; }
.db1-card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.db1-card-header h2 { margin: 0.2rem 0 0; }
.db1-list { display: grid; gap: 0.45rem; }
.db1-database { width: 100%; display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border: 1px solid transparent; border-radius: 11px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.db1-database:hover { border-color: var(--border, #2b3342); background: rgb(255 255 255 / 4%); }
.db1-database span:nth-child(2) { display: grid; gap: 0.2rem; flex: 1; }
.db1-database-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 8px; background: rgb(96 165 250 / 14%); color: #93c5fd; font-size: 0.7rem; font-weight: 800; }
.db1-chevron { color: var(--text-muted, #8d96a8); font-size: 1.5rem; }
.db1-empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted, #8d96a8); }
.db1-editor { width: 100%; min-height: 220px; resize: vertical; border: 1px solid var(--border, #2b3342); border-radius: 10px; background: #070a10; color: #dbeafe; padding: 1rem; font: 0.85rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.db1-query-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.75rem; }
.db1-result { min-height: 100px; max-height: 260px; overflow: auto; margin: 1rem 0 0; padding: 1rem; border-radius: 10px; background: #070a10; color: #b8f7cb; white-space: pre-wrap; font: 0.78rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.db1-danger { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; border-color: rgb(248 113 113 / 25%); }
.db1-danger h2 { margin: 0.2rem 0; }
.db1-danger p { margin: 0; color: var(--text-muted, #8d96a8); }
@media (max-width: 768px) { .db1-header, .db1-danger { display: grid; } .db1-stats, .db1-layout { grid-template-columns: 1fr; } .db1-card-header, .db1-query-footer { align-items: stretch; flex-direction: column; } }
.public-status, .partner-shell { min-height: 100vh; max-width: 980px; margin: 0 auto; padding: 3rem 1.5rem; color: var(--text, #eef2f7); }
.status-brand { color: #93c5fd; font-weight: 800; letter-spacing: 0.16em; font-size: 0.75rem; }
.status-hero { padding: 6rem 0 2rem; }
.status-hero h1, .partner-header h1 { margin: 0.5rem 0; font-size: clamp(2rem, 5vw, 4rem); }
.status-card, .partner-shell .db1-card { border: 1px solid var(--border, #2b3342); border-radius: 18px; background: var(--surface, #111722); padding: 1.25rem; }
.status-summary, .status-row, .partner-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.status-summary { padding: 0.75rem; border-bottom: 1px solid var(--border, #2b3342); }
.status-summary time { color: var(--text-muted, #8d96a8); font-size: 0.75rem; }
.status-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgb(52 211 153 / 12%); }
.status-row { padding: 1rem 0.75rem; border-bottom: 1px solid rgb(255 255 255 / 6%); }
.status-row div { display: grid; gap: 0.25rem; }.status-row small { color: var(--text-muted, #8d96a8); }.status-back { display: inline-block; margin-top: 1rem; color: #93c5fd; }
.partner-header { align-items: flex-start; padding: 2rem 0; }.partner-header p { color: var(--text-muted, #8d96a8); }.partner-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }.partner-stats > div { padding: 1rem; border: 1px solid var(--border, #2b3342); border-radius: 14px; background: var(--surface, #111722); display: grid; gap: 0.4rem; }.partner-stats span { color: var(--text-muted, #8d96a8); font-size: 0.8rem; }.partner-stats strong { font-size: 1.5rem; }.partner-edit { display: flex; gap: 0.4rem; }.partner-edit input { max-width: 110px; }
@media (max-width: 700px) { .partner-header, .status-summary, .status-row { align-items: flex-start; flex-direction: column; }.partner-stats { grid-template-columns: 1fr; }.partner-edit { flex-wrap: wrap; } }
:root {
  --bg-primary: #f6f7f9;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f2f5;
  --text-primary: #15171b;
  --text-secondary: #737984;
  --accent-blue: #15171b;
  --accent-blue-dark: #3d4655;
  --border: #e4e7ec;
  --accent-soft: #edf4ff;
  --accent: #3578f6;
}

body {
  background:
    radial-gradient(circle at 72% -10%, rgba(53, 120, 246, 0.08), transparent 32rem),
    radial-gradient(circle at -5% 45%, rgba(99, 102, 241, 0.04), transparent 28rem),
    var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

.dashboard-header-bar {
  height: 68px;
  padding: 0 26px;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(21, 23, 27, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(21, 23, 27, 0.06);
}

.dashboard-logo { height: 29px; }
.user-menu { gap: 10px; }
.user-avatar { width: 34px; height: 34px; border-color: #d9dee8; }
.user-avatar-fallback { display: inline-grid; place-items: center; background: #15171b; color: #fff; font-size: 13px; font-weight: 600; }
.user-name { font-size: 14px; }
.user-dropdown { box-shadow: 0 14px 36px rgba(21, 23, 27, 0.12); }

.dashboard-container {
  max-width: 1680px;
  margin-right: auto;
}

.dashboard-sidebar {
  width: 236px;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(21, 23, 27, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(21, 23, 27, 0.045);
}

.sidebar-nav { gap: 3px; }
.nav-item {
  min-height: 44px;
  padding: 11px 15px;
  margin: 0 9px;
  gap: 11px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
}

.nav-item.active {
  background: #15171b;
  box-shadow: 0 5px 14px rgba(21, 23, 27, 0.16);
}

.nav-item.active .nav-icon { filter: grayscale(1) brightness(4); }
.nav-icon { width: 22px; height: 22px; display: inline-grid; place-items: center; text-align: center; font-size: 17px; }
.nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-footer { padding: 16px 18px; }
.package-badge { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fafbfc; }
.badge-label { font-size: 10px; letter-spacing: 0.14em; }
.badge-value { font-size: 14px; }

.dashboard-main {
  max-width: none;
  padding: 34px 38px 56px;
}

.dashboard-header { margin-bottom: 28px; }
.page-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #7e8794;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-header h1 {
  margin-bottom: 6px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.dashboard-header p { font-size: 14px; color: #89919d; }
.dashboard-header p strong { color: var(--text-primary); font-weight: 500; }

.resource-grid { gap: 14px; margin-bottom: 26px; }
.resource-card {
  min-height: 142px;
  position: relative;
  padding: 20px;
  border-radius: 14px;
  border-color: rgba(21, 23, 27, 0.08);
  box-shadow: 0 7px 24px rgba(21, 23, 27, 0.035);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.resource-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.75;
}

.resource-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(21, 23, 27, 0.07); border-color: #d6dbe5; }
.resource-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); font-size: 18px; }
.resource-info h3 { margin-bottom: 8px; font-size: 11px; letter-spacing: 0.12em; }
.resource-bar { height: 6px; margin-bottom: 7px; }
.resource-fill { background: linear-gradient(90deg, #15171b, #5d6878); }
.resource-info p { font-size: 12px; }

.package-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding: 22px 24px;
  border-radius: 14px;
  border-color: rgba(21, 23, 27, 0.08);
  background: linear-gradient(120deg, #fff 0%, #f8fafc 100%);
  text-align: left;
}

.package-copy h2 { margin-bottom: 4px; font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.package-copy p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.package-info .page-eyebrow { margin-bottom: 7px; }

.section-header { margin-bottom: 14px; }
.section-header h2, .admin-section h2 { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.servers-grid { gap: 14px; }
.server-card { padding: 19px; border-radius: 14px; border-color: rgba(21, 23, 27, 0.08); box-shadow: 0 7px 24px rgba(21, 23, 27, 0.035); }
.server-card:hover { transform: translateY(-3px); }
.server-header { margin-bottom: 18px; }
.server-header h3 { font-size: 16px; font-weight: 500; }
.server-info { padding: 12px 0; border-top: 1px solid #edf0f3; border-bottom: 1px solid #edf0f3; }
.server-info p { margin-bottom: 5px; font-size: 12px; }
.server-info p:last-child { margin-bottom: 0; }
.server-status { border-radius: 999px; font-size: 10px; letter-spacing: 0.08em; }
.server-actions { margin-top: 16px; }

.btn { min-height: 38px; padding: 9px 14px; border-radius: 9px; font-size: 13px; font-weight: 500; box-shadow: none; }
.btn-primary { background: #15171b; border-color: #15171b; }
.btn-primary:hover { background: #3d4655; transform: translateY(-1px); }
.btn-secondary { background: #fff; border: 1px solid #dfe3e9; color: #4b5563; }
.btn-secondary:hover { background: #f7f8fa; border-color: #cbd2dc; }
.btn-danger { border-radius: 9px; }

.empty-state { padding: 52px 24px; border: 1px dashed #d5dbe4; border-radius: 14px; background: rgba(255,255,255,0.5); }
.empty-state p { margin-bottom: 16px; color: var(--text-secondary); }

.admin-section, .account-section, .store-section, .package-card, .payment-info {
  border-radius: 14px;
  border-color: rgba(21, 23, 27, 0.08);
  box-shadow: 0 7px 24px rgba(21, 23, 27, 0.035);
}

.admin-table th, .admin-table td { padding: 13px 12px; }
.admin-table th { font-size: 10px; letter-spacing: 0.12em; }
.admin-table td { font-size: 13px; }

body .stats-grid .stat-card,
body .admin-section {
  border-radius: 14px !important;
  border-color: rgba(21, 23, 27, 0.08) !important;
  box-shadow: 0 7px 24px rgba(21, 23, 27, 0.035) !important;
}

@media (max-width: 900px) {
  .dashboard-sidebar { width: 210px; }
  .dashboard-main { margin-left: 242px; padding-left: 26px; padding-right: 26px; }
}

@media (max-width: 768px) {
  .dashboard-header-bar { left: 8px; right: 8px; top: 8px; padding: 0 16px; }
  .dashboard-container { display: block; margin-top: 92px; }
  .dashboard-sidebar {
    position: relative;
    inset: auto;
    width: auto;
    margin: 0 8px 10px;
    padding: 8px;
    border-radius: 12px;
  }
  .sidebar-nav { flex-direction: row; overflow-x: auto; }
  .nav-item { flex: 0 0 auto; margin: 0; }
  .nav-text { display: none; }
  .sidebar-footer { display: none; }
  .dashboard-main { margin-left: 0; padding: 24px 16px 40px; }
  .package-info { align-items: flex-start; flex-direction: column; }
  .package-info .btn { width: 100%; }
}

/* Final light-theme overrides for server and partner surfaces. */
.console-panel,
.file-list,
.file-editor,
.partner-shell .db1-card,
.partner-stats > div {
  background: var(--bg-secondary);
  border-color: rgba(21, 23, 27, 0.08);
  color: var(--text-primary);
  box-shadow: 0 7px 24px rgba(21, 23, 27, 0.035);
}

.console-output,
.db1-editor,
.db1-result {
  background: #f7f8fa;
  border: 1px solid #e5e8ed;
  color: #303640;
}

.file-entry:hover,
.db1-database:hover { background: #f3f5f8; }
.public-status,
.partner-shell { color: var(--text-primary); }
.partner-shell .status-row { border-bottom-color: #edf0f3; }
.partner-shell .partner-header p,
.partner-shell .partner-stats span,
.partner-shell .db1-empty,
.partner-shell small { color: var(--text-secondary); }
.partner-shell code { color: var(--text-primary); background: #f3f5f8; border: 1px solid #e5e8ed; }
.credits-balance { align-items: center; }
.credits-balance h2 { margin: 0.25rem 0; font-size: 1.8rem; }
.credits-balance a { color: inherit; }
.credits-topup { padding: 1.5rem; }
.credit-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 1.25rem; }
.credit-option { display: grid; gap: 0.2rem; padding: 1rem; border: 1px solid #e5e8ed; border-radius: 12px; background: #fff; color: var(--text-primary); text-align: left; cursor: pointer; }
.credit-option:hover, .credit-option.selected { border-color: #15171b; box-shadow: 0 5px 16px rgba(21,23,27,.08); }
.credit-option strong { font-size: 1.35rem; }.credit-option span, .credit-option small { color: var(--text-secondary); font-size: .78rem; }
.credit-custom { display: flex; align-items: end; gap: 1rem; max-width: 500px; margin-top: 1.5rem; }.credit-custom .form-group { flex: 1; }.credit-custom .btn { white-space: nowrap; }
@media (max-width: 650px) { .credit-options { grid-template-columns: repeat(2, 1fr); } .credit-custom { align-items: stretch; flex-direction: column; } }

.partner-application { max-width: 900px; }
.partner-application-card { max-width: 760px; margin: 1.5rem auto 0; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid rgba(21, 23, 27, 0.08); border-radius: 18px; background: var(--bg-secondary); box-shadow: 0 14px 40px rgba(21, 23, 27, 0.06); }
.application-intro { padding-bottom: 1.5rem; border-bottom: 1px solid #edf0f3; }
.application-intro h2, .partner-application-card h2 { margin: 0.35rem 0 0.5rem; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.025em; }
.application-intro p, .application-lead { max-width: 620px; margin: 0; color: var(--text-secondary); }
.partner-application-form { display: grid; gap: 1.25rem; padding-top: 1.5rem; }
.application-section-heading { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.6rem; padding-top: 1.25rem; border-top: 1px solid #edf0f3; }
.application-section-heading > span { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 7px; background: #f3f5f8; color: #667085; font-size: 0.7rem; font-weight: 700; }
.application-section-heading div { display: grid; gap: 0.15rem; }
.application-section-heading strong { font-size: 0.95rem; }
.application-section-heading small { color: var(--text-secondary); font-size: 0.75rem; }
.application-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.partner-application-form .form-group { display: grid; gap: 0.45rem; }
.partner-application-form .form-group > span { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; font-weight: 600; }
.partner-application-form .form-group > span small { color: var(--text-secondary); font-size: 0.72rem; font-weight: 500; }
.partner-application-form textarea { min-height: 120px; resize: vertical; }
.field-hint { color: var(--text-secondary); font-size: 0.74rem; }
.application-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.5rem; border-top: 1px solid #edf0f3; color: var(--text-secondary); font-size: 0.75rem; }
.application-status-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: 1.25rem; border-radius: 50%; background: #ecfdf5; color: #15803d; font-weight: 700; }
.application-note { display: grid; gap: 0.3rem; margin: 1.5rem 0; padding: 1rem; border: 1px solid #e5e8ed; border-radius: 12px; background: #f7f8fa; color: var(--text-secondary); font-size: 0.82rem; }
.application-note strong { color: var(--text-primary); }
.partner-application-review { padding: 1rem 0; border-bottom: 1px solid #edf0f3; }
.partner-application-review:last-child { border-bottom: 0; }
.partner-application-review details { margin-top: 0.75rem; }
.partner-application-review summary { color: #566171; cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.application-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 0.9rem; padding: 1rem; border-radius: 12px; background: #f7f8fa; }
.application-review-grid div { display: grid; gap: 0.25rem; }
.application-review-grid span { color: var(--text-secondary); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.application-review-grid strong, .application-review-grid p { margin: 0; font-size: 0.82rem; font-weight: 500; line-height: 1.55; }
.application-review-grid .review-wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .application-form-grid { grid-template-columns: 1fr; } .application-form-footer { align-items: stretch; flex-direction: column; } .application-form-footer .btn { width: 100%; } }
