/* ============================================================
   mi-account-modal.css
   Shared styling for the Account modal (acct-*) and Feedback /
   Issue Report modal (fb-*). Copied verbatim from dashboard.css
   to avoid touching the dashboard while letting other pages
   (portfolio.html etc.) host the same modals. Tech-debt: dedupe
   the dashboard.css copy in a future cleanup iter.
   Iter 12DN2 (2026-05-18)
   ============================================================ */

/* ---- Feedback modal (fb-*) ----------------------------------
   Source: dashboard.css L3643\u2013L3815 */
.fb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 9999;
  animation: fb-overlay-in 0.15s;
}
@keyframes fb-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fb-modal {
  background: rgba(28,28,32,0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 520px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: fb-modal-in 0.2s cubic-bezier(0.16,1,0.3,1);
}
@keyframes fb-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.fb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.fb-modal-header h3 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.fb-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}
.fb-modal-close:hover { color: var(--text); }
.fb-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fb-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fb-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fb-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.fb-readonly {
  font-size: 13px;
  color: var(--text);
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: all;
}
.fb-select,
.fb-input,
.fb-textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fb-select:focus,
.fb-input:focus,
.fb-textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79,152,163,0.15);
}
.fb-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23797876' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.fb-select option {
  background: #1c1c20;
  color: var(--text);
}
.fb-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.fb-word-count {
  font-size: 11px;
  color: var(--text-faint);
  text-align: right;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.fb-word-count.warning { color: #F59E0B; }
.fb-word-count.limit   { color: var(--down); }
.fb-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}
.fb-btn-cancel {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fb-btn-cancel:hover { background: var(--surface-hover); color: var(--text); }
.fb-btn-submit {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
  letter-spacing: 0.02em;
}
.fb-btn-submit:hover { opacity: 0.88; }
.fb-btn-submit:disabled { opacity: 0.35; cursor: not-allowed; }
.fb-success-msg {
  text-align: center;
  padding: 40px 24px;
  color: var(--up);
  font-weight: 600;
  font-size: 15px;
}

/* ---- Account modal (acct-*) ---------------------------------
   Source: dashboard.css L6694–L6992 */
.acct-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  opacity: 0;
  transition: opacity 220ms ease;
}
.acct-overlay.acct-visible {
  opacity: 1;
}
body.acct-modal-open {
  overflow: hidden;
}

.acct-modal {
  width: 90vw;
  height: 90vh;
  max-width: 1200px;
  background: var(--panel, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
}
.acct-overlay.acct-visible .acct-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.acct-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border, #30363d);
  flex-shrink: 0;
}
.acct-modal-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text, #e6edf3);
  letter-spacing: 0.2px;
}
.acct-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim, #8b949e);
  font-size: 28px;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.acct-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #e6edf3);
}

.acct-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.acct-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border, #30363d);
  border-radius: 10px;
  padding: 18px 20px;
}
.acct-section-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim, #8b949e);
  margin: 0 0 14px 0;
}

/* Profile overview card */
.acct-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.acct-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F98A3, #3a7a84);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  user-select: none;
  flex-shrink: 0;
}
.acct-profile-meta { min-width: 0; }
.acct-profile-name {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text, #e6edf3);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-profile-email {
  font-size: 13px;
  color: var(--text-dim, #8b949e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fields grid */
.acct-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}
@media (max-width: 720px) {
  .acct-grid { grid-template-columns: 1fr; }
}
.acct-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.acct-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim, #8b949e);
}
.acct-field-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.acct-field-row > .acct-input,
.acct-field-row > .acct-readonly {
  flex: 1 1 auto;
  min-width: 0;
}
.acct-input {
  background: var(--bg, #0d1117);
  border: 1px solid var(--border, #30363d);
  border-radius: 8px;
  color: var(--text, #e6edf3);
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.acct-input:focus {
  border-color: #4F98A3;
  box-shadow: 0 0 0 3px rgba(79, 152, 163, 0.2);
}
.acct-readonly {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, #30363d);
  border-radius: 8px;
  color: var(--text, #e6edf3);
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-readonly-mono {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
}
.acct-field-hint {
  font-size: 11px;
  color: var(--text-dim, #8b949e);
  line-height: 1.4;
}

/* Rows (security / preferences / danger) */
.acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.acct-row + .acct-row {
  border-top: 1px solid var(--border, #30363d);
}
.acct-row-text {
  min-width: 0;
  flex: 1 1 auto;
}
.acct-row-title {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #e6edf3);
  margin-bottom: 2px;
}
.acct-row-desc {
  font-size: 12px;
  color: var(--text-dim, #8b949e);
  line-height: 1.4;
}

/* Buttons */
.acct-btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.acct-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.acct-btn-primary {
  background: #4F98A3;
  color: #fff;
  border-color: #4F98A3;
}
.acct-btn-primary:hover:not(:disabled) {
  background: #3d8591;
  border-color: #3d8591;
}
.acct-btn-secondary {
  background: rgba(79, 152, 163, 0.12);
  color: #7fc2cd;
  border-color: rgba(79, 152, 163, 0.4);
}
.acct-btn-secondary:hover:not(:disabled) {
  background: rgba(79, 152, 163, 0.22);
  border-color: #4F98A3;
}
.acct-btn-ghost {
  background: transparent;
  color: var(--text, #e6edf3);
  border-color: var(--border, #30363d);
}
.acct-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: #4F98A3;
}
.acct-btn-danger {
  background: rgba(238, 85, 85, 0.1);
  color: #ff6b6b;
  border-color: rgba(238, 85, 85, 0.45);
}
.acct-btn-danger:hover:not(:disabled) {
  background: rgba(238, 85, 85, 0.2);
  border-color: #ff6b6b;
}

/* Danger section accent */
.acct-section.acct-danger {
  border-color: rgba(238, 85, 85, 0.35);
  background: rgba(238, 85, 85, 0.04);
}
.acct-danger-title {
  color: #ff8787 !important;
}

/* ---- Account modal (continued, brand block & opaque variant)
   Source: dashboard.css L8968\u2013L9018 */
.acct-overlay.acct-overlay--opaque {
  background: rgba(8, 11, 17, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  /* Sit above AI Lab floating windows (z-index up to 9999) */
  z-index: 12000;
}

/* ============================================================
   Account modal brand cluster (logo + wordmark + divider)
   shown to the left of the "Account" title in the modal header.
   Mirrors the topbar .mi-brand visual but sized for a modal.
   ============================================================ */
.acct-modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.acct-modal-brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(79, 152, 163, 0.35));
  flex-shrink: 0;
}
.acct-modal-brand-mark svg { display: block; width: 100%; height: 100%; }
.acct-modal-brand-name {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 27px;
  letter-spacing: -0.015em;
  display: inline-flex;
  white-space: nowrap;
  line-height: 1;
}
.acct-modal-brand-name-strong { font-weight: 700; color: var(--text, #e6edf3); }
.acct-modal-brand-name-light  { font-weight: 400; color: #6FBCC9; margin-left: 1px; }
.acct-modal-brand-divider {
  width: 1px;
  height: 33px;
  background: var(--border, #30363d);
  margin: 0 4px;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .acct-modal-brand-name { font-size: 24px; }
  .acct-modal-brand-divider { display: none; }
  .acct-modal-brand { gap: 8px; }
}
