/* ============================= */
/* Base + Tokens                 */
/* ============================= */
:root {
  --bg: #eef1f5;
  --text: #030712;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --card: #ffffff;
  --card-alt: #f4f4f4;
  --brand: #63a4b9;
  --brand-hover: #528a9c;
  --shadow: 0px 20px 55px rgba(41, 49, 50, 0.15);
  --radius: 30px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================= */
/* Header                        */
/* ============================= */
.header {
  position: fixed;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid #333;
  background-color: #333;
  color: #ccc;
}

.header-content {
  display: flex;
  align-items: center;
  height: 4.5rem;
  padding-left: 3rem;
  padding-right: 3rem;
  max-width: 1400px;
  margin: 0 auto; /* align with content-wrapper */
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  background: url('data:image/svg+xml,%3Csvg%20width%3D%2291%22%20height%3D%2214%22%20viewBox%3D%220%200%2091%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.6%22%3E%3Cpath%20d%3D%22M6.94498%203.50381L8.72929%207.75084L9.93678%206.51534L6.94498%203.50381Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M2.99949%2013.4959L12.944%203.51153L9.94447%200.5L0%2010.4844L2.99949%2013.4959Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M6.94498%203.51153L16.8895%2013.4959L19.8889%2010.4844L9.94447%200.5L6.94498%203.51153Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M31.2409%204.0675C31.5101%203.18721%2031.7408%202.43047%2031.9561%201.67372H32.0254C32.2561%202.44591%2032.4714%203.2181%2032.7945%204.10611L34.1096%208.37631H29.8719L31.2409%204.0675ZM30.8948%200.654437L26.8185%2013.2874H28.2875L29.4566%209.61181H34.5172L35.6863%2013.2874H37.2245L33.1252%200.654437H30.8948ZM45.0616%2013.3106H46.4998V1.95943H49.8377V0.654437H41.7237V1.93627H45.077L45.0616%2013.3106ZM56.9442%2013.3106H58.3824V0.654437H56.9442V13.3106ZM67.8731%206.93232C67.8731%203.00189%2069.2037%201.79727%2071.2495%201.79727C73.2953%201.79727%2074.6951%203.10999%2074.6951%207.06359C74.6951%2011.0172%2073.3876%2012.1986%2071.3033%2012.1986C69.2191%2012.1986%2067.8731%2010.8782%2067.8731%206.93232ZM76.164%206.93232C76.164%202.2992%2074.3336%200.5%2071.3495%200.5C68.3654%200.5%2066.3349%202.39186%2066.3349%207.06359C66.3349%2011.7353%2068.15%2013.4959%2071.1495%2013.4959C74.149%2013.4959%2076.1333%2011.604%2076.1333%206.93232H76.164ZM86.9315%2012.1986C85.7516%2012.2071%2084.609%2011.7845%2083.7166%2011.0095L82.8706%2012.16C83.9731%2013.0742%2085.3718%2013.5496%2086.8007%2013.4959C89.4926%2013.4959%2091%2011.9129%2091%209.9979C91%206.13696%2085.001%206.71611%2085.001%203.8204C85.001%202.66985%2085.8778%201.83588%2087.3545%201.83588C88.2512%201.82095%2089.1238%202.12761%2089.8156%202.70073L90.6924%201.58106C89.7652%200.860767%2088.6186%200.484312%2087.4468%200.515443C85.1856%200.515443%2083.5474%201.99032%2083.5474%203.90534C83.5474%207.88983%2089.5464%207.24119%2089.5464%2010.0828C89.4926%2011.2566%2088.5773%2012.1986%2086.8699%2012.1986H86.9315Z%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E') no-repeat right;
  width: 122px;
  height: 1.5rem;
  background-size: contain;
}

.header-title {
  font-size: 1.5rem;
  line-height: 1.75rem;
  font-weight: 300;
  letter-spacing: 1px;
}

/* ============================= */
/* Layout                        */
/* ============================= */
.main-container {
  display: flex;
  min-height: 100vh;
  padding-top: 4.5rem; /* offset header */
}

.content-wrapper {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  padding: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.device-grid {
  display: grid;
  /* packed from the left, without stretching */
  grid-template-columns: repeat(auto-fit, minmax(380px, 450px));
  gap: 2rem;
  justify-content: start;
}

/* ============================= */
/* Card primitives               */
/* ============================= */
.card {
  border-radius: var(--radius);
  background-color: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card__section { padding: 2rem; }

/* Device card specific */
.card--device { width: 100%; }

/* ============================= */
/* Device card content           */
/* ============================= */
.card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.5rem 0 1.5rem;
}

.card-title {
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}

.card-serial {
  font-weight: 300;
  margin-top: -1rem;
  letter-spacing: 1px;
}

.card-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  flex-grow: 1;
}

.card-image {
  max-height: 160px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
}

.card-content { padding: 2rem 1.5rem; text-align: center; }

/* Status row */
.status-row {
  display: none; /* hidden for now */
  /*display: flex; */
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: gray;
}

/* Info Box */
.card-info {
  background-color: var(--card-alt);
  border-radius: 0.5rem;
  margin: 0.5rem 2rem 0;
  font-size: 0.875rem;
  color: #374151;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #fff;
  padding: 0.8rem 1.25rem;
}

.info-row:last-child { 
  margin-bottom: 0; 
  border-bottom: none!important;
}

.info-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
}

.label { font-weight: 700; }

/* ============================= */
/* Buttons (shared)              */
/* ============================= */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  letter-spacing: 0.075em;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  height: 2.5rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  background-color: var(--brand);
  color: #fff;
  transition: background-color .15s ease-in-out, box-shadow .15s ease-in-out;
  box-shadow: 0 2px 6px rgba(99,164,185,.25);
}
.button:hover { background-color: var(--brand-hover); }
.button:disabled { pointer-events: none; opacity: .5; }
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99,164,185,.35);
}

/* ============================= */
/* Empty state (reuses card)     */
/* ============================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 2.5rem;
  margin: 1rem 0;
  color: var(--muted);
  background: #f9fafb;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-state .icon {
  width: 40px;
  height: 40px;
  color: var(--muted-2);
  margin-bottom: .25rem;
}

.empty-state h2 {
  margin: 0.25rem 0 0;
  font-size: 1.125rem;
  color: #111827;
}

.empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

.empty-actions { margin-top: 1rem; }

/* ============================= */
/* Mobile                        */
/* ============================= */
@media (max-width: 640px) {
 .main-container {
    display: block;
 }

  /* Smaller paddings */
  .header-content {
    height: 3.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .content-wrapper {
    padding: 1.5rem;
  }

  /* Remove grid (stack cards) */
  .device-grid {
    display: block;
  }
  .device-grid > * {
    width: 100%;
    max-width: 100%;
    margin-bottom: 2.5rem;
  }

  /* Smaller logo + title */
  .logo {
    width: 100px;
    height: 16px;
  }
  .header-title {
    font-size: 1.15rem;
    line-height: 1.5rem;
    letter-spacing: 0.5px;
  }
}
