/*
 * jacoach – Haupt-Stylesheet
 *
 * Farbwelt: Blau (Primär) mit Gelb (Akzent)
 * Angelehnt an SV Blau-Gelb Berlin
 */

/* ── Tailwind-ähnliche Utility-Klassen (Lightweight) ───────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-blue: #1a3a6b;
    --color-blue-light: #2b5a9e;
    --color-blue-dark: #0f2444;
    --color-yellow: #f5c518;
    --color-yellow-light: #ffe066;
    --color-yellow-dark: #d4a800;
    --color-white: #ffffff;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-red: #ef4444;
    --color-green: #22c55e;
    --color-orange: #f97316;

    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-gray-800);
    background: var(--color-gray-50);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ── Farb-Klassen ──────────────────────────────────────────────── */
.bg-jacoach-blue { background-color: var(--color-blue); }
.text-jacoach-blue { color: var(--color-blue); }
.bg-jacoach-yellow { background-color: var(--color-yellow); }
.text-jacoach-yellow { color: var(--color-yellow); }
.border-jacoach-blue { border-color: var(--color-blue); }
.border-jacoach-yellow { border-color: var(--color-yellow); }
.hover\:text-jacoach-yellow:hover { color: var(--color-yellow); }
.hover\:bg-jacoach-yellow:hover { background-color: var(--color-yellow); }
.hover\:bg-blue-dark:hover { background-color: var(--color-blue-dark); }

/* ── Typografie ─────────────────────────────────────────────────── */
h1, h2, h3 { color: var(--color-blue); }
h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1.5rem; }
h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }

/* ── Karten ─────────────────────────────────────────────────────── */
.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.card-header {
    border-bottom: 2px solid var(--color-yellow);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem; font-weight: 500;
    cursor: pointer; border: none; text-decoration: none;
    transition: all 0.15s ease;
}
.btn-primary {
    background: var(--color-blue);
    color: var(--color-white);
}
.btn-primary:hover { background: var(--color-blue-light); }
.btn-yellow {
    background: var(--color-yellow);
    color: var(--color-blue-dark);
}
.btn-yellow:hover { background: var(--color-yellow-dark); }
.btn-secondary {
    background: var(--color-gray-200);
    color: var(--color-gray-700);
}
.btn-secondary:hover { background: var(--color-gray-300); }
.btn-danger {
    background: var(--color-red);
    color: var(--color-white);
}
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.8rem; }
.btn-xs { padding: 0.15rem 0.5rem; font-size: 0.75rem; }

/* ── Formulare ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
    display: block; font-size: 0.875rem; font-weight: 500;
    color: var(--color-gray-700); margin-bottom: 0.25rem;
}
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem; transition: border-color 0.15s;
    background: var(--color-white);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-error { color: var(--color-red); font-size: 0.8rem; margin-top: 0.25rem; }
.form-hint { color: var(--color-gray-500); font-size: 0.8rem; margin-top: 0.25rem; }

/* ── Tabellen ───────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; padding: 0.75rem 0.5rem;
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    color: var(--color-gray-500);
    border-bottom: 2px solid var(--color-gray-200);
}
.table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--color-gray-100);
}
.table tr:hover { background: var(--color-gray-50); }

/* ── Flash-Nachrichten ──────────────────────────────────────────── */
.flash-message {
    position: relative; padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.flash-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
    display: inline-block; padding: 0.15rem 0.5rem;
    border-radius: 999px; font-size: 0.75rem; font-weight: 500;
}
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: var(--color-gray-200); color: var(--color-gray-600); }

/* ── Grid & Layout ──────────────────────────────────────────────── */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-gray-400 { color: var(--color-gray-400); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-green { color: var(--color-green); }
.text-red { color: var(--color-red); }
.text-orange { color: var(--color-orange); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.min-h-screen { min-height: 100vh; }
.relative { position: relative; }
.hidden { display: none; }
.object-cover { object-fit: cover; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ── Sterne-Bewertung ───────────────────────────────────────────── */
.star-rating { color: var(--color-yellow); font-size: 1.25rem; }
.star-rating-empty { color: var(--color-gray-300); }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 0.1rem; }
.star-input input { display: none; }
.star-input label {
    cursor: pointer; font-size: 1.5rem; color: var(--color-gray-300);
    transition: color 0.1s;
}
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--color-yellow); }

/* ── Mobile Optimierung ─────────────────────────────────────────── */
@media (max-width: 768px) {
    nav .container > div { flex-wrap: wrap; }
    nav .flex.items-center.gap-4 { gap: 0.5rem; font-size: 0.8rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    h1 { font-size: 1.35rem; }
}

/* ── Trainings-Timer ────────────────────────────────────────────── */
.timer-display {
    font-size: 2.5rem; font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--color-blue); text-align: center;
    padding: 1rem; background: var(--color-gray-100); border-radius: var(--radius);
}

/* ── Editor ─────────────────────────────────────────────────────── */
.editor-toolbar {
    display: flex; flex-wrap: wrap; gap: 0.25rem;
    padding: 0.5rem; background: var(--color-gray-100);
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid var(--color-gray-300); border-bottom: none;
}
.editor-toolbar button {
    padding: 0.35rem 0.6rem; font-size: 0.8rem;
    background: var(--color-white); border: 1px solid var(--color-gray-300);
    border-radius: 4px; cursor: pointer;
}
.editor-toolbar button:hover { background: var(--color-yellow-light); }
.editor-canvas { border: 1px solid var(--color-gray-300); background: #f0f8e8; }

/* ── Druckversion ───────────────────────────────────────────────── */
@media print {
    nav, footer, .no-print { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}