/* API Keys management page */

.ak-container { max-width: 1100px; margin: 24px auto; padding: 0 24px; }

.ak-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.ak-header h1 { font-size: 22px; font-weight: 600; margin: 0; }
.ak-header h1 i { margin-right: 8px; color: #4a6cf7; }
.ak-header-actions { display: flex; gap: 10px; align-items: center; }
.ak-header-actions a.ak-btn { text-decoration: none; }

.ak-info {
    background: #f0f4ff; border: 1px solid #d8e2ff; border-radius: 8px;
    padding: 12px 16px; margin-bottom: 20px; font-size: 14px; line-height: 1.5;
}
.ak-info i { color: #4a6cf7; margin-right: 6px; }
.ak-info code { background: #fff; padding: 1px 6px; border-radius: 4px; font-size: 13px; }

.ak-table-wrap { overflow-x: auto; background: #fff; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ak-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.ak-table th, .ak-table td { padding: 12px 14px; text-align: left;
    border-bottom: 1px solid #eef0f3; font-size: 14px; }
.ak-table th { background: #fafbfc; font-weight: 600; color: #555;
    text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.ak-table tbody tr:hover { background: #fbfcfd; }
.ak-empty { text-align: center; padding: 40px 0; color: #999; }
.ak-col-actions { width: 1%; white-space: nowrap; }

.ak-status-pill { display: inline-block; padding: 2px 10px; border-radius: 11px;
    font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.ak-status-pill.active { background: #e6f7ec; color: #1a8c4a; }
.ak-status-pill.inactive { background: #fdeaea; color: #c0392b; }

.ak-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
    border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500;
    transition: opacity .15s ease; }
.ak-btn:hover { opacity: .85; }
.ak-btn-primary { background: #4a6cf7; color: #fff; }
.ak-btn-ghost { background: #f1f3f5; color: #444; }
.ak-btn-danger { background: #e74c3c; color: #fff; }
.ak-btn-small { padding: 5px 10px; font-size: 12px; }

.ak-actions { display: flex; gap: 6px; }

/* Modal */
.ak-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.ak-modal.open { display: flex; }
.ak-modal-content { background: #fff; border-radius: 10px; width: 92%; max-width: 540px;
    box-shadow: 0 6px 30px rgba(0,0,0,.18); }
.ak-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #eef0f3;
}
.ak-modal-header h2 { font-size: 17px; margin: 0; font-weight: 600; }
.ak-modal-header h2 i { margin-right: 6px; color: #4a6cf7; }
.ak-close-btn {
    background: none; border: none; font-size: 24px; cursor: pointer;
    color: #888; padding: 0 8px; line-height: 1;
}
.ak-close-btn:hover { color: #333; }
.ak-modal-body { padding: 20px; }
.ak-modal-actions {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px;
}

.ak-form-group { margin-bottom: 14px; }
.ak-form-group label { display: block; font-size: 13px; font-weight: 500;
    margin-bottom: 5px; color: #444; }
.ak-form-group input, .ak-form-group textarea {
    width: 100%; padding: 8px 12px; border: 1px solid #d6d9de; border-radius: 6px;
    font-size: 14px; font-family: inherit; box-sizing: border-box;
}
.ak-form-group input:focus, .ak-form-group textarea:focus {
    outline: none; border-color: #4a6cf7; box-shadow: 0 0 0 3px rgba(74,108,247,.12);
}

/* Raw-key display modal */
.ak-warning {
    background: #fff8e6; border: 1px solid #ffe7a3; border-radius: 8px;
    padding: 12px 14px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.5;
}
.ak-warning i { color: #d68f00; margin-right: 6px; }
.ak-rawkey-row { display: flex; gap: 8px; margin-bottom: 12px; }
.ak-rawkey-row input {
    flex: 1; padding: 10px 12px; font-family: monospace; font-size: 13px;
    background: #f6f8fa; border: 1px solid #d6d9de; border-radius: 6px;
}
.ak-rawkey-meta { color: #666; font-size: 12.5px; margin-bottom: 6px; }

/* Toast */
.ak-toast {
    position: fixed; right: 20px; bottom: 20px;
    background: #2c3e50; color: #fff; padding: 12px 18px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2); font-size: 14px;
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
    z-index: 1100; max-width: 360px;
}
.ak-toast.visible { opacity: 1; }
.ak-toast.error { background: #c0392b; }

/* Mono utility for IDs / hashes */
.ak-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px; color: #555; }
