/* -- Profile page styles -- */

.page-header {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.page-header .eyebrow {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 4px;
}
.page-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--strong);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

/* not signed in */
.profile-unsigned {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 32px;
  background: var(--s1);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}
.profile-google-btn {
  font-size: 0.95rem;
  min-height: 54px;
  padding: 8px 18px 8px 10px;
}

/* avatar card */
.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--s1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  margin-bottom: 20px;
}
.profile-avatar {
  border-radius: 50%;
  border: 2px solid var(--border2);
  object-fit: cover;
  flex-shrink: 0;
}
.profile-display-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--strong);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.profile-user-email {
  font-size: 0.8rem;
  color: var(--muted);
}

/* detail sections */
.profile-section {
  background: var(--s1);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.profile-section-title {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
  padding: 9px 16px;
  background: var(--s2);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}

.profile-field {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.profile-field:last-child { border-bottom: none; }
.profile-field-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.profile-field-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text);
  flex-wrap: wrap;
}
.profile-field-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.profile-select {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 5px 10px;
  min-width: 180px;
}
.profile-select:focus { outline: none; border-color: var(--accent); }

.profile-textarea {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.78rem;
  font-family: var(--mono);
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.45;
}
.profile-textarea:focus { outline: none; border-color: var(--accent); }

.profile-parse-btn,
.profile-clear-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  background: none;
  border: 1px solid var(--border2);
  color: var(--text);
  cursor: pointer;
  transition: background .1s, border-color .1s, color .1s;
}
.profile-parse-btn { border-color: var(--accent); color: var(--accent); }
.profile-parse-btn:hover { background: rgba(74,159,208,0.12); }
.profile-clear-btn:hover { color: #e07070; border-color: #c85050; }

.profile-uid {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(74,159,208,0.07);
  border: 1px solid rgba(74,159,208,0.2);
  padding: 3px 8px;
  word-break: break-all;
}

.profile-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 0.72rem;
  font-family: inherit;
  padding: 3px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color .1s, border-color .1s;
}
.profile-copy:hover { color: var(--accent); border-color: var(--accent); }
.profile-copy.copied { color: var(--green); border-color: var(--green); }

.profile-provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(66,133,244,0.1);
  border: 1px solid rgba(66,133,244,0.3);
  color: #7ab3f7;
}

/* danger zone */
.profile-section-danger .profile-section-title {
  color: #c85050;
  border-left-color: #c85050;
}
.profile-danger-note {
  padding: 12px 16px 4px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.profile-signout-btn {
  margin: 8px 16px 16px;
  padding: 8px 20px;
  background: none;
  border: 1px solid rgba(200,80,80,0.4);
  color: #c85050;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .1s, border-color .1s, color .1s;
}
.profile-signout-btn:hover { background: rgba(200,80,80,0.1); border-color: #c85050; color: #e07070; }

.profile-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.profile-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.profile-toggle-track {
  width: 36px;
  height: 20px;
  background: var(--border2);
  border-radius: 999px;
  transition: background .15s;
  position: relative;
}
.profile-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
}
.profile-toggle input:checked + .profile-toggle-track { background: var(--accent); }
.profile-toggle input:checked + .profile-toggle-track::after { transform: translateX(16px); }

@media (max-width: 640px) {
  .profile-card { flex-direction: column; align-items: flex-start; }
  .profile-uid { word-break: break-all; }
}

.profile-refresh-btn {
  font-size: 0.7rem;
  font-family: inherit;
  background: none;
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 2px 10px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.profile-refresh-btn:hover { color: var(--accent); border-color: var(--accent); }

.profile-tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.profile-tab-btn {
  font-size: 0.7rem;
  font-family: inherit;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 3px 10px;
  cursor: pointer;
}
.profile-tab-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(74,159,208,0.1);
}
.profile-tab-panel { display: none; }
.profile-tab-panel.active { display: block; }

.profile-systems-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.profile-systems-table th,
.profile-systems-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.profile-systems-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.profile-systems-table tbody tr:last-child td { border-bottom: none; }
.profile-systems-table td.col-default,
.profile-systems-table td.col-delete,
.profile-systems-table th.col-default,
.profile-systems-table th.col-delete {
  text-align: center;
  width: 80px;
}
.profile-systems-label-input {
  background: transparent;
  border: 1px dashed transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  padding: 2px 6px;
  width: 100%;
}
.profile-systems-label-input:hover,
.profile-systems-label-input:focus {
  border-color: var(--border2);
  outline: none;
}
.profile-systems-trash {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
}
.profile-systems-trash:hover { color: #c85050; }
.profile-systems-default-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.profile-systems-default-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.profile-systems-default-switch {
  width: 34px;
  height: 18px;
  background: var(--border2);
  border-radius: 999px;
  position: relative;
  transition: background .15s;
}
.profile-systems-default-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
}
.profile-systems-default-toggle input:checked + .profile-systems-default-switch {
  background: rgba(212, 168, 67, 0.85);
}
.profile-systems-default-toggle input:checked + .profile-systems-default-switch::after {
  transform: translateX(16px);
}
.profile-systems-default-text {
  font-size: 0.7rem;
  color: var(--muted);
}
.profile-systems-default-toggle input:checked ~ .profile-systems-default-text {
  color: #e6c160;
}

/* -- My uploaded configs table -- */

.profile-configs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.profile-configs-table th,
.profile-configs-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.profile-configs-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.profile-configs-table tbody tr:last-child td { border-bottom: none; }
.profile-configs-table td.col-action,
.profile-configs-table th.col-action {
  text-align: right;
  width: 110px;
}
.profile-configs-game-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.profile-configs-game-link:hover { color: var(--accent); text-decoration: underline; }
.profile-configs-appid {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
}
.profile-configs-view-link {
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border2);
  padding: 3px 10px;
  display: inline-block;
}
.profile-configs-view-link:hover { color: var(--accent); border-color: var(--accent); }
