.stc-panel,
.stc-modal {
    --stc-primary: #2563eb;
    --stc-primary-dark: #1d4ed8;
    --stc-border: #dbe3ee;
    --stc-muted: #64748b;
    --stc-soft: #f8fafc;
    --stc-success: #15803d;
    color: #172033;
}

.stc-panel {
    background: #fff;
    border: 1px solid var(--stc-border);
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
    margin-block: 0 18px;
    padding: 18px;
}

.stc-panel__header,
.stc-entry__heading,
.stc-admin-item,
.stc-modal__header,
.stc-modal__footer,
.stc-receipt {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.stc-panel h3,
.stc-panel h4,
.stc-modal h3,
.stc-entry legend {
    margin: 0;
}

.stc-panel p,
.stc-modal p {
    color: var(--stc-muted);
    margin: 5px 0 0;
}

.stc-panel .fa-shield,
.stc-modal .fa-shield {
    color: var(--stc-primary);
}

.stc-receipts,
.stc-admin-items {
    border-top: 1px solid var(--stc-border);
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
}

.stc-receipt,
.stc-admin-item {
    background: var(--stc-soft);
    border-radius: 8px;
    padding: 10px 12px;
}

.stc-receipt .fa-check-circle {
    color: var(--stc-success);
}

.stc-receipt time {
    color: var(--stc-muted);
    margin-inline-start: auto;
}

.stc-badge {
    background: #e8eef8;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: 12px;
    gap: 6px;
    padding: 5px 9px;
    white-space: nowrap;
}

.stc-badge--locked {
    background: #fff3cd;
    color: #7c5700;
}

.stc-admin-item > div {
    display: grid;
    gap: 3px;
}

.stc-admin-item small {
    color: var(--stc-muted);
}

.stc-empty-state {
    color: var(--stc-muted);
    padding: 8px 2px;
}

.stc-new-ticket-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: flex;
    font-size: 15px;
    justify-content: space-between;
    padding: 0;
    text-align: start;
    width: 100%;
}

.stc-new-ticket-toggle > span {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.stc-new-ticket-body {
    border-top: 1px solid var(--stc-border);
    margin-top: 14px;
    padding-top: 14px;
}

.stc-security-note {
    background: #eff6ff;
    border-radius: 7px;
    color: #1e3a8a !important;
    font-size: 12px;
    padding: 9px 11px;
}

.stc-modal[hidden] {
    display: none !important;
}

.stc-modal {
    inset: 0;
    position: fixed;
    z-index: 10050;
}

.stc-modal__backdrop {
    background: rgba(15, 23, 42, .68);
    inset: 0;
    position: absolute;
}

.stc-modal__dialog {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
    inset-block-start: 5vh;
    inset-inline-start: 50%;
    max-height: 90vh;
    max-width: 760px;
    overflow: auto;
    padding: 20px;
    position: absolute;
    transform: translateX(-50%);
    width: calc(100% - 32px);
}

[dir="rtl"] .stc-modal__dialog {
    transform: translateX(50%);
}

.stc-modal__header {
    border-bottom: 1px solid var(--stc-border);
    margin-bottom: 18px;
    padding-bottom: 14px;
}

.stc-modal__footer {
    border-top: 1px solid var(--stc-border);
    margin-top: 18px;
    padding-top: 14px;
}

.stc-spacer {
    flex: 1;
}

.stc-modal-open {
    overflow: hidden;
}

.stc-icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    font-size: 22px;
    height: 36px;
    justify-content: center;
    min-width: 36px;
    padding: 0;
}

.stc-icon-button:hover,
.stc-icon-button:focus {
    background: #eef2f7;
    color: #0f172a;
}

.stc-entry {
    border: 1px solid var(--stc-border);
    border-radius: 10px;
    margin: 0 0 14px;
    padding: 14px;
}

.stc-entry legend {
    border: 0;
    font-size: 15px;
    font-weight: 700;
    padding: 0;
    width: auto;
}

.stc-grid {
    display: grid;
    gap: 13px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.stc-field {
    display: grid;
    font-weight: 600;
    gap: 6px;
    margin: 0;
}

.stc-field--wide {
    grid-column: 1 / -1;
}

.stc-field input,
.stc-field textarea,
.stc-reveal-field input,
.stc-reveal-field textarea {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    box-shadow: none;
    color: #0f172a;
    font-family: inherit;
    font-size: 14px;
    min-height: 40px;
    padding: 8px 10px;
    width: 100%;
}

.stc-field input:focus,
.stc-field textarea:focus,
.stc-reveal-field input:focus,
.stc-reveal-field textarea:focus {
    border-color: var(--stc-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    outline: 0;
}

.stc-input-action {
    align-items: stretch;
    display: flex;
    gap: 7px;
}

.stc-input-action > input,
.stc-input-action > textarea {
    flex: 1;
    min-width: 0;
}

.stc-reveal-fields {
    display: grid;
    gap: 13px;
}

.stc-reveal-field {
    display: grid;
    gap: 6px;
}

.stc-reveal-field > label {
    font-weight: 700;
    margin: 0;
}

.stc-reveal-label {
    background: var(--stc-soft);
    border-inline-start: 4px solid var(--stc-primary);
    margin: 0 0 15px;
    padding: 10px 12px;
}

.stc-reveal-status {
    color: var(--stc-muted);
    min-height: 20px;
}

.stc-copy-button {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
}

@media (max-width: 680px) {
    .stc-panel__header,
    .stc-modal__footer,
    .stc-receipt {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .stc-grid {
        grid-template-columns: 1fr;
    }

    .stc-field--wide {
        grid-column: auto;
    }

    .stc-spacer {
        display: none;
    }

    .stc-modal__footer .btn {
        flex: 1;
    }

    .stc-receipt time {
        margin-inline-start: 0;
    }
}
