/* heyde.schule - Modular CSS: 56_login_monitor.css
 * Corporate Design für Login-Monitor & Sicherheits-Audit ([LOGIN] / [LOGINS])
 * Keine Inline-Styles, volle Unterstützung für Glass/Brick-Ästhetik.
 */

.login-monitor-container {
    width: 100%;
    margin-bottom: 24px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.login-monitor-header-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.login-monitor-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-1, #f48024);
}

.login-monitor-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.login-locks-indicator-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #b91c1c;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-locks-indicator-badge:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

.pulse-dot-red {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red-anim 1.6s infinite;
}

@keyframes pulse-red-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Tabs Bar */
.login-monitor-tabs-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px 0 16px;
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    overflow-x: auto;
}

.login-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.login-tab-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #0f172a;
}

.login-tab-btn.active {
    background: #ffffff;
    border-color: #cbd5e1;
    color: var(--accent-1, #f48024);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
}

.tab-badge-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

/* Tab Panels */
.login-tab-panel {
    display: block;
}

.login-tab-panel.hidden {
    display: none !important;
}

/* Toolbar & Filterleiste */
.login-monitor-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.login-search-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.login-search-wrap {
    position: relative;
    flex: 1 1 300px;
    display: flex;
    align-items: center;
}

.login-search-icon {
    position: absolute;
    left: 12px;
    color: #64748b;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.login-search-input {
    width: 100%;
    height: 36px;
    padding: 0 32px 0 38px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    font-size: 0.92rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.login-search-input:focus {
    outline: none;
    border-color: var(--accent-1, #f48024);
    box-shadow: 0 0 0 3px rgba(244, 128, 36, 0.15);
}

.login-search-clear {
    position: absolute;
    right: 6px;
    width: 24px;
    height: 24px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
}

.login-search-clear:hover {
    color: #0f172a;
}

.login-toolbar-stats {
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.85rem;
}

.login-filters-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 4px;
}

.login-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-filter-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-filter-chips {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.login-chip {
    padding: 5px 11px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    font-size: 0.82rem;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.login-chip:hover {
    border-color: #94a3b8;
    color: #0f172a;
    background: #f1f5f9;
}

.login-chip.active {
    background: var(--accent-1, #f48024);
    border-color: var(--accent-1, #f48024);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(244, 128, 36, 0.3);
}

.login-chip.chip-success.active {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.login-chip.chip-failed.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.login-chip.chip-ignored.active {
    background: #64748b;
    border-color: #64748b;
    color: #ffffff;
}

.login-group-select {
    height: 32px;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #0f172a;
}

/* Tabellen-Bereich */
.login-table-area {
    position: relative;
    min-height: 240px;
}

.login-loading-indicator {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
}

.login-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
}

.login-th {
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    background: #f1f5f9;
    border-bottom: 2px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
}

.login-th:last-child {
    border-right: none;
}

.login-td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    font-size: 0.88rem;
    color: #1e293b;
    vertical-align: middle;
}

.login-td:last-child {
    border-right: none;
}

.login-row:hover .login-td {
    background: #f8fafc;
}

.login-row-locked .login-td {
    background: #fff1f2 !important;
}

/* User & Profile Cell */
.login-user-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.login-username-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #0f172a;
}

.login-subprofile-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #64748b;
}

.login-profile-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.login-profile-link:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

/* Action Icon Buttons */
.login-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.login-btn-icon:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Badges */
.login-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.login-status-badge.status-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.login-status-badge.status-failed {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-status-badge.status-ignored {
    background: #e2e8f0;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.login-status-badge.status-locked {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #dc2626;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.35);
}

.login-role-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.login-role-badge.role-admin {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.login-role-badge.role-teacher {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.login-role-badge.role-student {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.login-role-badge.role-guest {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Geo-Cell */
.login-geo-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.login-country-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 5px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #334155;
}

.login-ip-code {
    font-family: monospace, monospace;
    font-size: 0.78rem;
    color: #64748b;
    background: #f8fafc;
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: all;
}

.login-ip-code:hover {
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Pagination Bar */
.login-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.login-pagination-info {
    font-size: 0.85rem;
    color: #64748b;
}

.login-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-page-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 5px;
    font-size: 0.82rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.login-page-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.login-page-btn.active {
    background: var(--accent-1, #f48024);
    border-color: var(--accent-1, #f48024);
    color: #ffffff;
    font-weight: 700;
}

.login-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* TAB 2: AKTIVE SPERREN */
.login-locks-area {
    padding: 20px;
}

.login-empty-locks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 24px;
    text-align: center;
    color: #059669;
    background: #ecfdf5;
    border: 1px dashed #6ee7b7;
    border-radius: 8px;
}

.login-empty-locks-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #d1fae5;
    color: #10b981;
}

.login-locks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.login-lock-card {
    background: #ffffff;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
}

.login-lock-card:hover {
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15);
}

.lock-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lock-card-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #991b1b;
    font-size: 0.95rem;
}

.lock-remaining-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #fee2e2;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #b91c1c;
}

.lock-card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #475569;
}

.lock-card-details-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lock-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.lock-unlock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lock-unlock-btn:hover {
    background: #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* TAB 3: STATISTIKEN & GEO-AUDIT */
.login-stats-area {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.login-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-kpi-card.kpi-accent {
    border-top: 3px solid var(--accent-1, #f48024);
}

.login-kpi-card.kpi-success {
    border-top: 3px solid #10b981;
}

.login-kpi-card.kpi-danger {
    border-top: 3px solid #ef4444;
}

.login-kpi-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.login-kpi-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.login-kpi-sub {
    font-size: 0.78rem;
    color: #64748b;
}

/* Charts Grid */
.login-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .login-charts-grid {
        grid-template-columns: 1fr;
    }
}

.login-chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-chart-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-chart-container {
    width: 100%;
    min-height: 180px;
    position: relative;
}

/* SVG Timeline Histogram */
.login-timeline-svg {
    width: 100%;
    height: 180px;
}

.timeline-bar-bg {
    fill: #f1f5f9;
}

.timeline-bar-success {
    fill: #10b981;
    transition: all 0.2s ease;
}

.timeline-bar-failed {
    fill: #ef4444;
    transition: all 0.2s ease;
}

.timeline-bar-group:hover .timeline-bar-success {
    fill: #059669;
}

.timeline-bar-group:hover .timeline-bar-failed {
    fill: #dc2626;
}

.timeline-axis-text {
    font-size: 9px;
    fill: #64748b;
    text-anchor: middle;
}

/* Donut Chart & Legend */
.donut-chart-wrap {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
    flex-wrap: wrap;
}

.donut-svg {
    width: 150px;
    height: 150px;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
}

.donut-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
}

.donut-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* World Map Container */
.login-world-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-world-map-wrap {
    position: relative;
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    overflow: hidden;
}

.login-world-svg {
    width: 100%;
    height: auto;
    max-height: 420px;
    display: block;
}

.world-land-mass {
    fill: #e2e8f0;
    stroke: #cbd5e1;
    stroke-width: 0.75;
}

.world-land-active {
    fill: #fde68a;
    stroke: #f59e0b;
    stroke-width: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.world-land-active:hover {
    fill: #f59e0b;
}

.world-geo-pin {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.world-geo-pin:hover {
    transform: scale(1.4);
}

.login-countries-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.login-country-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
}

.login-country-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e293b;
}

.login-country-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.82rem;
    color: #64748b;
}

.login-country-stat strong {
    color: #0f172a;
    font-size: 0.92rem;
}

