:root {
  --primary: #0071e3;
  --bg-blur: rgba(255,255,255,0.18);
}

body {
  margin: 5px;
  padding: 0;
  min-height: 100vh;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  background: url('../img/icloud-bg.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
}

/* 🔹 Todas as divs recebem uma base */
div {
  padding: 6px;
  margin: 4px 0;
  border-radius: 8px;
  box-sizing: border-box;
}

/* 🔹 Classe base para edição */
.editable-div {
  min-height: 50px;
  padding: 12px;
  margin: 10px 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease-in-out;
}
.editable-div:hover {
  background: rgba(255,255,255,0.25);
  outline: 1px dashed var(--primary);
  cursor: pointer;
}

/* 🔹 Exemplos de personalização */
.box1 { background: rgba(0, 113, 227, 0.2); border: 1px solid var(--primary); }
.box2 { background: rgba(255, 255, 255, 0.15); border: 1px dashed #ccc; }
.box3 { background: rgba(0, 0, 0, 0.25); border: 1px solid #444; }

/* 🔹 Estrutura principal */
.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.central-card {
  background: var(--bg-blur);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 10px 10px 20px rgba(0,0,0,0.18);
  margin: 10px 10px;
  padding: 10px 30px;
  width: 50%;
  max-width: 1200px;
  min-width: 1150px; /* diminui o limite mínimo para tablets */
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1, h2, h3 {
  text-align: center;
  margin-bottom: 5px;
  font-weight: 500;
  color: #f1f1f1;
}

form {
  width: 100%;
  max-width: 1150px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

form label {
  align-self: flex-start;
  font-size: 12px;
  color: #eee;
  margin-top: 6px;
}

form input, form button, form select, form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.8);
  margin-bottom: 12px;
  font-size: 12px;
  color: #212529;
}

form button {
  background: var(--primary);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  margin-top: 5px;
  transition: background 0.2s;
}

form button:hover { background: #005bb5; }

nav {
  background: rgba(40,43,48,0.69);
  backdrop-filter: blur(22px);
  border-radius: 18px;
  box-shadow: 0 4px 180px rgba(0,0,0,0.19);
  margin: 5px;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  max-width: 1000px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(249,249,249,0.09);
  display: flex;
  align-items: center;
  gap: 7px;
}

nav a:hover { background: var(--primary); color: #fff; }

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
  font-size: 12px;
  color: #fff;
  margin-bottom: 20px;
  /* Dica: deixe 'auto' se precisa que o conteúdo influencie a largura.
     Use 'fixed' se quiser estabilidade de layout. */
  table-layout: auto;
}

table th, table td {
  padding: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  text-align: center;
}

/* Cabeçalho */
table th { background: rgba(20,20,22,0.16); }

/* 🔸 NOVO: Tamanhos individuais por célula (hooks por variável CSS) */
table td {
  /* Defina por célula via style="--td-w:120px; --td-h:40px" ou classes utilitárias abaixo */
  --td-w: auto;      /* exemplo: 120px, 20% */
  --td-min-w: auto;  /* exemplo: 80px */
  --td-max-w: none;  /* exemplo: 180px */
  --td-h: 20px;      /* exemplo: 40px */
  --td-min-h: auto;  /* exemplo: 24px */
  --td-max-h: none;  /* exemplo: 60px */

  width: var(--td-w);
  min-width: var(--td-min-w);
  max-width: var(--td-max-w);
  height: var(--td-h);
  min-height: var(--td-min-h);
  max-height: var(--td-max-h);

  box-sizing: border-box;
}

/* 🔸 Utilitários de largura (exemplos, adicione mais se precisar) */
.td-w-60  { --td-w: 60px; }
.td-w-80  { --td-w: 80px; }
.td-w-100 { --td-w: 100px; }
.td-w-120 { --td-w: 120px; }
.td-w-150 { --td-w: 150px; }
.td-w-25p { --td-w: 25%;  }
.td-w-33p { --td-w: 33.3333%; }
.td-w-50p { --td-w: 50%;  }

/* 🔸 Utilitários de altura */
.td-h-24 { --td-h: 24px; }
.td-h-32 { --td-h: 32px; }
.td-h-40 { --td-h: 40px; }
.td-h-48 { --td-h: 48px; }
.td-h-60 { --td-h: 60px; }

/* 🔸 Controle de quebra/overflow por célula */
.td-wrap     { white-space: normal; text-overflow: clip; }
.td-nowrap   { white-space: nowrap; }
.td-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 🔹 Responsividade progressiva */
@media (max-width: 1200px) {
  .central-card {
    width: 80%;
    min-width: auto;
    padding: 20px;
  }
}
@media (max-width: 932px) {
  .central-card {
    width: 95%;
    border-radius: 15px;
    padding: 15px;
  }
  nav a, table th, table td {
    font-size: 11px;
  }
}
@media (max-width: 1200px) {
  .central-card { width: 100%; border-radius: 0; padding: 10px; }
  form { max-width: 100%; }
  nav  { flex-direction: column; gap: 8px; }
}

::-webkit-scrollbar { width: 6px; background: rgba(44,44,54,0.18); }
::-webkit-scrollbar-thumb { background: rgba(10,10,25,0.28); border-radius: 10px; }
