@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --app-bg: #f4f7fb;
    --app-border: #e7eef6;
    --app-muted: #6c7a89;
    --primary: #2f6cf6;
}

html, body {
    height: 100%;
}

body {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.bg-app {
    background: var(--app-bg);
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(47, 108, 246, 0.10);
    color: var(--primary);
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.card-kpi .display-6 {
    font-size: 2rem;
}

.kpi-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0,0,0,0.03);
}

.tabela-chaves thead th {
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--app-border);
}

.tabela-chaves tbody td {
    border-bottom: 1px solid var(--app-border);
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.token-badge {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(47, 108, 246, 0.15);
    color: var(--primary);
}

.token-text {
    letter-spacing: 0.5px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--app-border);
}

.status-ativo {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
    border-color: rgba(25, 135, 84, 0.22);
}

.status-expirado {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.22);
}

.status-desativado {
    background: rgba(108, 117, 125, 0.14);
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.22);
}

.status-online {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
    border-color: rgba(25, 135, 84, 0.22);
}

.status-offline {
    background: rgba(108, 117, 125, 0.14);
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.22);
}

.status-revogado {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.22);
}

.modal-header {
    border-bottom: 1px solid var(--app-border);
}

.modal-footer {
    border-top: 1px solid var(--app-border);
}

.modal-sucesso .modal-header {
    border-bottom: 0;
    padding-bottom: 0.25rem;
}

.modal-sucesso .sucesso-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.22);
    flex: 0 0 auto;
}

.modal-sucesso .tokens-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    padding: 14px;
}

.modal-sucesso .tokens-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.modal-sucesso .tokens-area {
    background: transparent;
    border: 0;
    padding: 0;
    resize: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.45;
}

.modal-sucesso .tokens-area:focus {
    box-shadow: none;
}

.modal-sucesso .btn-token-action {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
    font-weight: 600;
}

.modal-sucesso .btn-token-action:hover {
    background: rgba(0, 0, 0, 0.02);
}

.modal-sucesso .btn-concluir {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 700;
}
