/* UI Polish — Desktop layout improvements for Hetzner Dashboard */

/* ===== CARD SPACING & HIERARCHY ===== */

/* Main content area: ensure consistent gaps between sections */
.p-6.space-y-6 {
  padding: 1.5rem 2rem !important;
}

/* Grid gaps: uniform 20px between cards */
.grid.grid-cols-3.gap-6 {
  gap: 1.25rem !important;
}
.grid.grid-cols-5.gap-6 {
  gap: 1.25rem !important;
}

/* Card inner padding: more breathing room */
.rounded-xl.p-6 {
  padding: 1.5rem !important;
}
.rounded-xl.p-4 {
  padding: 1.25rem !important;
}

/* ===== TYPOGRAPHY HIERARCHY ===== */

/* Section headings (CPU & Memory, Disk, Docker, etc.) */
.rounded-xl h2.text-xl,
.rounded-xl .text-xl.font-semibold {
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

/* Big metric values (43%, 32%, 8/8) — make them pop */
.text-5xl {
  font-weight: 700 !important;
  letter-spacing: -0.03em;
}

/* Metric labels (1.6 GB / 3.7 GB, etc.) */
.text-lg.font-semibold {
  font-size: 1rem !important;
  color: #cbd5e1 !important;
}

/* Muted text — slightly more readable */
.text-sm[style*="color: rgb(100"],
.text-sm[style*="color:#64748b"],
.text-\[\#8899aa\] {
  color: #8899aa !important;
}

/* ===== CARD VISUAL REFINEMENT ===== */

/* Cards: subtle border + shadow for depth */
.rounded-xl[style*="border"] {
  border-color: rgba(71, 85, 105, 0.4) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Project cards (Poro Manager, Olli-Viestit, Family Dashboard) */
.grid.grid-cols-3.gap-6 > .rounded-xl {
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
.grid.grid-cols-3.gap-6 > .rounded-xl:hover {
  border-color: rgba(102, 126, 234, 0.3) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* ===== SERVER INFO STRIP ===== */
#server-info-strip {
  border-color: rgba(71, 85, 105, 0.4) !important;
}

/* ===== TOP INFO GRID: fill full width when only one child ===== */
#top-info-grid:has(> :only-child) {
  grid-template-columns: 1fr !important;
}

/* ===== NAVBAR POLISH ===== */
.h-\[60px\] {
  border-bottom-color: rgba(71, 85, 105, 0.3) !important;
}

/* Bell icon hover effect */
.h-\[60px\] .relative[data-notif-attached] {
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s;
}
.h-\[60px\] .relative[data-notif-attached]:hover {
  background: rgba(102, 126, 234, 0.12);
}

/* ===== BOTTOM STATUS BAR ===== */
.h-\[50px\] {
  border-top-color: rgba(71, 85, 105, 0.3) !important;
}

/* ===== PROGRESS BARS — more rounded ===== */
.h-1\.5.rounded-full,
.h-2.rounded-full {
  border-radius: 999px !important;
}

/* ===== DONUT CHART LABELS ===== */
/* "Sufficient for X months" — better spacing */
.rounded-xl .flex.items-center.gap-1\.5.text-sm {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(71, 85, 105, 0.2);
}

/* ===== SSL STATUS / SERVICE ITEMS: cleaner rows ===== */
.flex.items-center.justify-between.py-2 {
  padding: 0.625rem 0 !important;
}

/* ===== TABLE IMPROVEMENTS ===== */
table th {
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.05em !important;
  color: #64748b !important;
  padding-bottom: 0.75rem !important;
}
table td {
  padding: 0.5rem 0.75rem !important;
}
table tr + tr {
  border-top: 1px solid rgba(71, 85, 105, 0.15);
}

/* ===== ALERT BANNER — integrate with card style ===== */
#alert-banner {
  margin-bottom: 1rem !important;
}

/* ===== CLIENTS PAGE: 20-column grid ===== */
.grid-cols-20 {
  grid-template-columns: repeat(20, minmax(0, 1fr));
}
@media (max-width: 1023px) {
  .grid-cols-20 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

/* ===== CLIENTS PAGE: column separators & stable rows ===== */
.client-row {
  min-height: 56px;
}
@media (min-width: 1024px) {
  .cell-sep {
    border-right: 1px solid rgba(51, 65, 85, 0.3);
  }
}

/* ===== CLIENTS PAGE: sticky column headers ===== */
#col-headers {
  position: sticky;
  top: 0;
  background: #0f172a;
  z-index: 10;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ===== CLIENTS PAGE: column header tooltips ===== */
.col-tip {
  position: relative;
  cursor: help;
}
.col-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  line-height: 1.5;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.col-tip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(71, 85, 105, 0.5);
  z-index: 51;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.col-tip:hover::after,
.col-tip:hover::before {
  opacity: 1;
}
/* Prevent tooltip overflow on left/right edges */
.col-tip:first-child::after { left: 0; transform: none; }
.col-tip:first-child::before { left: 16px; transform: none; }
.col-tip:last-child::after { left: auto; right: 0; transform: none; }
.col-tip:last-child::before { left: auto; right: 8px; transform: none; }
