/* ============================================================
 * 0576fy.cn - P1 Dashboard Enhancement Styles
 * Premium agent dashboard with global design system
 * ============================================================ */

/* --- Dashboard Container --- */
.fy-dash-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* --- Welcome Header --- */
.fy-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 24px 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}
.fy-dash-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.fy-dash-header__avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--fy-primary, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.fy-dash-header__info h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--fy-text, #1a1a2e);
}
.fy-dash-header__info span {
  font-size: 13px;
  color: var(--fy-text-muted, #6b7280);
}
.fy-dash-header__right {
  display: flex;
  gap: 10px;
}
.fy-dash-header__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.fy-dash-header__link--outline {
  border: 1.5px solid var(--fy-primary, #2563eb);
  color: var(--fy-primary, #2563eb);
  background: transparent;
}
.fy-dash-header__link--outline:hover {
  background: var(--fy-primary, #2563eb);
  color: #fff;
}
.fy-dash-header__link--ghost {
  color: var(--fy-text-muted, #6b7280);
  background: transparent;
}
.fy-dash-header__link--ghost:hover {
  color: var(--fy-text, #1a1a2e);
  background: #f3f4f6;
}

/* --- Stats Grid --- */
.fy-dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.fy-dash-stat {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fy-dash-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}
.fy-dash-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}
.fy-dash-stat--publish::before { background: #10b981; }
.fy-dash-stat--pending::before { background: #f59e0b; }
.fy-dash-stat--views::before { background: var(--fy-primary, #2563eb); }
.fy-dash-stat--draft::before { background: #9ca3af; }
.fy-dash-stat__icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.fy-dash-stat__num {
  font-size: 28px;
  font-weight: 800;
  color: var(--fy-text, #1a1a2e);
  line-height: 1.2;
}
.fy-dash-stat__label {
  font-size: 13px;
  color: var(--fy-text-muted, #6b7280);
  margin-top: 4px;
}

/* --- Toolbar --- */
.fy-dash-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.fy-dash-toolbar__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--fy-text, #1a1a2e);
  margin: 0;
}
.fy-dash-toolbar__count {
  font-size: 13px;
  color: var(--fy-text-muted, #6b7280);
  margin-left: 8px;
  font-weight: 400;
}

/* --- Primary Button --- */
.fy-dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.fy-dash-btn--primary {
  background: var(--fy-primary, #2563eb);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.fy-dash-btn--primary:hover {
  background: var(--fy-primary-dark, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
  color: #fff;
}
.fy-dash-btn--sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 7px;
}
.fy-dash-btn--outline {
  border: 1.5px solid #d1d5db;
  color: var(--fy-text, #1a1a2e);
  background: #fff;
}
.fy-dash-btn--outline:hover {
  border-color: var(--fy-primary, #2563eb);
  color: var(--fy-primary, #2563eb);
  background: #eff6ff;
}
.fy-dash-btn--ghost {
  color: var(--fy-text-muted, #6b7280);
  background: transparent;
}
.fy-dash-btn--ghost:hover {
  color: var(--fy-text, #1a1a2e);
  background: #f3f4f6;
}
.fy-dash-btn--danger {
  background: transparent;
  color: #ef4444;
  border: 1px solid transparent;
}
.fy-dash-btn--danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

/* --- Listing Cards --- */
.fy-dash-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fy-dash-card {
  display: flex;
  gap: 16px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s;
  border: 1px solid transparent;
}
.fy-dash-card:hover {
  border-color: #e5e7eb;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.fy-dash-card__img {
  width: 140px;
  height: 100px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f5ff, #e8f0fe);
  flex-shrink: 0;
  object-fit: cover;
}
.fy-dash-card__img-placeholder {
  width: 140px;
  height: 100px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f5ff, #e8f0fe);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #93b4f5;
}
.fy-dash-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.fy-dash-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.fy-dash-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fy-text, #1a1a2e);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fy-dash-card__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.fy-dash-card__status--publish {
  background: #ecfdf5;
  color: #059669;
}
.fy-dash-card__status--pending {
  background: #fffbeb;
  color: #d97706;
}
.fy-dash-card__status--draft {
  background: #f3f4f6;
  color: #6b7280;
}
.fy-dash-card__meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--fy-text-muted, #6b7280);
  margin-top: 6px;
}
.fy-dash-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fy-dash-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.fy-dash-card__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--fy-primary, #2563eb);
}
.fy-dash-card__price small {
  font-size: 13px;
  font-weight: 500;
  color: var(--fy-text-muted, #6b7280);
}
.fy-dash-card__actions {
  display: flex;
  gap: 6px;
}

/* --- Pagination --- */
.fy-dash-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
  padding-bottom: 16px;
}
.fy-dash-pagination a,
.fy-dash-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}
.fy-dash-pagination a {
  background: #fff;
  color: var(--fy-text, #1a1a2e);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.fy-dash-pagination a:hover {
  background: var(--fy-primary, #2563eb);
  color: #fff;
}
.fy-dash-pagination .current {
  background: var(--fy-primary, #2563eb);
  color: #fff;
  font-weight: 600;
}

/* --- Empty State --- */
.fy-dash-empty {
  text-align: center;
  padding: 64px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.fy-dash-empty__icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.fy-dash-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--fy-text, #1a1a2e);
  margin: 0 0 8px;
}
.fy-dash-empty p {
  color: var(--fy-text-muted, #6b7280);
  font-size: 14px;
  margin: 0 0 20px;
}

/* --- Floating Add Button --- */
.fy-dash-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--fy-primary, #2563eb);
  color: #fff;
  font-size: 28px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,99,235,0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s;
  animation: fy-fab-pulse 2s ease-in-out infinite;
}
.fy-dash-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 24px rgba(37,99,235,0.5);
}
@keyframes fy-fab-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,99,235,0.4); }
  50% { box-shadow: 0 4px 30px rgba(37,99,235,0.6); }
}

/* --- Form Styles (Enhanced) --- */
.fy-dash-form-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px;
}
.fy-dash-form-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}
.fy-dash-form-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--fy-text, #1a1a2e);
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f3f4f6;
}
.fy-dash-form-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--fy-text-muted, #6b7280);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.fy-dash-form-back:hover {
  color: var(--fy-primary, #2563eb);
}
.fy-dash-form-group {
  margin-bottom: 20px;
}
.fy-dash-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--fy-text, #1a1a2e);
  margin-bottom: 8px;
}
.fy-dash-form-required {
  color: #ef4444;
}
.fy-dash-form-input,
.fy-dash-form-select,
.fy-dash-form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.2s;
  background: #fff;
  box-sizing: border-box;
  color: var(--fy-text, #1a1a2e);
}
.fy-dash-form-input:focus,
.fy-dash-form-select:focus,
.fy-dash-form-textarea:focus {
  border-color: var(--fy-primary, #2563eb);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.fy-dash-form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.fy-dash-form-textarea {
  min-height: 110px;
  resize: vertical;
}
.fy-dash-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.fy-dash-form-hint {
  font-size: 12px;
  color: var(--fy-text-muted, #6b7280);
  margin-top: 6px;
}
.fy-dash-form-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fy-dash-form-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fy-dash-form-submit {
  width: 100%;
  padding: 14px;
  background: var(--fy-primary, #2563eb);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.fy-dash-form-submit:hover {
  background: var(--fy-primary-dark, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}
.fy-dash-form-submit:active {
  transform: translateY(0);
}

/* --- Image Upload --- */
.fy-dash-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafbfc;
}
.fy-dash-upload-area:hover {
  border-color: var(--fy-primary, #2563eb);
  background: #f0f5ff;
}
.fy-dash-upload-icon {
  font-size: 40px;
  margin-bottom: 8px;
}
.fy-dash-upload-text {
  font-size: 15px;
  color: var(--fy-text-muted, #6b7280);
}
.fy-dash-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.fy-dash-image-preview img {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

/* --- Login Prompt --- */
.fy-dash-login {
  text-align: center;
  padding: 80px 20px;
  max-width: 420px;
  margin: 40px auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.fy-dash-login__icon {
  font-size: 52px;
  margin-bottom: 20px;
}
.fy-dash-login h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--fy-text, #1a1a2e);
  margin: 0 0 8px;
}
.fy-dash-login p {
  color: var(--fy-text-muted, #6b7280);
  font-size: 14px;
  margin: 0 0 24px;
}
.fy-dash-login__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .fy-dash-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .fy-dash-card__img,
  .fy-dash-card__img-placeholder {
    width: 100px;
    height: 72px;
  }
  .fy-dash-card__title {
    font-size: 14px;
  }
  .fy-dash-card__price {
    font-size: 17px;
  }
  .fy-dash-card__meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
  }
  .fy-dash-card__actions {
    flex-wrap: wrap;
    gap: 4px;
  }
  .fy-dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
  }
  .fy-dash-header__right {
    width: 100%;
  }
  .fy-dash-header__link {
    flex: 1;
    justify-content: center;
  }
  .fy-dash-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .fy-dash-form-row {
    grid-template-columns: 1fr;
  }
  .fy-dash-form-card {
    padding: 20px;
  }
  .fy-dash-fab {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}


/* ============================================================
   P1: Private Sensitive Info Section (经纪人专用)
   ============================================================ */
.fy-param-group--private {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px dashed #f59e0b;
    border-radius: var(--fy-radius-lg, 12px);
    padding: 20px;
    margin-top: 24px;
    position: relative;
}
.fy-param-group--private::before {
    content: "\1F512";
    position: absolute;
    top: -14px;
    right: 16px;
    font-size: 24px;
    background: #fef3c7;
    padding: 0 8px;
    border-radius: 50%;
}
.fy-private-notice {
    font-size: 12px;
    color: #92400e;
    margin-bottom: 12px;
    padding: 6px 10px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}
.fy-param-item--private {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.fy-param-item--private .fy-param-value {
    color: #92400e;
    font-weight: 600;
}

/* ============================================================
   Dashboard form section styles
   ============================================================ */
.fy-dash-form-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px dashed #f59e0b;
    border-radius: var(--fy-radius-lg, 12px);
    padding: 20px;
    margin: 20px 0;
}
.fy-dash-form-section__title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}
