/* ----------------------- 01. Khung nội dung trang Linked Account ----------------------- */
.container-linked-account {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  max-width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-top: 30px;
  box-sizing: border-box;
}

.la-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

/* ----------------------- 02. Nút đề xuất nền tảng ----------------------- */
.la-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.la-platform-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.la-platform-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.la-platform-btn:hover {
  background-color: #f7f8ff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.la-platform-btn.facebook:hover { border-color: #1877f2; }
.la-platform-btn.youtube:hover  { border-color: #ff0000; }
.la-platform-btn.twitch:hover   { border-color: #9147ff; }
.la-platform-btn.shopee:hover   { border-color: #ee4d2d; }

/* ----------------------- 03. Danh sách tài khoản đã liên kết ----------------------- */
.la-usage {
  color: #666;
  font-weight: 400;
}

.la-usage.full {
  color: #d93025;
}

.la-account-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.la-account {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid #f0f0f0;
}

.la-account:last-child {
  border-bottom: none;
}

.la-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.la-avatar > img,
.la-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.la-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e8eaf6;
  color: #3f51b5;
  font-weight: 600;
  font-size: 18px;
}

.la-avatar .la-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fff;
  padding: 2px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px #eee;
}

.la-account-info {
  flex: 1;
  min-width: 0;
}

.la-account-name {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.la-account-meta {
  font-size: 13px;
  color: #888;
}

.la-account-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.la-open-btn {
  padding: 6px 14px;
  border: 1px solid #4a5cf0;
  border-radius: 6px;
  background-color: #fff;
  color: #4a5cf0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}

.la-open-btn:hover {
  background-color: #eef0fe;
}

.la-open-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.la-remove-btn {
  padding: 6px 14px;
  border: 1px solid #e57373;
  border-radius: 6px;
  background-color: #fff;
  color: #d32f2f;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}

.la-remove-btn:hover {
  background-color: #fdecea;
}

/* Chưa có tài khoản */
.no-accounts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin: 24px 0;
}

.placeholder-img {
  width: 140px;
  height: auto;
  opacity: 0.8;
}

.no-accounts p {
  margin: 0;
  font-size: 14px;
  color: #888;
}

/* Link quản lý ứng dụng */
.manage-links p {
  margin: 4px 0;
  font-size: 14px;
  color: #555;
}

.manage-links a {
  text-decoration: none;
  color: #3f51b5;
}

.manage-links a:hover {
  text-decoration: underline;
}

/* ----------------------- 04. Modal ----------------------- */
.la-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 16px;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 20000; /* Trên header (z-index 10000) */
  overflow-y: auto;
}

.la-modal-overlay.open {
  display: flex;
}

.la-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  background-color: #fff;
  border-radius: 10px;
  padding: 22px 24px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.la-modal h3 {
  margin: 0 0 18px;
  font-size: 20px;
  color: #222;
}

.la-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}

.la-modal-close:hover {
  color: #333;
}

.la-modal p {
  margin: 0 0 14px;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.la-modal .la-warning {
  color: #d32f2f;
}

.la-modal a {
  color: #3f51b5;
}

/* Tabs trong modal */
.la-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 14px;
}

.la-tab {
  padding: 8px 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 14px;
  font-family: inherit;
  color: #555;
  cursor: pointer;
}

.la-tab.active {
  color: #3f51b5;
  border-bottom-color: #3f51b5;
}

.la-tab-panel {
  display: none;
}

.la-tab-panel.active {
  display: block;
}

/* Form trong modal */
.la-field {
  margin-bottom: 14px;
}

.la-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #333;
}

.la-field input,
.la-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.la-field textarea {
  min-height: 110px;
  resize: vertical;
}

.la-field input:focus,
.la-field textarea:focus {
  outline: none;
  border-color: #3f51b5;
}

.la-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: none;
  border-radius: 6px;
  background-color: #4a5cf0;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}

.la-primary-btn:hover {
  background-color: #3846d4;
}

.la-primary-btn:disabled {
  background-color: #a9b1f5;
  cursor: not-allowed;
}

.la-primary-btn.danger {
  background-color: #d32f2f;
}

.la-primary-btn.danger:hover {
  background-color: #b71c1c;
}

.la-secondary-btn {
  padding: 9px 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.la-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.la-modal-actions.center {
  justify-content: center;
}

/* ----------------------- 05. Thông báo nhanh (toast) ----------------------- */
.la-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20001;
}

.la-toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 6px;
  background-color: #323232;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: la-toast-in 0.2s ease-out;
}

.la-toast.success { background-color: #2e7d32; }
.la-toast.error   { background-color: #c62828; }

@keyframes la-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------- 06. Màn hình nhỏ ----------------------- */
@media (max-width: 600px) {
  .container-linked-account {
    padding: 16px;
  }

  .la-platforms {
    grid-template-columns: 1fr 1fr;
  }
}
