/* Keyboard Shortcuts settings page */

.sc-page .sc-body {
  padding: 16px 16px 32px;
}

.sc-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.sc-back {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #25b7a7;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

.sc-back svg { width: 16px; height: 16px; }
.sc-back:hover { background: #1a9e8f; }

.sc-nav-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.sc-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  padding: 18px 18px 24px;
  min-height: 420px;
}

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

.sc-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.sc-add-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #25b7a7;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 183, 167, .25);
  flex-shrink: 0;
}

.sc-add-btn:hover { background: #1a9e8f; }

.sc-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.sc-tab {
  border: 0;
  background: transparent;
  padding: 10px 2px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.sc-tab:hover { color: #1a9e8f; }

.sc-tab.is-active {
  color: #25b7a7;
  border-bottom-color: #25b7a7;
}

.sc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 280px;
  color: #94a3b8;
  text-align: center;
}

.sc-empty[hidden],
.sc-table-wrap[hidden] { display: none !important; }

.sc-empty__icon {
  width: 80px;
  height: 64px;
}

.sc-empty p {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
}

.sc-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.sc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sc-table thead th {
  text-align: left;
  padding: 10px 14px;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.sc-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.sc-table tbody tr:last-child td { border-bottom: 0; }

.sc-key-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

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

.sc-icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sc-icon-btn svg { width: 16px; height: 16px; }
.sc-icon-btn--del { color: #ef4444; }
.sc-icon-btn--del:hover { background: #fef2f2; }

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

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

.sc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}

.sc-modal__dialog {
  position: relative;
  width: min(480px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.sc-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.sc-modal__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.sc-modal__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sc-modal__close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.sc-modal__form {
  padding: 18px 20px 20px;
}

.sc-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.sc-modal__field label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.sc-req { color: #ef4444; }

.sc-modal__field select,
.sc-modal__field input[type="text"] {
  height: 40px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
}

.sc-modal__field select:focus,
.sc-modal__field input:focus {
  outline: none;
  border-color: #25b7a7;
  box-shadow: 0 0 0 2px rgba(37, 183, 167, .2);
}

.sc-modal__field select:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.sc-key-input {
  display: flex;
  align-items: stretch;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.sc-key-input:focus-within {
  border-color: #25b7a7;
  box-shadow: 0 0 0 2px rgba(37, 183, 167, .2);
}

.sc-key-input__prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: #f8fafc;
  border-right: 1px solid #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.sc-key-input input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  color: #1e293b;
  background: transparent;
}

.sc-key-input input:focus { outline: none; }

.sc-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.sc-btn {
  min-width: 88px;
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.sc-btn--ghost {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #334155;
}

.sc-btn--ghost:hover { background: #f8fafc; }

.sc-btn--primary {
  border: 1px solid #25b7a7;
  background: #25b7a7;
  color: #fff;
}

.sc-btn--primary:hover {
  background: #1a9e8f;
  border-color: #1a9e8f;
}

.sc-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.sc-toast {
  min-width: 220px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #1e293b;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
  pointer-events: auto;
}

.sc-toast strong {
  display: block;
  margin-bottom: 2px;
}

@media (max-width: 640px) {
  .sc-tabs { gap: 12px; }
  .sc-tab { font-size: 12px; }
}
