/* ============================================================
   SailingApp – Maritime Theme
   Farben: Tiefseeblau · Meeresturquoise · Sonnen-Gold · Weiß
   ============================================================ */

/* Schriften (Nunito, Playfair Display) und Icons werden selbst gehostet: lib/fonts/fonts.css, lib/bootstrap-icons */

/* ── CSS-Variablen ── */
:root {
    --ocean-deep:    #0d2b45;
    --ocean-mid:     #1a4a6b;
    --ocean-bright:  #0077b6;
    --teal:          #00b4d8;
    --teal-light:    #caf0f8;
    --gold:          #f4a261;
    --coral:         #e76f51;
    --sand:          #fdf6ec;
    --sea-foam:      #e8f7fb;
    --text-dark:     #1a2e3b;
    --text-muted:    #5a7a8a;
    --card-shadow:   0 4px 20px rgba(0, 119, 182, 0.12);
    --card-shadow-hover: 0 8px 32px rgba(0, 119, 182, 0.22);
    --radius:        14px;
    --radius-sm:     8px;
}

/* ── Basis ── */
html, body {
    font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(160deg, #e8f4fd 0%, #d0eaf8 50%, #e8f7fb 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

/* ── Sidebar ── */
.sidebar {
    background: linear-gradient(180deg, var(--ocean-deep) 0%, var(--ocean-mid) 60%, #1b6ca8 100%);
    box-shadow: 4px 0 20px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
}

/* Wellendekor im Sidebar-Hintergrund */
.sidebar::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -60px;
    width: 280px;
    height: 280px;
    background: rgba(0, 180, 216, 0.08);
    border-radius: 50%;
    pointer-events: none;
}
.sidebar::after {
    content: '';
    position: absolute;
    top: 30%;
    right: -80px;
    width: 200px;
    height: 200px;
    background: rgba(0, 180, 216, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

/* ── Top-Bar ── */
.top-row {
    background: linear-gradient(90deg, var(--ocean-deep) 0%, var(--ocean-mid) 100%) !important;
    border-bottom: 2px solid var(--teal) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

/* ── Karten ── */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    background: rgba(255,255,255,0.95);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

/* Farbige Karten-Akzente (linker Streifen) */
.card.card-accent-teal   { border-left: 4px solid var(--teal) !important; }
.card.card-accent-gold   { border-left: 4px solid var(--gold) !important; }
.card.card-accent-coral  { border-left: 4px solid var(--coral) !important; }
.card.card-accent-ocean  { border-left: 4px solid var(--ocean-bright) !important; }

/* ── Hero-Banner (Dashboard) ── */
.hero-banner {
    background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-mid) 40%, #1b6ca8 70%, var(--teal) 100%);
    border-radius: var(--radius);
    color: white;
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 119, 182, 0.3);
}
.hero-banner::before {
    content: '⛵';
    position: absolute;
    right: 1.5rem;
    bottom: -0.5rem;
    font-size: 7rem;
    opacity: 0.12;
    line-height: 1;
}
/* Wellen-Animation unten */
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--teal), var(--gold), var(--teal));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.hero-banner h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.hero-banner .hero-meta {
    opacity: 0.85;
    font-size: 0.95rem;
}

/* ── Quick-Action Buttons ── */
.btn.btn-quickaction {
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.btn.btn-quickaction:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.btn.btn-quickaction:active {
    transform: translateY(0) scale(0.98);
}

/* ── Dashboard-Kacheln ── */
.dash-tile {
    border-radius: var(--radius);
    padding: 2rem 1rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    text-decoration: none !important;
}
.dash-tile:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 32px rgba(0,0,0,0.20);
    color: white;
}
.dash-tile::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
}
.dash-tile .tile-icon { font-size: 2.8rem; margin-bottom: 0.5rem; display: block; }
.dash-tile h5 { font-weight: 800; margin-bottom: 0.25rem; }
.dash-tile p  { font-size: 0.8rem; opacity: 0.85; margin: 0; }

.dash-tile-safety    { background: linear-gradient(135deg, #b8860b, var(--gold)); }
.dash-tile-departure { background: linear-gradient(135deg, var(--ocean-bright), var(--teal)); }
.dash-tile-quick     { background: linear-gradient(135deg, #1a7a4a, #27ae60); }
.dash-tile-logbook   { background: linear-gradient(135deg, #4a4a6a, #6c6c9e); }

/* ── Badges & Tags ── */
.badge-maritime {
    background: linear-gradient(90deg, var(--teal), var(--ocean-bright));
    color: white;
    border-radius: 20px;
    padding: 0.25em 0.75em;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ── Tabellen ── */
.table {
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.table thead.thead-maritime th {
    background: linear-gradient(90deg, var(--ocean-deep), var(--ocean-mid));
    color: white;
    font-weight: 700;
    border: none;
}

/* ── Alerts ── */
.alert {
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
}
.alert-success { border-left-color: #27ae60; background: #eafaf1; }
.alert-warning { border-left-color: var(--gold); background: #fef9ec; }
.alert-info    { border-left-color: var(--teal); background: var(--sea-foam); }
.alert-danger  { border-left-color: var(--coral); background: #fef0ed; }

/* ── Formular-Elemente ── */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: #c8dfe8;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.18);
}

/* ── Buttons ── */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.btn-primary {
    background: linear-gradient(135deg, var(--ocean-bright), var(--teal));
    border: none;
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #005f91, #0096b8);
    box-shadow: 0 4px 14px rgba(0, 119, 182, 0.4);
}

/* ── Lade-Animation ── */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}
.loading-progress circle {
    fill: none;
    stroke: #c8dfe8;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: var(--teal);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 800;
    inset: calc(20vh + 3.25rem) 0 auto;
    font-size: 1.8rem;
    color: var(--ocean-mid);
}
.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Wird geladen…");
}

/* ── Blazor-Fehler ── */
#blazor-error-ui {
    background: #fef0ed;
    border-top: 2px solid var(--coral);
    bottom: 0; left: 0;
    box-shadow: 0 -2px 12px rgba(231, 111, 81, 0.2);
    display: none;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Layout ── */
@media (min-width: 641px) {
    .page { flex-direction: row; }
    .sidebar { width: 260px; height: 100vh; position: sticky; top: 0; }
    .top-row { position: sticky; top: 0; z-index: 100; }
}

/* ── Wellentrenner ── */
.wave-divider {
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40'%3E%3Cpath d='M0,20 C150,40 350,0 600,20 C850,40 1050,0 1200,20 L1200,40 L0,40 Z' fill='%23e8f4fd'/%3E%3C/svg%3E") no-repeat center;
    background-size: cover;
    margin-bottom: 1rem;
}

/* ── Compass Picker ─────────────────────────────────────────── */
.compass-open-btn {
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.compass-open-btn:hover {
    background: #0077b6;
    color: white;
    border-color: #0077b6;
}

