:root {
  --main-bg: #1a1018;
  --glass-bg: rgba(38, 19, 32, 0.70);
  --glass-table: rgba(38, 19, 32, 0.87);
  --row-even: rgba(230, 24, 70, 0.09);     /* Gaiši bordo */
  --row-odd: rgba(255,255,255,0.02);       /* Tumšāks caurspīdīgums */
  --accent: #c8193a;       /* Tumši sarkans */
  --accent-light: #de4069; /* Gaišāks sarkans */
  --text: #f8e9ee;
  --header: #fff;
  --table-header: rgba(230, 24, 70, 0.15);
  --border: #2c1120;
  --input-bg: rgba(50, 20, 34, 0.95);
}

/* Fons */
body {
  background: linear-gradient(120deg, #1a1018 0%, #25121d 100%);
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  min-height: 100vh;
  padding: 40px 0;
}

.main-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

/* Filtru zona ar glass efektu */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 10px; /* Vertikāli 20px, horizontāli 10px */
  justify-content: center;
  align-items: center;
  margin-bottom: 38px;
  background: var(--glass-bg);
  border-radius: 22px;
  box-shadow: 0 8px 40px 0 #c8193a15;
  padding: 20px 16px;
  border: 1.5px solid var(--border);
  backdrop-filter: blur(14px);
}

/* Visi inputi - skaists stils */
input[type="text"], input[type="date"] {
  padding: 13px 19px;
  border: none;
  border-radius: 14px;
  font-size: 1.03rem;
  color: var(--text);
  background: var(--input-bg);
  box-shadow: 0 2px 10px rgba(200,25,58,0.12);
  transition: box-shadow 0.26s, background 0.18s;
}
input::placeholder {
  color: #c37a91;
  opacity: 0.89;
}
input:focus {
  background: rgba(230, 24, 70, 0.19);
  box-shadow: 0 0 0 2.5px #c8193a60;
  outline: none;
}

/* Tikai pogām - lielāks attālums pa labi */
.controls button {
  margin-right: 16px;
}

.controls button:last-of-type {
  margin-right: 0;
}

/* Pogas - tumši sarkanas ar efektu */
button {
  background: linear-gradient(100deg, var(--accent-light), var(--accent));
  color: var(--header);
  border: none;
  border-radius: 14px;
  font-weight: 600;
  padding: 13px 28px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 16px #c8193a22;
  transition: background 0.16s, transform 0.10s, box-shadow 0.16s;
  letter-spacing: 0.6px;
  backdrop-filter: blur(2px);
}
button:hover {
  background: linear-gradient(100deg, #a6122e, #c8193a);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 7px 26px #de406933;
}

/* Glass tabula tumšajā tonī ar strīpošanu */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--glass-table);
  box-shadow: 0 10px 54px #c8193a18;
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  margin-bottom: 30px;
}

th, td {
  padding: 18px 14px;
  text-align: center;
  border-bottom: 1.5px solid #2c1120;
  font-size: 1.08rem;
}
th {
  background: var(--table-header);
  color: var(--accent-light);
  font-weight: bold;
  cursor: pointer;
  border-bottom: 2px solid #c8193a27;
  letter-spacing: 0.65px;
  transition: background 0.18s;
}
th:hover {
  background: #1a1018;
}

tbody tr {
  transition: background 0.18s, box-shadow 0.15s;
}
tbody tr:nth-child(even) {
  background: var(--row-even);
}
tbody tr:nth-child(odd) {
  background: var(--row-odd);
}
tbody tr:hover {
  background: rgba(200, 25, 58, 0.13);
  box-shadow: 0 2px 18px #c8193a33;
}

td:last-child {
  min-width: 108px;
}

td[contenteditable="true"] {
  background-color: #2c1120;
  border-radius: 5px;
  outline: 1.5px dashed #de4069;
}

td.editing input {
  border: 1.5px solid var(--accent);
  background-color: #fff;
  color: #231015;
  border-radius: 8px;
}

/* Speciālas pogas klasēm (ja izmanto) */
.btn-add {
  background: linear-gradient(100deg, #4ec07d, #1d6c46);
}
.btn-add:hover {
  background: linear-gradient(100deg, #1d6c46, #4ec07d);
}
.btn-delete {
  background: linear-gradient(100deg, #ff4265, #c8193a);
}
.btn-delete:hover {
  background: linear-gradient(100deg, #c8193a, #ff4265);
}

/* Responsive */
@media (max-width: 900px) {
  .main-container {
    max-width: 99vw;
    padding: 0 3vw;
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 6px;
  }
  .controls button {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
  }
  .controls button:last-of-type {
    margin-bottom: 0;
  }
  table, thead, tbody, th, td, tr {
    font-size: 0.97rem;
  }
  th, td {
    padding: 10px 6px;
  }
}

/* Noņem apakšējo border pēdējai rindai */
table tr:last-child td {
  border-bottom: none;
}
