/* StarshipOS — Player Cards & Management CSS (CC_102) */

/* === GM Players Dashboard === */
.players-dashboard-layout { padding: 16px; }
.players-header { margin-bottom: 16px; }
.players-title { font-size: 1.6em; color: #00d4ff; }
.players-subtitle { font-size: 0.9em; color: #64748b; }
.players-count { font-size: 0.85em; color: #94a3b8; margin-top: 4px; }
.players-count a { color: #00d4ff; text-decoration: none; }
.players-count a:hover { text-decoration: underline; }

.players-columns {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

/* Add Player Form */
.players-add-panel { background: #111827; border: 1px solid #1e293b; border-radius: 8px; padding: 16px; }
.add-player-form .form-label { display: block; font-size: 0.8em; color: #94a3b8; margin: 8px 0 4px; }
.add-player-form .form-input,
.add-player-form .form-select {
    width: 100%; padding: 8px; background: #0f172a; color: #e2e8f0;
    border: 1px solid #334155; border-radius: 4px; font-family: inherit; font-size: 0.9em;
}
.add-player-form .btn-primary {
    width: 100%; margin-top: 12px; padding: 10px;
    background: #0ea5e9; color: white; border: none; border-radius: 4px;
    font-weight: bold; cursor: pointer; font-size: 0.95em;
}
.add-player-form .btn-primary:hover { background: #0284c7; }

/* Player Table */
.players-list-panel { background: #111827; border: 1px solid #1e293b; border-radius: 8px; padding: 16px; }
.player-table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
.player-table th { text-align: left; padding: 8px; color: #64748b; border-bottom: 1px solid #1e293b; }
.player-table td { padding: 8px; border-bottom: 1px solid #0f172a; }
.player-deactivated { opacity: 0.5; }

.station-badge {
    display: inline-block; padding: 2px 8px; border-radius: 3px;
    background: #1e293b; color: #fbbf24; font-size: 0.85em; font-weight: bold;
}

.status-indicator {
    display: inline-block; padding: 2px 8px; border-radius: 3px;
    font-size: 0.8em; font-weight: bold;
}
.status-registered { background: #334155; color: #94a3b8; }
.status-active { background: #065f46; color: #34d399; }
.status-disconnected { background: #7f1d1d; color: #fca5a5; }
.status-deactivated { background: #1e1e1e; color: #525252; }

.crew-link-badge {
    display: inline-block; padding: 2px 8px; border-radius: 3px;
    background: #1e3a5f; color: #38bdf8; font-size: 0.85em; font-weight: bold;
}

.action-buttons { white-space: nowrap; }
.btn-sm {
    display: inline-block; padding: 4px 8px; margin: 0 2px;
    border: 1px solid #334155; border-radius: 4px; background: transparent;
    color: #c8d6e5; cursor: pointer; font-size: 0.9em; text-decoration: none;
}
.btn-sm:hover { background: #1e293b; }
.btn-danger:hover { border-color: #ef4444; }
.btn-warning:hover { border-color: #f59e0b; }
.btn-info:hover { border-color: #0ea5e9; }
.btn-outline { border-color: #475569; }

.players-empty { color: #64748b; font-style: italic; padding: 16px; }

/* === Player Status Grid === */
.player-status-layout { padding: 16px; }
.status-header { margin-bottom: 16px; }
.status-title { font-size: 1.6em; color: #00d4ff; }
.status-subtitle { font-size: 0.9em; color: #64748b; }
.status-header a { color: #00d4ff; text-decoration: none; font-size: 0.85em; }

.player-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.player-status-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border-radius: 8px;
    background: #111827; border: 1px solid #1e293b;
}
.status-card-indicator {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.indicator-registered { background: #64748b; }
.indicator-active { background: #34d399; box-shadow: 0 0 8px #34d399; }
.indicator-disconnected { background: #ef4444; animation: pulse-red 1.5s ease-in-out infinite; }
.indicator-deactivated { background: #1e1e1e; }

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-card-content { display: flex; flex-direction: column; gap: 2px; }
.status-card-name { font-weight: bold; font-size: 0.95em; }
.status-card-character { font-size: 0.8em; color: #94a3b8; font-style: italic; }
.status-card-station { font-size: 0.8em; color: #fbbf24; }
.status-card-status { font-size: 0.75em; color: #64748b; }

.status-empty { color: #64748b; font-style: italic; }

/* Panel Title (shared) */
.panel-title { font-size: 1.1em; color: #e2e8f0; margin-bottom: 12px; }

/* === Crew Management Card Grid (CC_043) === */
.form-hint { font-size: 0.82em; color: #64748b; margin-bottom: 12px; font-style: italic; }

.player-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.player-card {
    background: #0f172a; border: 1px solid #1e293b; border-radius: 8px;
    padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.player-card.status-inactive { opacity: 0.65; }
.player-card.status-draft { border-color: #334155; }

.player-card-header {
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
    border-bottom: 1px solid #1e293b; padding-bottom: 8px;
}
.player-card-rank { font-size: 0.8em; color: #94a3b8; font-weight: bold; }
.player-card-role {
    font-size: 0.85em; color: #00d4ff; font-weight: bold;
    background: #0c2d4a; padding: 1px 6px; border-radius: 3px;
}

.player-card-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.player-card-field { display: flex; gap: 6px; font-size: 0.82em; }
.field-label { color: #64748b; min-width: 60px; flex-shrink: 0; }
.field-value { color: #e2e8f0; word-break: break-word; }
.field-id { color: #94a3b8; font-family: monospace; font-size: 0.85em; word-break: break-all; }
.field-unlinked { color: #475569; font-style: italic; }

.player-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; border-top: 1px solid #1e293b; padding-top: 8px; }

.crew-empty-state { color: #64748b; font-style: italic; padding: 20px; text-align: center; }

.crew-status-badge {
    margin-left: auto; padding: 2px 8px; border-radius: 3px;
    font-size: 0.75em; font-weight: bold; text-transform: uppercase;
}
.crew-status-active { background: #065f46; color: #34d399; }
.crew-status-inactive { background: #1f2937; color: #6b7280; }
.crew-status-draft { background: #1e3a5f; color: #38bdf8; }
.crew-status-kia { background: #7f1d1d; color: #fca5a5; }
.crew-status-missing { background: #78350f; color: #fcd34d; }

.player-link-badge {
    display: inline-block; padding: 2px 8px; border-radius: 3px;
    background: #1a3d2e; color: #34d399; font-size: 0.82em; font-weight: bold;
}

/* ── Besetzungsuebersicht (Stationen mit fester Postenliste) ───────────── */

.players-roster-panel {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid var(--border-color, #2a3a4a);
    border-radius: 6px;
    background: var(--bg-secondary, #0f1822);
}

.roster-flight-badge {
    margin-left: 0.6rem;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.roster-flight-badge--ok {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.roster-flight-badge--warn {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fcd34d;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.roster-station {
    border: 1px solid var(--border-color, #2a3a4a);
    border-left-width: 3px;
    border-radius: 4px;
    padding: 0.55rem 0.65rem;
    background: var(--bg-primary, #0b131c);
}

.roster-station--ok { border-left-color: rgba(16, 185, 129, 0.65); }
.roster-station--warn { border-left-color: rgba(245, 158, 11, 0.7); }

.roster-station-head {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.roster-station-name {
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
}

.roster-station-essential { color: #7dd3fc; }

.roster-station-ratio {
    margin-left: auto;
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
}

.roster-station--ok .roster-station-ratio { color: #6ee7b7; }
.roster-station--warn .roster-station-ratio { color: #fcd34d; }

.roster-station-min {
    font-size: 0.68rem;
    color: var(--text-muted, #7a8a99);
    margin-bottom: 0.35rem;
}

.roster-slot-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.roster-slot {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 2px 0;
    font-size: 0.74rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.roster-slot:last-child { border-bottom: none; }

.roster-slot-label { color: var(--text-muted, #7a8a99); }

.roster-slot-person {
    margin-left: auto;
    color: var(--text-primary, #e2e8f0);
}

.roster-slot--free .roster-slot-person {
    color: var(--text-muted, #7a8a99);
    font-style: italic;
}

.roster-slot-source {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7dd3fc;
}

.roster-overflow {
    margin: 0.4rem 0 0;
    font-size: 0.7rem;
    color: #fcd34d;
}

/* Klassenwahl und Kojen ueber der Besetzung. */
.roster-class-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
}

.roster-berths {
    margin-left: auto;
    color: #7dd3fc;
}

.roster-berths--warn {
    color: #fcd34d;
}

.roster-passengers {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: #cbd5e1;
}

/* Posten-Badge in der Spielerliste. */
.slot-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    border: 1px solid rgba(125, 211, 252, 0.4);
    color: #7dd3fc;
    background: rgba(125, 211, 252, 0.08);
}

.slot-badge--auto {
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--text-muted, #7a8a99);
    background: transparent;
    font-style: italic;
}
