:root {
  --bg: #03080f;
  --panel: #071321;
  --panel-2: #0a192b;
  --line: #214a86;
  --line-soft: #223246;
  --text: #ffffff;
  --muted: #9cc8ff;
  --link: #cfe8ff;
  --blue: #2f6df6;
  --cyan: #35bdf2;
  --field: #000521;
  --success-bg: #d5ffe1;
  --success-text: #005a24;
}

/* Üldine */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* Päis */
header {
  background: transparent;
  height: auto;
  min-height: auto;
  padding: 14px 34px 8px 34px;
  display: block;
  position: relative;
  color: var(--text);
  text-align: left;
}

header::after {
  display: none;
}

header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 2px 2px 0 #183d8f;
}

header p {
  margin: 5px 0 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}

/* Logi välja / hamburger */
.hamburger {
  position: absolute;
  top: 17px;
  right: 34px;
  background: #d7e8ff;
  color: #09235c;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  z-index: 20;
  transition: 0.2s ease;
}

.hamburger:hover {
  background: #ffffff;
  transform: none;
}

/* Ülemine menüü */
nav {
  background: transparent;
  padding: 0 34px 0 34px;
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}

nav a {
  margin: 0;
  padding: 7px 12px;
  background: #071321;
  color: var(--text);
  border: 1px solid #263a58;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  border-radius: 0;
  transition: 0.18s ease;
}

nav a:hover,
nav a.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--text);
}

/* Põhikonteiner */
.container {
  max-width: none;
  margin: 14px 34px 40px 34px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 0 22px rgba(0, 40, 90, 0.28);
}

/* Lingid */
a {
  color: var(--link);
}

a:hover {
  color: #ffffff;
}

/* Pealkirjad */
h1, h2, h3 {
  color: var(--text);
  font-weight: 900;
}

h2 {
  font-size: 24px;
  margin: 18px 0 12px 0;
}

h3 {
  font-size: 21px;
  margin: 18px 0 10px 0;
}

/* Artiklid / sisublokid */
article {
  background: transparent;
  color: var(--text);
  margin: 0 0 24px 0;
  padding: 0 0 18px 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--line-soft);
}

article h3 {
  margin-top: 0;
  color: var(--text);
  letter-spacing: 0;
}

article img {
  max-width: 100%;
  margin: 15px 0;
  border-radius: 6px;
}

/* Info read */
.info-row,
.form-row,
.detail-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 7px;
}

label,
.info-label,
.detail-label {
  color: var(--muted);
  font-size: 13px;
}

.info-value,
.detail-value {
  color: var(--text);
  font-size: 17px;
}

/* Vormid */
input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--blue);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 16px;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(53, 189, 242, 0.45);
}

/* Nupud */
button,
.btn,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  transition: 0.18s ease;
}

button:hover,
.btn:hover,
input[type="submit"]:hover {
  filter: brightness(1.12);
}

button.success,
.btn-success {
  background: var(--success-bg);
  color: var(--success-text);
}

/* Tabelid */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

th {
  color: var(--muted);
  font-weight: 800;
  background: #08182a;
}

/* Sidebar */
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  right: 0;
  background: var(--panel);
  overflow-y: auto;
  transition: 0.35s;
  padding-top: 60px;
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.75);
  z-index: 1000;
  border-left: 1px solid var(--line);
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

.sidebar form {
  padding: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.sidebar h2,
.sidebar h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 900;
}

.sidebar input,
.sidebar textarea,
.sidebar select,
.sidebar button {
  width: 100%;
  margin: 8px 0;
}

/* Galerii */
.gallery-block {
  margin: 20px 0;
  text-align: center;
}

.gallery-main img {
  max-width: 100%;
  max-height: 450px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.gallery-thumbs img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: 0.18s ease;
}

.gallery-thumbs img:hover {
  transform: scale(1.08);
  box-shadow: 0 0 8px rgba(47, 109, 246, 0.6);
}

/* Mobiil */
@media (max-width: 768px) {
  header {
    padding: 12px 14px 6px 14px;
  }

  header h1 {
    font-size: 24px;
  }

  .hamburger {
    top: 12px;
    right: 14px;
    font-size: 14px;
    padding: 7px 10px;
  }

  nav {
    padding: 0 14px;
    margin-top: 10px;
  }

  nav a {
    font-size: 12px;
    padding: 7px 9px;
  }

  .container {
    margin: 12px 14px 30px 14px;
    padding: 14px;
  }

  .info-row,
  .form-row,
  .detail-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}