/* COSA2-285 | Date: December 17, 2025 | Team: Catalyst Team | Author: Ceasar
 * Responsive styles for the KISS Trading Diary MVP.
 */

:root {
  --bg: #0e1b2a;
  --card: #14273d;
  --accent: #4fc3f7;
  --text: #e6eef5;
  --muted: #a8bed3;
  --positive: #63d471;
  --negative: #f78c6b;
  --border: #1e3450;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(79, 195, 247, 0.06), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(143, 148, 251, 0.08), transparent 35%),
    var(--bg);
  color: var(--text);
}

.site-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: sticky;
  top: 0;
  background: rgba(14, 27, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.branding h1 {
  margin: 0;
  font-size: 1.8rem;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Keep the branding link styled like the original heading. */
.brand-home {
  color: var(--text);
  text-decoration: none;
  display: inline-block;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Avoid hyperlink styling changes on hover for the branding. */
.brand-home:hover,
.brand-home:focus {
  color: var(--text);
  text-decoration: none;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* kisstradingdiary-3 | Date: December 26, 2025 | Author: Ceasar - Align navigation with auth button. */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.auth-cta {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, #4fc3f7, #8f94fb);
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  line-height: 1.1;
}

/* kisstradingdiary-3 | Date: December 26, 2025 | Author: Ceasar - Support logout CTA parity in the header. */
.auth-cta--logout {
  margin: 0;
  padding: 0;
  border: none;
}

.auth-cta--logout button {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(90deg, #f78c6b, #fcb07e);
  color: #0b1523;
  font-weight: 700;
  min-width: 140px;
  cursor: pointer;
}

/* kisstradingdiary-3 | Date: December 26, 2025 | Author: Ceasar - Highlight admin access alongside the signout control. */
.auth-cta--admin {
  background: linear-gradient(90deg, #6dd5ed, #2193b0);
  border-color: #2d9cdb;
}

.auth-cta:hover,
.auth-cta:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(143, 148, 251, 0.35);
}

.nav-bar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-bar a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-bar a:hover,
.nav-bar a:focus {
  background: rgba(79, 195, 247, 0.12);
  transform: translateY(-2px);
}

.nav-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  padding: 20px;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Give auth pages a 50/50 split for the login box and announcements. */
.layout--auth-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Enforce equal column sharing so the login card only occupies half the canvas. */
.layout--auth-split > .content--auth,
.layout--auth-split > .auth-announcement {
  width: 100%;
  max-width: none;
}

.content--auth {
  max-width: none;
  width: 100%;
}

@media (max-width: 900px) {
  .layout--auth-split {
    grid-template-columns: 1fr;
  }
}

/* kisstradingdiary-12 | Date: December 26, 2025 | Author: Ceasar - Ensure admin layout allocates full width for content beside the sidebar. */
.layout--admin {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* kisstradingdiary-3 | Date: December 26, 2025 | Author: Ceasar - Styling for Facebook authentication panel. */
.auth-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Polished single-surface auth layout with tabbed options. */
.auth-panel--chooser {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 10% 20%, rgba(79, 195, 247, 0.1), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(143, 148, 251, 0.12), transparent 30%),
    var(--card);
  overflow: hidden;
}

.auth-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-panel__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-feedback-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-panel h2 {
  margin-top: 0;
}

.auth-feedback {
  background: rgba(79, 195, 247, 0.15);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
}

.auth-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

/* kisstradingdiary-3 | Date: December 26, 2025 | Author: Ceasar - Stack Facebook-only actions for clarity. */
.auth-forms--stacked {
  grid-template-columns: 1fr;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Announcement rail beside the auth card. */
.auth-announcement {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.announcement-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announcement-card__badge {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79, 195, 247, 0.18);
  color: var(--text);
  font-weight: 700;
  border: 1px solid var(--border);
}

.announcement-card__copy {
  margin: 0;
  color: var(--muted);
}

.announcement-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 6px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

.auth-form input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.auth-form button {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #4fc3f7, #8f94fb);
  color: #0b1523;
  font-weight: 700;
  cursor: pointer;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Provide structured spacing for OTP resend and change-email controls. */
/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Keep secondary actions aligned to the right on a single row. */
.auth-form__secondary-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 10px 0 0;
  flex-wrap: wrap;
}

.auth-form__resend {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-form__link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.auth-form__link[disabled] {
  color: var(--muted);
  cursor: not-allowed;
  text-decoration: none;
}

.auth-form__timer {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
}

.auth-form__actions--balanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

/* kisstradingdiary-3 | Date: December 26, 2025 | Author: Ceasar - Align inline logout control with summary content. */
.auth-form--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.auth-form--inline button {
  margin-left: auto;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Tabs and panels for switching auth providers. */
.auth-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0 0;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Modernize provider buttons with bold sizing and simplified surfaces. */
.auth-option {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  color: var(--text);
  border-radius: 16px;
  padding: 18px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.auth-option.is-active {
  background: linear-gradient(120deg, rgba(79, 195, 247, 0.35), rgba(143, 148, 251, 0.35));
  border-color: rgba(79, 195, 247, 0.6);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Brand Google and Facebook provider buttons with native palettes. */
.auth-option--google {
  background: #fff;
  color: #202124;
  border-color: #e0e3e7;
  box-shadow: 0 12px 28px rgba(17, 17, 26, 0.12);
}

.auth-option--google:hover,
.auth-option--google:focus-visible {
  border-color: #d2e3fc;
  box-shadow: 0 16px 36px rgba(17, 17, 26, 0.18);
}

.auth-option--google.is-active {
  background: #fff;
  border-color: #4285f4;
  box-shadow: 0 18px 40px rgba(66, 133, 244, 0.32);
}

.auth-option--facebook {
  background: #1877f2;
  border-color: #0f5ab8;
  color: #fff;
  box-shadow: 0 12px 28px rgba(24, 119, 242, 0.35);
}

.auth-option--facebook:hover,
.auth-option--facebook:focus-visible {
  background: #0f5ab8;
  border-color: #0c4a95;
  box-shadow: 0 18px 40px rgba(24, 119, 242, 0.45);
}

.auth-option--facebook.is-active {
  background: #0c4a95;
  border-color: #0a3e7f;
  box-shadow: 0 20px 44px rgba(24, 119, 242, 0.55);
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Labels and icons for the enlarged provider buttons. */
.auth-option__icon {
  font-size: 1.35rem;
}

.auth-option__label {
  white-space: nowrap;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Normalize SVG icons for branded provider buttons. */
.auth-option__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.auth-views {
  margin-top: 8px;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Stack provider toggle at the bottom for a cleaner, single focus area. */
.auth-switcher {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.auth-switcher__label {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 600;
}

.auth-view {
  display: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.auth-view.is-active {
  display: block;
}

.auth-view__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.auth-copy {
  color: var(--muted);
  margin: 0;
}

.auth-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.auth-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.exchange-selector,
.stock-details,
.sidebar .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.exchange-selector h2 {
  margin: 0 0 10px 0;
}

.exchange-select-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exchange-select-form label {
  color: var(--muted);
  font-weight: 700;
}

.exchange-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.exchange-select-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
}

.exchange-select-row button,
.row-action,
.pagination a,
.pagination .disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(79, 195, 247, 0.12);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.exchange-select-row button {
  cursor: pointer;
}

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s ease, transform 0.2s ease;
}

/* philippineBarReviewer-242 | Date: December 26, 2025 | Author: Ceasar - Align small flag icons beside chip labels. */
.chip-flag {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  font-size: 16px;
  /* philippineBarReviewer-242 | Date: December 26, 2025 | Author: Ceasar - Ensure emoji-capable fonts render regional indicators as flags. */
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', system-ui, sans-serif;
}

.chip.active,
.chip:hover {
  background: rgba(79, 195, 247, 0.15);
  transform: translateY(-1px);
}

.stock-table-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stock-table-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.stock-table-panel__header h2 {
  margin: 0;
}

.stock-table-count {
  margin: 0;
  color: var(--muted);
}

.stock-table-wrapper {
  overflow-x: auto;
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.stock-table th,
.stock-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.stock-table th {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stock-table tr.is-selected {
  background: rgba(79, 195, 247, 0.1);
}

.symbol-link {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.symbol-link:hover,
.symbol-link:focus,
.row-action:hover,
.row-action:focus,
.pagination a:hover,
.pagination a:focus {
  border-color: var(--accent);
  background: rgba(79, 195, 247, 0.18);
}

.price {
  font-size: 1.1rem;
  font-weight: 700;
}

.exchange-ticker-tape {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.tradingview-widget-container--ticker-tape {
  width: 100%;
  min-height: 46px;
}

.tradingview-widget-container--ticker-tape iframe {
  display: block;
  width: 100% !important;
}

.change {
  margin-left: 8px;
  font-size: 0.95rem;
}

.change.positive {
  color: var(--positive);
}

.change.negative {
  color: var(--negative);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination .disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination__status {
  color: var(--muted);
  font-weight: 700;
}

.stock-details .details-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.stock-details h2 {
  margin: 0;
}

.summary {
  margin-top: 8px;
  color: var(--muted);
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Provide hierarchy and navigation styling for the stock detail view. */
.stock-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.back-link:hover,
.back-link:focus {
  background: rgba(79, 195, 247, 0.12);
  transform: translateY(-1px);
}

.stock-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.eyebrow {
  margin: 0 0 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--muted);
}

.stock-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Layout for research retrieval and embedding. */
.research-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.research-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.research-panel__form {
  margin: 0;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Present TradingView chart block with consistent theming. */
.chart-panel {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Lighten the sidebar chart card to read as a white box. */
.chart-panel--sidebar {
  background: #f7fbff;
  border-color: #dbe7ff;
  color: #0b1523;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Match the inline chart with the research card's white surface. */
.chart-panel--inline {
  background: #f7fbff;
  border-color: #dbe7ff;
  color: #0b1523;
  /* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Keep the TradingView card to half width and float right inside the research column. */
  width: 50%;
  float: right;
  margin-left: 16px;
}

.chart-panel--sidebar .eyebrow,
.chart-panel--sidebar h3,
.chart-panel--sidebar .chart-panel__footnote {
  color: #0b1523;
}
.chart-panel--inline .eyebrow,
.chart-panel--inline h3,
.chart-panel--inline .chart-panel__footnote {
  color: #0b1523;
}

.chart-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tradingview-chart {
  width: 100%;
  /* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Enforce a responsive 16:9 chart frame for TradingView. */
  aspect-ratio: 16 / 9;
  min-height: 0;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #0b1523;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Ensure sidebar widget fills the white card without looking thin. */
.tradingview-chart--sidebar {
  min-height: 540px;
  background: #f7fbff;
  border-color: #dbe7ff;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Keep inline chart readable against the white research container. */
.tradingview-chart--inline {
  min-height: 0;
  background: #f7fbff;
  border-color: #dbe7ff;
}

.chart-panel__footnote {
  margin-top: 8px;
}

.cta-button {
  background: linear-gradient(90deg, #4fc3f7, #8f94fb);
  border: 1px solid var(--border);
  color: #0b1523;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.cta-button:hover,
.cta-button:focus {
  transform: translateY(-1px);
}

.alert {
  background: rgba(79, 195, 247, 0.12);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Improve research readability on dark canvas. */
/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Let embedded research grow with its content instead of forcing scrollbars. */
.research-embed {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fbff;
  color: #0b1523;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: visible;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Pad inline research content and keep links legible. */
.research-embed--inline {
  padding: 16px 18px;
  line-height: 1.55;
}

.research-embed--inline * {
  /* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Keep inline research text readable and prevent nested white overlays. */
  color: #0b1523 !important;
  background: transparent !important;
}

.research-embed--inline h1,
.research-embed--inline h2,
.research-embed--inline h3,
.research-embed--inline h4,
.research-embed--inline h5,
.research-embed--inline h6 {
  color: #0b1523;
}

.research-embed--inline a {
  color: #0b63f6;
  text-decoration: underline;
}

/* kisstradingdiary-21 | Date: December 28, 2025 | Author: Ceasar - Blocking overlay to reassure users while OpenAI responds. */
.research-loader {
  position: fixed;
  inset: 0;
  background: rgba(14, 27, 42, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.research-loader--hidden {
  opacity: 0;
  pointer-events: none;
}

.research-loader__dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.research-loader__spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: research-spin 0.9s linear infinite;
}

@keyframes research-spin {
  to {
    transform: rotate(360deg);
  }
}

.highlights--detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 16px;
}

.stock-detail-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.price-block--detail {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.sticky-card {
  position: sticky;
  top: 88px;
}

.highlights {
  margin-top: 12px;
  padding-left: 18px;
  color: var(--text);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar .card h3 {
  margin-top: 0;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  border-top: 1px solid var(--border);
  background: rgba(14, 27, 42, 0.9);
}

/* kisstradingdiary-3 | Date: December 26, 2025 | Author: Ceasar - Admin sidebar navigation styling. */
.admin-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.admin-sidebar h2 {
  margin-top: 0;
}

.admin-tool-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-tool-list a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, background 0.2s ease;
}

.admin-tool-list a:hover,
.admin-tool-list a:focus {
  background: rgba(109, 213, 237, 0.15);
  transform: translateX(2px);
}

.admin-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.admin-empty {
  color: var(--muted);
}

/* kisstradingdiary-12 | Date: December 26, 2025 | Author: Ceasar - Layout helpers for market administration cards and forms. */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.admin-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}

.admin-form input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.admin-form select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.admin-form button,
.inline-form button {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #6dd5ed, #2193b0);
  color: #0b1523;
  font-weight: 700;
  cursor: pointer;
}

.table-wrapper {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.9rem;
}

.status-pill--active {
  background: rgba(99, 212, 113, 0.18);
  border-color: rgba(99, 212, 113, 0.6);
  color: var(--text);
}

.inline-form {
  margin: 0;
}

.admin-callout {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.admin-callout--success {
  background: rgba(99, 212, 113, 0.15);
  border-color: rgba(99, 212, 113, 0.6);
}

.admin-callout--error {
  background: rgba(247, 140, 107, 0.18);
  border-color: rgba(247, 140, 107, 0.8);
}

/* kisstradingdiary-12 | Date: December 26, 2025 | Author: Ceasar - Enhance market admin layout with modal controls. */
.admin-card--full {
  grid-column: 1 / -1;
}

.admin-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-button {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #6dd5ed, #2193b0);
  color: #0b1523;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  width: min(620px, 92vw);
  padding: 16px;
  position: relative;
  z-index: 1;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.modal__close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal__form {
  max-height: 70vh;
  overflow-y: auto;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .nav-bar ul {
    display: none;
    flex-direction: column;
    background: var(--card);
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    position: absolute;
    top: 60px;
    right: 20px;
  }

  .nav-bar ul.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stock-details .details-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .exchange-select-row {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: flex-start;
  }
}
