/* =========================================================
   SGKI Site Monitor – Frontend Styles
   Bewusst neutral gehalten, fügt sich in beliebige Themes ein.
   ========================================================= */

.sgki-fe {
    --sgki-bg:        #ffffff;
    --sgki-bg-alt:    #f9fafb;
    --sgki-border:    #e5e7eb;
    --sgki-text:      #111827;
    --sgki-muted:     #6b7280;
    --sgki-accent:    #2563eb;
    --sgki-accent-bg: #eff6ff;
    --sgki-radius:    8px;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--sgki-text);
    line-height: 1.5;
    max-width: 1100px;
    margin: 0 auto;
}

.sgki-fe-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #78350f;
    padding: 14px 18px;
    border-radius: 4px;
    margin: 16px 0;
    font-size: 14px;
}

/* --- Stats Cards --- */
.sgki-fe-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0 0 24px;
}

.sgki-fe-stat {
    background: var(--sgki-bg);
    border: 1px solid var(--sgki-border);
    border-radius: var(--sgki-radius);
    padding: 16px 18px;
}

.sgki-fe-stat-accent {
    background: var(--sgki-accent-bg);
    border-color: #bfdbfe;
}

.sgki-fe-stat-label {
    font-size: 12px;
    color: var(--sgki-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.sgki-fe-stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--sgki-text);
    margin-top: 6px;
}

.sgki-fe-stat-time {
    font-size: 16px;
    font-weight: 500;
}

/* --- Filter Bar --- */
.sgki-fe-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 20px;
    padding: 14px 16px;
    background: var(--sgki-bg-alt);
    border: 1px solid var(--sgki-border);
    border-radius: var(--sgki-radius);
}

.sgki-fe-filters input[type="search"],
.sgki-fe-filters select {
    padding: 8px 12px;
    border: 1px solid var(--sgki-border);
    border-radius: 6px;
    background: var(--sgki-bg);
    font-size: 14px;
    color: var(--sgki-text);
    line-height: 1.4;
    font-family: inherit;
}

.sgki-fe-filters input[type="search"] {
    flex: 1 1 220px;
    min-width: 180px;
}

.sgki-fe-filters select {
    cursor: pointer;
}

.sgki-fe-filters input[type="search"]:focus,
.sgki-fe-filters select:focus {
    outline: 2px solid var(--sgki-accent);
    outline-offset: 1px;
    border-color: var(--sgki-accent);
}

.sgki-fe-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--sgki-text);
    cursor: pointer;
    padding: 6px 8px;
}

.sgki-fe-checkbox input {
    margin: 0;
    cursor: pointer;
}

/* --- Change Cards --- */
.sgki-fe-list {
    display: grid;
    gap: 12px;
    min-height: 200px;
    position: relative;
}

.sgki-fe-list.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

.sgki-fe-card {
    background: var(--sgki-bg);
    border: 1px solid var(--sgki-border);
    border-radius: var(--sgki-radius);
    padding: 16px 18px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sgki-fe-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sgki-fe-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sgki-fe-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--sgki-muted);
}

.sgki-fe-quelle {
    font-weight: 500;
}

.sgki-fe-time::before {
    content: "•";
    margin-right: 6px;
    color: var(--sgki-border);
}

.sgki-fe-card-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    color: var(--sgki-text);
    line-height: 1.3;
}

.sgki-fe-card-summary {
    margin: 0 0 12px;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.sgki-fe-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sgki-fe-card-url {
    font-size: 13px;
    color: var(--sgki-muted);
    text-decoration: none;
    word-break: break-all;
}

.sgki-fe-card-url:hover {
    color: var(--sgki-accent);
    text-decoration: underline;
}

.sgki-fe-card-detail {
    padding: 6px 14px;
    background: var(--sgki-bg);
    color: var(--sgki-text);
    border: 1px solid var(--sgki-border);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.sgki-fe-card-detail:hover {
    background: var(--sgki-accent-bg);
    border-color: var(--sgki-accent);
    color: var(--sgki-accent);
}

/* --- Tags --- */
.sgki-fe-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #f3f4f6;
    color: #374151;
    white-space: nowrap;
}

.sgki-fe-tag-news      { background: #dbeafe; color: #1e40af; }
.sgki-fe-tag-product   { background: #dcfce7; color: #166534; }
.sgki-fe-tag-event     { background: #fef3c7; color: #92400e; }
.sgki-fe-tag-personnel { background: #ede9fe; color: #5b21b6; }
.sgki-fe-tag-minor     { background: #f3f4f6; color: #374151; }
.sgki-fe-tag-cosmetic  { background: #fee2e2; color: #991b1b; }
.sgki-fe-tag-pending   { background: #fef3c7; color: #92400e; }

/* --- Empty State --- */
.sgki-fe-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--sgki-muted);
    background: var(--sgki-bg-alt);
    border: 1px dashed var(--sgki-border);
    border-radius: var(--sgki-radius);
    font-size: 14px;
}

/* --- Pagination --- */
.sgki-fe-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 24px 0 0;
    font-size: 14px;
}

.sgki-fe-pagination button {
    padding: 8px 16px;
    background: var(--sgki-bg);
    color: var(--sgki-text);
    border: 1px solid var(--sgki-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.sgki-fe-pagination button:not(:disabled):hover {
    background: var(--sgki-accent-bg);
    border-color: var(--sgki-accent);
    color: var(--sgki-accent);
}

.sgki-fe-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sgki-fe-page-info {
    color: var(--sgki-muted);
    font-weight: 500;
}

.sgki-fe-current {
    color: var(--sgki-text);
    font-weight: 600;
}

/* --- Modal --- */
.sgki-fe-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sgki-fe-modal[hidden] {
    display: none;
}

.sgki-fe-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(2px);
}

.sgki-fe-modal-inner {
    position: relative;
    background: var(--sgki-bg);
    width: min(720px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.sgki-fe-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--sgki-muted);
    cursor: pointer;
    border-radius: 4px;
}

.sgki-fe-modal-close:hover {
    background: var(--sgki-bg-alt);
    color: var(--sgki-text);
}

.sgki-fe-modal-content h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--sgki-text);
}

.sgki-fe-modal-content .sgki-fe-modal-meta {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--sgki-muted);
}

.sgki-fe-modal-content .sgki-fe-modal-summary {
    margin: 16px 0;
    padding: 14px 16px;
    background: var(--sgki-accent-bg);
    border-left: 3px solid var(--sgki-accent);
    border-radius: 4px;
    font-size: 15px;
    color: #1e3a8a;
}

.sgki-fe-modal-content h4 {
    margin: 20px 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sgki-muted);
}

.sgki-fe-diff {
    background: var(--sgki-bg-alt);
    border: 1px solid var(--sgki-border);
    border-radius: 6px;
    padding: 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 360px;
    overflow-y: auto;
    color: #374151;
}

/* --- Mobile --- */
@media (max-width: 600px) {
    .sgki-fe-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .sgki-fe-stat-value {
        font-size: 22px;
    }
    .sgki-fe-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .sgki-fe-filters input[type="search"],
    .sgki-fe-filters select {
        width: 100%;
    }
    .sgki-fe-card-foot {
        flex-direction: column;
        align-items: flex-start;
    }
    .sgki-fe-modal-inner {
        padding: 20px;
    }
}
