/* =========================================================
   REEDEREI — Klassisches Interface
   ========================================================= */

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

:root {
  /* Farben */
  --bg-body:      #1a1410;         /* dunkler Hintergrund außerhalb */
  --bg-panel:     #d4c9a8;         /* Header-Panel Gold-Beige */
  --bg-panel-dark:#a8956a;
  --bg-content:   #f5f2e8;         /* Content hell-beige */
  --bg-white:     #ffffff;
  --bg-tab:       #e8e2d0;
  --border:       #8b7a5a;
  --border-light: #c9bfa3;

  --text:         #2a2418;
  --text-muted:   #6b5f48;
  --text-link:    #1a4f8a;
  --text-link-h:  #0a2f5a;

  --accent:       #c9a961;         /* Gold-Akzent */
  --accent-dark:  #8b6f2a;

  --green:        #4a7c3a;
  --red:          #a82a2a;
  --orange:       #d4881f;

  /* Panel-Schatten */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.15);
  --shadow-md: 0 2px 8px rgba(0,0,0,.25);
}

body {
  font-family: 'Segoe UI', 'Tahoma', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-body) url('../img/worldmap.jpg') center/cover fixed no-repeat;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

/* =========================================================
   LAYOUT-CONTAINER
   Alles (Header, Buttons, Main) läuft auf gleicher Breite
   ========================================================= */
.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px;
}

/* =========================================================
   HEADER-PANELS — halbtransparent grau
   ========================================================= */
.header-panels {
  display: grid;
  /* Verhältnis der Panel-Breiten (nicht fixe px!) */
  grid-template-columns: 1fr 1.2fr 1.05fr 0.95fr 1.05fr;
  gap: 6px;
  margin-bottom: 6px;
  width: 100%;
  box-sizing: border-box;
}

.panel {
  background: rgba(220, 216, 205, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(139, 122, 90, 0.55);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  position: relative;
  min-height: 84px;
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-weight: bold;
  font-size: 10px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(139,122,90,.35);
  padding-bottom: 4px;
}

/* ---- 1) Spieler ---- */
.player-panel {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
}
.player-panel .avatar {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(139,122,90,.7);
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.player-panel .info {
  flex: 1;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text);
}
.player-panel .info .name {
  font-weight: bold;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 1px;
}
.player-panel .info .company {
  color: var(--text-muted);
  font-style: italic;
  font-size: 11px;
  margin-bottom: 4px;
}

/* ---- 2) Bank ---- */
.kv-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 8px;
  font-size: 11px;
  flex: 1;
}
.kv-list .k { color: var(--text-muted); }
.kv-list .v { text-align: right; font-weight: bold; color: var(--text); }

/* ---- 3) Flotte ---- */
.fleet-panel .fleet-mini {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.fleet-mini-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(139,122,90,.3);
  border-radius: 3px;
  font-size: 11px;
}
.fleet-mini-item .ship-icon { font-size: 15px; line-height: 1; }
.fleet-mini-item .ship-name {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 4) Heimathafen ---- */
.center-panel {
  text-align: center;
  justify-content: center;
  align-items: center;
}
.port-panel .port-icon {
  font-size: 22px;
  line-height: 1;
  margin: 2px 0;
}
.port-panel .big {
  font-size: 15px;
  font-weight: bold;
  color: var(--text);
  line-height: 1.2;
}
.port-panel .port-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---- 5) Zeit + Icons ---- */
.time-panel {
  justify-content: space-between;
  padding: 8px 10px 6px;
}
.time-panel .clock {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: bold;
  color: var(--text);
  letter-spacing: 1px;
  line-height: 1.1;
  margin-top: 2px;
}
.time-panel .date {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.icon-row {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: auto;
}
.icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(139,122,90,.6);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  color: var(--text);
  text-decoration: none;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.icon-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,.25);
}
.icon-btn.close {
  background: linear-gradient(180deg, #e8a0a0 0%, #a82a2a 100%);
  color: #fff;
  border-color: #8b1a1a;
}
.icon-btn.close:hover {
  background: linear-gradient(180deg, #f0b0b0 0%, #c93a3a 100%);
}
.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #c93a3a;
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  border-radius: 8px;
  padding: 0 4px;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border: 1px solid #fff;
}

/* =========================================================
   ACTION-BUTTONS — Weiß/Hell
   ========================================================= */
.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.btn-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(139,122,90,.6);
  border-radius: 5px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: all .15s;
  font-family: inherit;
}
.btn-panel:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 7px rgba(0,0,0,.3);
}
.btn-panel:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .header-panels { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 720px) {
  .header-panels { grid-template-columns: 1fr 1fr; }
  .player-panel { grid-column: span 2; }
}
@media (max-width: 480px) {
  .header-panels { grid-template-columns: 1fr; }
  .player-panel { grid-column: span 1; }
}






