/* Service Keys + Audit Log панели в /manage.
 * Полагаются на existing dark theme переменные из manage.css. */

.sk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    align-items: center;
}
.sk-toolbar .form-input {
    flex: 0 1 auto;
    min-width: 140px;
    max-width: 260px;
}

.sk-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.sk-status-active   { background: #1b3d2a; color: #4caf50; }
.sk-status-disabled { background: #3a3320; color: #ff9800; }
.sk-status-revoked  { background: #3d1b1b; color: #f44336; }

.sk-scope-cell {
    cursor: help;
    border-bottom: 1px dotted #555;
}

td.mono, .mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 12px; }

.audit-code {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 6px;
    font-weight: 600;
    font-family: monospace;
}
.audit-code.c2xx { background: #1b3d2a; color: #4caf50; }
.audit-code.c4xx { background: #3a3320; color: #ff9800; }
.audit-code.c5xx { background: #3d1b1b; color: #f44336; }

.audit-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
    gap: 8px;
}

/* SK detail modal table */
.sk-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}
.sk-detail-table th {
    text-align: left;
    color: #888;
    font-weight: 500;
    padding: 6px 12px 6px 0;
    width: 130px;
    vertical-align: top;
}
.sk-detail-table td {
    padding: 6px 0;
    color: #ddd;
    word-break: break-all;
}
.sk-detail-form { margin-top: 16px; }
.sk-detail-form .form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Reveal plaintext modal */
.sk-reveal-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #181818;
    border: 1px dashed #555;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 12px 0;
}
.sk-reveal-box code {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #4caf50;
    word-break: break-all;
}

/* Form-row utility (если ещё нет в manage.css) */
.tab-panel .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

/* btn-link для Open в таблице */
.btn-link {
    background: transparent;
    border: 1px solid #444;
    color: #8ab4f8;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.btn-link:hover { background: #2a2a2a; border-color: #666; }

/* Mobile: толбар уходит в столбик */
@media (max-width: 768px) {
    .sk-toolbar { flex-direction: column; align-items: stretch; }
    .sk-toolbar .form-input { min-width: 0; max-width: none; width: 100%; }
    .sk-detail-form .form-row { grid-template-columns: 1fr; }
}
