/* Kapitánský deník — webový portál */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sea-top:    #1580C5;
  --sea-mid:    #2AAEE5;
  --sea-bot:    #7EE0FF;
  --card-top:   #E8F4FB;
  --card-bot:   #A0CFE5;
  --text:       #1d1d1f;
  --text-dim:   #6e6e73;
  --accent:     #0A84FF;
  --danger:     #ff3b30;
  --success:    #34c759;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(180deg,
              var(--sea-top) 0%,
              var(--sea-mid) 50%,
              var(--sea-bot) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Header */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  padding-bottom: 20px;
}

header.site .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

header.site .logo svg {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

header.site h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

header.site nav a,
header.site nav span {
  color: white;
  text-decoration: none;
  margin-left: 14px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

header.site nav a:hover { opacity: 1; text-decoration: underline; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--card-top) 0%, var(--card-bot) 100%);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.card h2 { font-size: 22px; margin-bottom: 10px; letter-spacing: -0.2px; }
.card h3 { font-size: 18px; margin-bottom: 10px; letter-spacing: -0.1px; }
.card p  { color: var(--text); }

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.card-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.14); }

/* Section title — shown above cards on white text over blue */
.section-title {
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.9;
  margin: 22px 0 8px 4px;
}

/* Voyage list item */
.voyage-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.voyage-row .title { font-size: 18px; font-weight: 700; }
.voyage-row .meta  { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.voyage-row .ports { color: var(--text); font-size: 15px; margin-top: 2px; }

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(10,132,255,0.12);
  color: var(--accent);
}
.badge.active  { background: rgba(255,149,0,0.2); color: #e07500; }
.badge.paused  { background: rgba(255,149,0,0.2); color: #e07500; }
.badge.ended   { background: rgba(142,142,147,0.2); color: #6e6e73; }

/* Data table */
table.logbook {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

table.logbook th {
  background: #0A84FF;
  color: white;
  padding: 10px 8px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

table.logbook td {
  padding: 10px 8px;
  border-bottom: 1px solid #e5e5ea;
  color: var(--text);
}
table.logbook tr:last-child td { border-bottom: none; }
table.logbook tr:hover         { background: #f5faff; cursor: pointer; }
table.logbook td.num           { font-variant-numeric: tabular-nums; }
table.logbook td.dim           { color: var(--text-dim); }

/* Key-value grid for entry detail */
.kv-grid {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 8px 16px;
  font-size: 15px;
}
.kv-grid .k {
  color: var(--text-dim);
  font-weight: 600;
  padding: 6px 0;
}
.kv-grid .v {
  padding: 6px 0;
  font-variant-numeric: tabular-nums;
}

/* Photos */
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.photo {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.04);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.photo img { width: 100%; height: 220px; object-fit: cover; display: block; }
.photo .caption {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-dim);
  background: white;
}

/* Form */
form.auth {
  max-width: 420px;
  margin: 60px auto;
}

form.auth h2 { text-align: center; margin-bottom: 18px; }

form.auth .field { margin-bottom: 14px; }
form.auth label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
form.auth input[type=email],
form.auth input[type=password] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c6c6c8;
  border-radius: 10px;
  font-size: 16px;
  background: white;
  color: var(--text);
}
form.auth input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10,132,255,0.18);
}

button.primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}
button.primary:hover { background: #0070eb; }

a.back {
  color: white;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  opacity: 0.9;
}
a.back:hover { opacity: 1; text-decoration: underline; }

/* Error / info messages */
.msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.msg.error   { background: #ffe5e5; color: #b71c1c; border: 1px solid #ffcfcf; }
.msg.info    { background: #e5f1ff; color: #1a5ab5; border: 1px solid #cfe1ff; }
.msg.success { background: #e6f7e9; color: #2a7c3b; border: 1px solid #c5ebcd; }

/* Responsive */
@media (max-width: 720px) {
  .container { padding: 16px 12px; }
  header.site h1 { font-size: 20px; }
  table.logbook { font-size: 12px; }
  table.logbook th, table.logbook td { padding: 8px 6px; }
  .kv-grid { grid-template-columns: 1fr; gap: 2px; }
  .kv-grid .k { padding: 4px 0 0; }
  .kv-grid .v { padding: 0 0 6px; border-bottom: 1px solid rgba(0,0,0,0.05); }
}

/* Utility */
.hide-mobile { display: inline; }
@media (max-width: 720px) { .hide-mobile { display: none; } }

.dim { color: var(--text-dim); }
.mono { font-family: "SF Mono", Menlo, monospace; font-size: 13px; }