/* =========================================================
   CONTENT-WRAPPER mit TABS
   ========================================================= */
.content-wrapper {
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
  background: transparent;
  position: relative;
  z-index: 1;
}

.tab {
  padding: 8px 20px;
  background: rgba(232, 226, 208, 0.85);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  top: 1px;
  transition: all .15s;
  font-weight: 500;
}
.tab:hover { background: rgba(240, 234, 216, 0.95); }
.tab.active {
  background: var(--bg-white);
  color: var(--text);
  font-weight: bold;
  border-color: var(--border);
  z-index: 2;
}

.tab-content {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  padding: 20px;
  min-height: 400px;
}

/* =========================================================
   CARDS (Inhalts-Boxen)
   ========================================================= */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

/* =========================================================
   ZWEI-SPALTEN-LAYOUT im Content
   ========================================================= */
.content-2col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}

/* =========================================================
   BUCHUNGS-LISTE (Monatliche Buchungen)
   ========================================================= */
.booking-list {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.booking {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}
.booking:last-child { border-bottom: none; }
.booking:hover { background: #faf8f2; }

.booking-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: linear-gradient(180deg, #f5f2e8 0%, #d9ceae 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.booking-text {
  font-size: 12px;
  line-height: 1.4;
}
.booking-text .label {
  font-weight: bold;
  color: var(--text);
  display: block;
}
.booking-text .desc {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
}

.booking-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* =========================================================
   NEWS-BOX (Wirtschaft / Ereignisse)
   ========================================================= */
.news-box {
  background: #eef4fb;
  border: 1px solid #b8c9dd;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
}
.news-box .entry {
  padding: 6px 0;
  border-bottom: 1px dashed #b8c9dd;
}
.news-box .entry:last-child { border-bottom: none; }
.news-box .tag {
  color: var(--text-link);
  font-weight: bold;
  margin-right: 4px;
}
.news-box .tag.red { color: var(--red); }
.news-box .tag.orange { color: var(--orange); }

/* =========================================================
   KALENDER
   ========================================================= */
.calendar {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 8px;
  font-size: 11px;
  margin-bottom: 14px;
}
.calendar table {
  width: 100%;
  border-collapse: collapse;
}
.calendar th {
  font-size: 10px;
  color: var(--text-muted);
  padding: 3px;
  text-align: center;
  font-weight: bold;
}
.calendar td {
  padding: 4px 2px;
  text-align: center;
  border-radius: 3px;
  cursor: pointer;
}
.calendar td:hover { background: #f0ead8; }
.calendar td.today {
  background: var(--accent);
  color: #fff;
  font-weight: bold;
}
.calendar td.other-month { color: #b8b0a0; }

/* Kalender-Toolbar oben rechts */
.calendar-toolbar {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.calendar-toolbar .dot {
  width: 20px; height: 20px;
  border-radius: 3px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}
.calendar-toolbar .dot.yellow { background: #e5c445; }
.calendar-toolbar .dot.red    { background: #c93a3a; }

/* =========================================================
   SCHIFFS-LISTE (Flotte)
   ========================================================= */
.fleet-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fleet-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-bottom: none;
}
.fleet-row:first-child { border-radius: 4px 4px 0 0; }
.fleet-row:last-child  { border-radius: 0 0 4px 4px; border-bottom: 1px solid var(--border-light); }
.fleet-row .ship-name {
  font-weight: bold;
  min-width: 180px;
  color: var(--text);
}
.fleet-row .ship-type {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
  min-width: 100px;
}
.fleet-row .ship-status {
  color: var(--text);
  font-size: 12px;
}

/* Rechte Spalte: Schiff-Auswahl */
.fleet-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fleet-sidebar .ship-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-bottom: none;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
}
.fleet-sidebar .ship-btn:first-child { border-radius: 4px 4px 0 0; }
.fleet-sidebar .ship-btn:last-child  { border-radius: 0 0 4px 4px; border-bottom: 1px solid var(--border-light); }
.fleet-sidebar .ship-btn:hover { background: #faf8f2; }
.fleet-sidebar .ship-btn.active {
  background: #e8e0c4;
  font-weight: bold;
}

/* =========================================================
   FORMULARE (im klassischen Stil)
   ========================================================= */
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: bold;
}
input[type=text],
input[type=password],
input[type=email],
input[type=number],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201,169,97,.25);
}

/* =========================================================
   BUTTONS (klassisch)
   ========================================================= */
.btn {
  display: inline-block;
  padding: 8px 18px;
  background: linear-gradient(180deg, #d9ceae 0%, #a8956a 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all .15s;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  background: linear-gradient(180deg, #ebe0bd 0%, #b8a880 100%);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); box-shadow: inset 0 2px 4px rgba(0,0,0,.2); }
.btn.block { display: block; width: 100%; }
.btn.primary {
  background: linear-gradient(180deg, #4a7c3a 0%, #2f5724 100%);
  color: #fff;
  border-color: #2f5724;
}
.btn.primary:hover {
  background: linear-gradient(180deg, #5a9048 0%, #3a6a2c 100%);
}
.btn.danger {
  background: linear-gradient(180deg, #c04a4a 0%, #8b1a1a 100%);
  color: #fff;
  border-color: #8b1a1a;
}
.btn.danger:hover {
  background: linear-gradient(180deg, #d95a5a 0%, #a82a2a 100%);
}

/* =========================================================
   ALERTS / FLASH
   ========================================================= */
.alert {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 13px;
  border: 1px solid;
}
.alert.error   { background: #fde8e8; border-color: #c04a4a; color: #8b1a1a; }
.alert.success { background: #e8f5e0; border-color: #4a7c3a; color: #2f5724; }
.alert.warning { background: #fdf3e0; border-color: #d4881f; color: #8b5510; }
.alert.info    { background: #e8f0fb; border-color: #4a6fa8; color: #1a4f8a; }

/* =========================================================
   AUTH-SEITEN (Login / Registrieren)
   ========================================================= */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: rgba(26,20,16,.65);
}

.auth-box {
  background: linear-gradient(180deg, #f5f2e8 0%, #e8e0c8 100%);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 32px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.auth-box h1 {
  color: var(--accent-dark);
  text-align: center;
  margin-bottom: 6px;
  font-size: 22px;
  text-shadow: 0 1px 0 #fff;
}

.auth-box .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 22px;
  font-size: 13px;
  font-style: italic;
}

.auth-links {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-links a { color: var(--text-link); text-decoration: none; font-weight: bold; }
.auth-links a:hover { text-decoration: underline; }

/* =========================================================
   TOPBAR / FOOTER (Dashboard)
   ========================================================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(180deg, #d9ceae 0%, #b8a880 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 8px;
}
.topbar h1 {
  font-size: 16px;
  color: var(--text);
}
.topbar .user-info {
  font-size: 12px;
  color: var(--text);
  display: flex;
  gap: 16px;
  align-items: center;
}
.topbar .user-info b { color: var(--text); }
.topbar .money { color: #4a7c3a; font-weight: bold; }
.topbar .user-info a {
  color: var(--red);
  text-decoration: none;
  font-weight: bold;
}
.topbar .user-info a:hover { text-decoration: underline; }

/* =========================================================
   FLEET / STATS (Dashboard-Kacheln)
   ========================================================= */
.grid { display: grid; gap: 12px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.stat {
  background: linear-gradient(180deg, #f5f2e8 0%, #e0d5b5 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
  text-align: center;
}
.stat .v {
  display: block;
  font-size: 22px;
  font-weight: bold;
  color: var(--accent-dark);
  margin-bottom: 2px;
}
.stat .l {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}

/* =========================================================
   FOOTER
   ========================================================= */
.app-footer {
  text-align: center;
  padding: 14px;
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255,255,255,.75);
  text-shadow: 0 1px 2px #000;
}
.app-footer a { color: #e5c445; text-decoration: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .header-panels { grid-template-columns: 1fr 1fr 1fr; }
  .content-2col  { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .header-panels { grid-template-columns: 1fr; }
  .app { padding: 6px; }
  .tab-content { padding: 12px; }
}
