:root {
  --page-bg: #f5f6f8;
  --card-bg: #ffffff;

  --text-primary: #172033;
  --text-secondary: #667085;
  --text-soft: #8a94a6;

  --border: #e2e6ee;
  --border-strong: #cfd5e2;

  --primary: #4353ff;
  --primary-hover: #3444e8;
  --primary-soft: #f0f2ff;

  --success: #16865a;
  --success-soft: #edf8f3;

  --sun-bg: #fff4cf;

  --shadow: 0 16px 42px rgba(25, 35, 60, 0.08);

  --radius-large: 22px;
  --radius-medium: 15px;
  --radius-small: 11px;
}

/* -------------------------------------------------
   Base
------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      #ffffff 0,
      var(--page-bg) 46%
    );
  color: var(--text-primary);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}s

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

/* -------------------------------------------------
   Page shell and header
------------------------------------------------- */

.page-shell {
  width: min(760px, calc(100% - 40px));
  margin-left: max(20px, calc((100% - 980px) / 2));
  margin-right: auto;
  padding: 34px 0 48px;
}
.greeting-text,
#greeting {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
}

.prepared-by {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.prepared-by strong {
  color: var(--primary);
  font-weight: 750;
}

/* -------------------------------------------------
   Main recommendation
------------------------------------------------- */

.brief-card {
  padding: 24px;
  border: 1px solid rgba(226, 230, 238, 0.92);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  transition:
    opacity 250ms ease,
    transform 250ms ease;
}

.brief-card.loading {
  opacity: 0.4;
  pointer-events: none;
}

.opportunity-heading {
  margin-bottom: 16px;
}

.section-label {
  margin: 0 0 9px;
  color: var(--text-secondary);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.opportunity-heading h2,
#briefTitle {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.35rem, 5vw, 1.8rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

/* -------------------------------------------------
   Photo and caption
------------------------------------------------- */

.brief-photo {
  display: block;
  width: 100%;
  height: clamp(300px, 65vw, 500px);
  border-radius: 17px;
  background: #e9ebef;
  object-fit: cover;
  opacity: 1;
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.brief-photo.fade-out {
  opacity: 0;
}

.caption-card {
  margin-top: 20px;
  padding: 19px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: #fafbfc;
}

.caption-card .section-label {
  color: var(--primary);
}

.caption-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.caption-header .section-label {
  margin: 0;
}

#suggestedCaption {
  margin: 0;
  color: #2f3a4e;
  font-size: 1rem;
  line-height: 1.68;
  white-space: pre-wrap;
}

.rewrite-caption-link {
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: #526579;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.rewrite-caption-link:hover {
  text-decoration: underline;
}

.rewrite-caption-link:disabled {
  opacity: 0.45;
  cursor: default;
  text-decoration: none;
}

/* -------------------------------------------------
   Buttons and actions
------------------------------------------------- */

.primary-button,
.secondary-button {
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 13px;
  font-size: 0.94rem;
  font-weight: 780;
  cursor: pointer;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.primary-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  box-shadow: 0 9px 20px rgba(67, 83, 255, 0.22);
  color: #ffffff;
}

.primary-button:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: #344054;
}

.secondary-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
}
.photo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
}

.photo-title-row .photo-title {
  margin: 0;
}

.marketing-brief-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #b7c4ff;
  border-radius: 12px;
  background: #ffffff;
  color: #4657e8;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.marketing-brief-button:hover {
  background: #f7f8ff;
}


.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  margin-top: 28px;
}

.action-panel {
  padding: 18px;
  border: 1px solid #dfe3e8;
  border-radius: 16px;
  background: #ffffff;
}

.action-panel-label {
  margin: 0 0 16px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publish-platforms {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.publish-platforms label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
}

.publish-panel .primary-button {
  width: 100%;
  margin: 0;
}

.other-options-panel {
  display: grid;
  gap: 12px;
}

.other-options-panel .secondary-button {
  width: 100%;
  margin: 0;
  min-height: 46px;
}

.actions .secondary-button:hover {
  background: #f9fafb;
}

.actions button:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.brief-link {
  display: inline-block;
  margin: 8px 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #526579;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.brief-link:hover {
  text-decoration: underline;
}

/* -------------------------------------------------
   Approval and scheduled states
------------------------------------------------- */

.today-status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 15px 17px;
  border: 1px solid #bfe5d2;
  border-radius: 14px;
  background: var(--success-soft);
  color: #146542;
}

.today-status > span {
  font-size: 1.1rem;
  font-weight: 900;
}

.today-status p {
  margin: 3px 0 0;
  font-size: 0.86rem;
}

.approved-actions {
  margin-top: 24px;
  padding: 17px;
  border: 1px solid #c9e8d8;
  border-radius: 14px;
  background: var(--success-soft);
  color: #176c49;
  text-align: center;
}

.approved-actions p {
  margin: 5px 0 0;
  font-size: 0.85rem;
}

.scheduled-card {
  margin-top: 32px;
  padding: 24px;
  border-radius: 18px;
  background: #eef8f2;
  text-align: center;
}

.scheduled-icon {
  margin-bottom: 10px;
  font-size: 42px;
}

.scheduled-card h3 {
  margin: 0;
  color: #166534;
}

.scheduled-card p {
  margin-top: 8px;
  color: #4b5563;
}

/* -------------------------------------------------
   Loading overlay
------------------------------------------------- */

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(4px);
}

.loading-card {
  width: min(100%, 320px);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(25, 35, 60, 0.16);
  text-align: center;
}

