/* ==== GLOBAL ==== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html,
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #0f0f1e;
    color: #ffffff;
    height: 100%;
}

#app {
    min-height: 100vh;
    background: #0f0f1e;
}

* {
    box-sizing: border-box;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.online {
    background: #00FF00;
    box-shadow: 0 0 8px #00FF00;
}

.offline {
    background: #FF4444;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ===================================== */
/* ============= LOGIN ================= */
/* ===================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(circle at top left, #2f80ed33, transparent 55%),
        radial-gradient(circle at bottom right, #bb6bd933, transparent 55%),
        #0f0f1e;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(16, 16, 32, 0.95);
    border-radius: 1.25rem;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.75rem;
}

.logo-container img {
    width: 56px;
    height: 56px;
    margin-bottom: 0.75rem;
}

.logo-text {
    font-size: 1.3rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-weight: 600;
    color: #ffffff;
}

.logo-subtitle {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #a3aed0;
}

h4.text-center {
    text-align: center;
    margin-bottom: 1.75rem;
    font-weight: 600;
}

/* ==== FORM ELEMENTE ==== */

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #a3aed0;
}

.form-control {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #252542;
    background: #12122a;
    padding: 0.65rem 0.85rem;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control::placeholder {
    color: #6f7395;
}

.form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.4);
    background: #151533;
}

.mb-3 {
    margin-bottom: 1.1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* ==== BUTTON ==== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 20px 32px rgba(79, 70, 229, 0.55);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.45);
}

.btn:disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

.w-100 {
    width: 100%;
}

/* ==== ALERT & VALIDATION ==== */

.alert {
    border-radius: 0.75rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    font-size: 0.85rem;
}

.validation-message {
    color: #fecaca;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ==== TEXT UNTER FORMULAR ==== */

.text-center {
    text-align: center;
}

.text-center p {
    font-size: 0.85rem;
    color: #a3aed0;
}

.text-center a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.text-center a:hover {
    text-decoration: underline;
}

/* ==== SPINNER ==== */

.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.me-2 {
    margin-right: 0.5rem;
}

/* ==== LOGIN RESPONSIVE ==== */

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .logo-text {
        letter-spacing: 0.25em;
    }
}

/* ===================================== */
/* ============ STRATEGIES ============= */
/* ===================================== */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px;
}

.strategy-card-wrapper {
    background: rgba(26, 26, 46, 0.95);
    border-radius: 24px;
    padding: 32px 32px 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-title {
    color: #00ffff;
    font-size: 32px;
    margin-bottom: 4px;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.strategy-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.strategy-filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.filter-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.filter-select {
    background: #12122a;
    border-radius: 999px;
    border: 1px solid #252542;
    padding: 6px 12px;
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
}

.filter-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.4);
}

/* GRID */

.strategies-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    grid-auto-rows: 1fr;
    gap: 24px;
}

/* STRATEGY CARD */

.strategy-card {
    background: #15152c;
    border-radius: 18px;
    padding: 20px 20px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;                 /* alle Karten gleich hoch im Grid */
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.strategy-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
    transform: translateY(-1px);
}

/* Top-Bereich: Titel + Badge */
.strategy-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Zeile mit Titel + Toggle */
.strategy-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    min-height: 2.6em;           /* Platz für ca. 2 Zeilen Titel */
}

/* Titel selbst: optisch auf 2 Zeilen begrenzt */
.strategy-name {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    max-height: 2.5em;           /* ~2 Zeilen */
    overflow: hidden;
}

/* eigene Zeile nur für den Typ-Badge */
.strategy-type-row {
    display: flex;
    align-items: center;
}

/* Badge */
.strategy-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.4);
    font-size: 0.75rem;
    color: #7dd3fc;
}

.strategy-description {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* immer am unteren Rand der Karte */
.strategy-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    gap: 12px;
    margin-top: auto;           /* drückt Meta nach unten */
}

/* TOGGLE */

.toggle-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.toggle-label input {
    display: none;
}

.toggle-custom {
    width: 40px;
    height: 22px;
    background: #3f3f5a;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
}

.toggle-custom::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: transform 0.2s ease;
}

.toggle-label input:checked + .toggle-custom {
    background: linear-gradient(135deg, #22c55e, #4ade80);
}

.toggle-label input:checked + .toggle-custom::after {
    transform: translateX(18px);
}

/* EMPTY STATE */

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-icon {
    font-size: 52px;
    margin-bottom: 10px;
}

/* STRATEGIES RESPONSIVE */

@media (max-width: 600px) {
    .strategy-card-wrapper {
        padding: 24px 18px 26px;
    }

    .strategy-header-row {
        align-items: flex-start;
    }
}
/* ===== MODAL CONFIRM ===== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.confirm-modal {
    background: #1e1e35;
    border-radius: 16px;
    padding: 24px 28px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}

.modal-title {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-text {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn-danger {
    background: #ef4444;
    color: white;
    border-radius: 8px;
    padding: 8px 16px;
}

.modal-btn-danger:hover {
    background: #dc2626;
}

.modal-btn-secondary {
    background: #374151;
    color: white;
    border-radius: 8px;
    padding: 8px 16px;
}

.modal-btn-secondary:hover {
    background: #4b5563;
}
