body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  background: #000000;
  color: #f5f5f5;
  font-weight: 200;
}

p, li, label, input, button, h1, h2, h3 {
  font-weight: 200;
}

h3{
  margin: 10px;
  margin-left: 0;
}

.app {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

header h1 {
  margin-bottom: .25rem;
}

/* panely */
section {
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  background: #111111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .7);
}

/* inputy */
input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #333333;
  background: #050505;
  color: #f5f5f5;
  margin-bottom: 8px;
}

/* tlačítka – bílé na černém */
button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #ffffff;
  background: #000000;
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  background: #e5e5e5;
}

/* seznamy */
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

li + li {
  margin-top: 6px;
}

/* odkazy – čistě bílé */
a {
  color: #ffffff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* drobný text */
small {
  color: #9a9a9a;
}

.msg {
  margin-top: 4px;
  font-size: .9em;
  color: #cccccc;
}

/* grid projektů */
.projects ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.projects li {
  margin: 0;
}

/* karta projektu */
.project-card {
  background: #050505;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .7);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .9);
}

.project-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* náhled plánu */
.project-preview-wrap {
  width: 100%;
  border-radius: 8px;
  background: #000000;
  border: 1px solid #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  overflow: hidden;
}

.project-preview {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* placeholder když není PNG */
.project-preview.placeholder {
  width: 100%;
  text-align: center;
  font-size: .85rem;
  color: #9a9a9a;
  padding: 24px 6px;
}

.project-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.project-meta {
  font-size: .8rem;
  color: #b3b3b3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-actions {
  margin-top: 8px;
}

/* hlavní button (dřív zelený) – bílý přes celou šířku */
.btn-view {
  display: block;
  text-align: center;
  padding: 6px 8px;
  border-radius: 8px;
/*   background: #ffffff;
 */  color: #000000;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #ffffff;
  cursor: pointer;
}

.btn-view:hover {
  background: #e5e5e5;
}


.btn-link.primary {
  background: #000000;
  color: #ffffff;
  font-weight: 600;
  border-color: #ffffff;
}

.btn-link:hover {
  background: #111111;
  text-decoration: none;
}


/* skrytý select (kvůli přístupnosti ho neničíme display:none) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* grid malých kartiček šablon */
.template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

/* jedna kartička šablony */
.template-card {
  border-radius: 10px;
  border: 1px solid #333333;
  background: #050505;
  padding: 8px 10px;
  text-align: left;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  color: #f5f5f5;
}

/* používám <button>, takže zrušíme defaultní styl pro tlačítko */
.template-card {
  font-family: inherit;
}

/* název šablony */
.template-card .name {
  display: block;
  font-weight: 400;
}

/* ID šablony / technický název */
.template-card .id {
  display: block;
  font-size: 0.75rem;
  color: #9a9a9a;
  margin-top: 2px;
}

/* aktivně zvolená šablona */
.template-card.active {
  border-color: #ffffff;
  background: #ffffff;
  transform: translateY(-1px);
    color: #000000;

}


/* skrytý select – necháme ho kvůli formuláři, ale vizuálně schováme */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* menší grid kartiček šablon */
.template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* bylo ~160px */
  gap: 6px;                                                   /* menší mezera */
  margin-top: 6px;
}

/* menší kartička šablony */
.template-card {
  border-radius: 8px;
  border: 1px solid #333333;
  background: #050505;
  padding: 6px 8px;              /* méně paddingu */
  text-align: left;
  font-size: 0.75rem;            /* menší text */
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  color: #f5f5f5;
  font-family: inherit;
}

/* menší náhled */
.template-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;           /* nižší, užší obdélník */
  border-radius: 6px;
  background: #000000;
  border: 1px solid #333333;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.9rem;
}


.template-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* když se nepodaří načíst obrázek */
.template-thumb--empty {
  border-style: dashed;
}

/* název šablony – jen text, žádné ID */
.template-card .name {
  display: block;
  font-weight: 300;
}

/* aktivní šablona */
.template-card.active {
  border-color: #ffffff;
  background: #111111;
  transform: translateY(-1px);
  color: #ffffff;
}