.loading-card h3 {
  margin: 0 0 6px;
  color: var(--text-primary);
}

.loading-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 17px;
  border: 4px solid #e5e8ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------------------------
   Marketing brief preview
------------------------------------------------- */

.marketing-brief-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.marketing-brief-preview:hover {
  border-color: #d5dce5;
  background: #f3f6f9;
}

.brief-thumbnail {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 9px;
  object-fit: cover;
}

.brief-preview-content {
  flex: 1;
  min-width: 0;
}

.brief-preview-title {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brief-preview-text {
  margin-bottom: 4px;
  color: #374151;
  font-size: 14px;
  line-height: 1.35;
}

.brief-preview-link {
  color: #526579;
  font-size: 13px;
  font-weight: 600;
}

/* -------------------------------------------------
   Marketing brief modal
------------------------------------------------- */

.why-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 27, 42, 0.5);
}

.why-modal-overlay[hidden] {
  display: none;
}

.why-modal {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(20, 27, 42, 0.25);
}

.why-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  background: #ffffff;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.why-modal-close:hover {
  background: #f8fafc;
  color: #1e293b;
}

.why-modal-content {
  display: grid;
  gap: 24px;
  color: #3d485b;
  font-size: 0.96rem;
  line-height: 1.65;
}

.modal-note-section,
.modal-section {
  margin: 0;
}

.modal-section {
  padding: 18px 0;
  border-top: 1px solid #e5e7eb;
}

.modal-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.modal-section h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 0.95rem;
}

.modal-section p {
  margin: 0;
}

.modal-heading {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 48px 12px 0;
  color: #172033;
  font-size: 17px;
  font-weight: 750;
}

.modal-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.modal-check-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f7ee;
  color: #23834b;
  font-size: 14px;
  font-weight: 800;
}

#whyModalReasons,
.insight-list {
  display: grid;
  gap: 10px;
}

#whyModalReasons > div,
#whyModalReasons > p,
#whyModalReasons > li {
  position: relative;
  margin: 0;
  padding-left: 28px;
  list-style: none;
}

#whyModalReasons > div::before,
#whyModalReasons > p::before,
#whyModalReasons > li::before {
  content: "✓";
  position: absolute;
  top: 1px;
  left: 0;
  color: #25834b;
  font-weight: 800;
}

.lisa-note-card {
  padding: 15px 16px;
  border: 1px solid #dbe7fb;
  border-left: 4px solid #5b4cc4;
  border-radius: 12px;
  background: #f7f9ff;
}

.lisa-note-card p,
.photo-insight-card p,
.brief-summary-card p {
  margin: 0;
}

.lisa-note-card p {
  color: #344158;
  line-height: 1.7;
}

.insight-list > div {
  position: relative;
  padding: 11px 14px 11px 44px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  line-height: 1.5;
}

.insight-list > div::before {
  content: "✓";
  position: absolute;
  top: 12px;
  left: 14px;
  display: flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f7ee;
  color: #23834b;
  font-size: 13px;
  font-weight: 800;
}

.photo-insight-card {
  padding: 15px 16px;
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  background: #fafbfc;
  color: #3b4658;
  line-height: 1.65;
}

.brief-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.brief-summary-card {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.summary-label {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0 0 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.strategy-badge,
.opportunity-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.strategy-badge {
  background: #efedff;
  color: #5140a8;
}

.opportunity-badge {
  background: #eaf8ef;
  color: #267348;
}

.section-title a {
  text-decoration: none;
  white-space: nowrap;
}

.section-title a:hover .why-link {
  text-decoration: underline;
}

.why-link {
  margin-right: 4px;
  color: #5b2ca0;
  font-weight: 700;
  text-decoration: underline;
}

.why-text {
  color: #333333;
  font-weight: 600;
}

/* -------------------------------------------------
   Secondary navigation
------------------------------------------------- */

.history-button {
  display: inline-block;
  width: auto;
  margin-top: 14px;
}

.secondary-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.secondary-navigation .history-button {
  display: inline-block;
  width: auto;
  margin: 0;
}

.dashboard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 20px 0 0;
}

.dashboard-nav-link {
  color: #526579;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.dashboard-nav-link:hover {
  text-decoration: underline;
}

.dashboard-nav-link.active {
  color: #111827;
}

.why-modal-overlay {
    padding: 10px;
}
.publishing-availability-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f7fa;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}
.change-password-section {
  margin-top: 8px;
}

.settings-field {
  margin: 16px 0;
}

.settings-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.settings-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font: inherit;
}

.account-button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.account-button-row button {
  width: auto;
}

.change-password-section {
  margin-top: 8px;
}
#changePasswordMessage {
  margin-top: 12px;
  font-size: 14px;
}
/* -------------------------------------------------
   Responsive adjustments
------------------------------------------------- */

  
 @media (max-width: 600px) {
    .page-shell {
      width: calc(100% - 20px);
      margin-left: 10px;
      margin-right: 10px;
      padding: 20px 0 34px;
    }
  }
 

  @media (max-width: 560px) {
  .photo-title-row {
    align-items: flex-start;
  }

  .marketing-brief-button {
    padding: 9px 12px;
    font-size: 13px;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .publish-platforms {
    gap: 18px;
  }
}


/* Lisa AI header — mobile layout */
@media (max-width: 650px) {
 
  .page-shell {
    padding-top: 8px;
  }
   
  .dashboard-nav {clear: both;padding-top: 12px;}
}