/* Shared account area shell (header, layout, sidebar) */

:root {
  --color-account-bg: #F5F2EE;
  --color-account-panel: #F7F4F0;
  --color-account-muted: #7D7D7D;
  --color-account-title: #2F2F2F;
}

body.account-page {
  margin: 0;
  background: var(--color-account-bg);
  min-height: 100vh;
}

.account-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #ebe7e2;
}

.account-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--site-container-max);
  margin: 0 auto;
  padding: 18px var(--site-container-pad);
  box-sizing: border-box;
}

.account-header-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.account-header-logo img {
  display: block;
  height: 36px;
  width: auto;
}

.account-header-nav {
  display: none;
  align-items: center;
  gap: 36px;
}

.account-header-link {
  color: var(--color-text-primary) !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s ease;
}

.account-header-link:hover,
.account-header-link.active {
  color: var(--color-accent) !important;
}

.account-header-user {
  position: relative;
  display: flex;
}

.account-header-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-soft));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.account-header-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid #d9d4ce;
  border-radius: 999px;
  background: #fff;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.account-header-user-btn.is-open {
  border-color: var(--color-accent-soft);
}

.account-header-user-btn.is-open .account-header-chevron {
  transform: rotate(180deg);
}

.account-header-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.account-header-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-header-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 8px;
  border: 1px solid #ebe7e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 60;
}

.account-header-user-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #ebe7e2;
}

.account-header-user-menu-head strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.account-header-user-menu-head span:last-child {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #7d7d7d;
}

.account-header-user-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text-primary) !important;
  text-decoration: none !important;
  font-size: 14px;
}

.account-header-user-menu a:hover {
  background: #fff1ea;
  color: var(--color-accent) !important;
}

.account-header-signout {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-primary);
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.account-header-signout:hover {
  background: #fff1ea;
  color: var(--color-accent);
}

.account-status {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.account-status-success {
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.account-status-warning {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.account-status-danger {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.account-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #dc2626;
}

.account-help {
  margin: 8px 0 0;
  font-size: 12px;
  color: #7d7d7d;
}

.account-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 24px;
  border-bottom: 1px solid #ebe7e2;
}

.account-tab {
  padding: 10px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #7d7d7d;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.account-tab.is-active {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
}

.account-field input:disabled {
  background: #f5f2ee;
  color: #7d7d7d;
}

.account-header-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: 4px;
}

.account-header-mobile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 20px 20px;
  background: #fff;
  border-bottom: 1px solid #ebe7e2;
}

.account-header-mobile a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text-primary) !important;
  text-decoration: none !important;
  font-size: 14px;
}

.account-header-mobile a:hover {
  background: #fff1ea;
  color: var(--color-accent) !important;
}

.account-main {
  width: 100%;
  max-width: var(--site-container-max);
  margin: 0 auto;
  padding: 28px var(--site-container-pad) 64px;
  box-sizing: border-box;
}

.account-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: #fff;
  border-radius: 28px;
  min-height: 640px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.account-sidebar {
  border-bottom: 1px solid #ebe7e2;
  padding: 20px 12px;
  background: #fff;
}

.account-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-sidebar-link {
  display: block;
  width: 100%;
  padding: 12px 18px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: #585858 !important;
  text-align: left;
  text-decoration: none !important;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.account-sidebar-link:hover {
  background: #fff1ea;
  color: var(--color-accent) !important;
}

.account-sidebar-link.active {
  background: #fff1ea;
  color: var(--color-accent) !important;
  font-weight: 500;
}

.account-panels {
  min-width: 0;
}

.account-panel-view[hidden] {
  display: none !important;
}

.account-link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.account-content {
  min-width: 0;
  max-width: 100%;
  padding: 28px 22px 36px;
}

.account-page-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-account-title);
}

.account-page-subtitle {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--color-account-muted);
}

.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-soft));
  color: #fff !important;
  text-decoration: none !important;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.account-btn:hover {
  opacity: 0.9;
}

.account-btn-block {
  width: 100%;
}

.account-link {
  color: var(--color-accent) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
}

.account-link:hover {
  text-decoration: underline !important;
}

.account-panel {
  background: var(--color-account-panel);
  border-radius: 18px;
  padding: 22px 24px;
}

.account-panel-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-account-muted);
}

.account-panel-value {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-account-title);
}

.account-panel-meta {
  margin: 8px 0 0;
  font-size: 14px;
  color: #585858;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
}

.account-table th {
  padding: 12px 0;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: #a3a3a3;
  border-bottom: 1px solid #ebe7e2;
}

.account-table td {
  padding: 16px 0;
  font-size: 15px;
  color: #585858;
  border-bottom: 1px solid #ebe7e2;
}

.account-table td strong {
  color: var(--color-account-title);
  font-weight: 700;
}

.account-form-grid {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.account-form-row {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .account-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.account-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
}

.account-modal {
  width: 100%;
  max-width: 440px;
  padding: 28px 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.account-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #585858;
}

.account-field input,
.account-field select,
.account-field textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #d9d4ce;
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  color: var(--color-text-primary);
  outline: none;
}

.account-field textarea {
  border-radius: 18px;
  min-height: 110px;
  resize: vertical;
}

.account-field input:focus,
.account-field select:focus,
.account-field textarea:focus {
  border-color: var(--color-accent-soft);
  box-shadow: 0 0 0 3px rgba(251, 88, 12, 0.12);
}

@media (min-width: 900px) {
  .account-header-nav {
    display: flex;
  }

  .account-header-user {
    margin-left: 0;
  }

  .account-header-user-actions {
    margin-left: 0;
  }

  .account-header-mobile-toggle,
  .account-header-mobile {
    display: none !important;
  }

  .account-main {
    padding: 36px var(--site-container-pad) 80px;
  }

  .account-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .account-sidebar {
    border-bottom: 0;
    border-right: 1px solid #ebe7e2;
    padding: 28px 0 28px 12px;
  }

  .account-content {
    padding: 36px 40px 48px;
  }

  .account-page-title {
    font-size: 32px;
  }
}
