/* =========================================================
   ACCOUNT.CSS
   ========================================================= */

/* ===== ACCOUNT LAYOUT ===== */
.account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* ===== AUTH PANEL (Login/Register Tabs) ===== */
.auth-panel {
  max-width: 480px;
  margin-inline: auto;
}

.auth-tabs {
  display: flex;
  background: var(--color-bg-tint);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: var(--space-xl);
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: transparent;
  color: var(--color-text-muted);
  transition: all var(--transition-base);
}

.auth-tab-btn.active {
  background: var(--color-bg-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

.auth-form.hidden { display: none; }

.auth-form__title {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.auth-form__subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-block: var(--space-lg);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ===== DASHBOARD ===== */
.dashboard-layout { display: none; }
.dashboard-layout.visible { display: grid; }

/*
  .account-layout and .dashboard-layout share the grid,
  but dashboard-layout shows after "login" demo action.
*/

/* Sidebar navigation */
.account-sidebar {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: all var(--transition-base);
  text-decoration: none;
}

.account-nav-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.account-nav-item.active {
  background: var(--color-primary);
  color: #fff;
}

.account-nav-divider {
  height: 1px;
  background: var(--color-border);
  margin-block: var(--space-sm);
}

/* ===== ACCOUNT MAIN CONTENT ===== */
.account-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.account-section {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.account-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.account-section__title {
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Profile info grid */
.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.profile-info-item__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
  font-family: var(--font-heading);
}

.profile-info-item__value {
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 500;
}

/* Orders table */
.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.orders-table th {
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 2px solid var(--color-border);
}

.orders-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  vertical-align: middle;
}

.orders-table tr:last-child td { border-bottom: none; }

.order-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.25em 0.75em;
  border-radius: 100px;
}

.order-status--completed {
  background: #E8F5E9;
  color: var(--color-success);
}

.order-status--processing {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.order-status--pending {
  background: var(--color-accent-light);
  color: #7a6400;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
}

@media (max-width: 768px) {
  .profile-info-grid { grid-template-columns: 1fr; }
  .auth-form { padding: var(--space-lg); }
}
