/*
Theme Name: Cuba Investment Network
Theme URI: https://luismora.doptortech.com/
Author: Anikur Rahaman
Description: Platform connecting international investors with Cuba-focused business owners and reviewed opportunities, built with semantic HTML5, modern Tailwind CSS, and bespoke WordPress architecture.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: angel-network
Tags: two-columns, custom-menu, custom-logo, featured-images, full-width-template, theme-options

--------------------------------------------------------------
Investment Network - Core Stylesheet
--------------------------------------------------------------
All utility styles are compiled into assets/css/tailwind.css.
*/

/* Core CSS variables & root enhancements */
:root {
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-primary: #0A2540;
  --color-primary-light: #153A62;
  --color-primary-dark: #061828;
  --color-accent: #00875A;
  --color-accent-hover: #006B47;
  --color-gold: #D97706;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
}

body {
  font-family: var(--font-body);
  color: #334155;
  background-color: #F8FAFC;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
  font-family: var(--font-heading);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ==========================================================================
   Typography & Editorial Prose Engine (.prose)
   Fixes unstyled WordPress post/page content and legal documentation
   ========================================================================== */
.prose {
  color: #334155;
  font-size: 1rem;
  line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-family: var(--font-heading);
  color: #0A2540;
  letter-spacing: -0.02em;
}

.prose h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E2E8F0;
  color: #0A2540;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: #0A2540;
}

.prose h4 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #16365C;
}

.prose p {
  margin-top: 1rem;
  margin-bottom: 1rem;
  line-height: 1.75;
  color: #334155;
}

.prose ul {
  list-style-type: disc !important;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem !important;
}

.prose ol {
  list-style-type: decimal !important;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem !important;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.65;
  color: #334155;
  padding-left: 0.25rem;
}

.prose li::marker {
  color: #00875A;
  font-size: 1.1em;
}

.prose strong,
.prose b {
  font-weight: 700;
  color: #0A2540;
}

.prose em,
.prose i {
  font-style: italic;
}

.prose a {
  color: #00875A;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.prose a:hover {
  color: #006B47;
}

.prose blockquote {
  font-style: italic;
  color: #334155;
  border-left: 4px solid #00875A;
  background-color: #F8FAFC;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid #E2E8F0;
  margin: 2.5rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.prose th {
  background-color: #F8FAFC;
  color: #0A2540;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid #E2E8F0;
}

.prose td {
  padding: 0.75rem 1rem;
  border: 1px solid #E2E8F0;
  color: #334155;
}

/* Header User Navigation Dropdown */
.nav-item-dropdown.is-open .header-user-dropdown-panel {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.nav-item-dropdown.is-open .header-chevron-icon {
  transform: rotate(180deg) !important;
}

/* ==========================================================================
   Responsive Grid & Column Span Utilities
   Fixes layout breakage on marketplace search and filter controls
   ========================================================================== */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .sm\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }

  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .sm\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .sm\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .sm\:col-span-1 {
    grid-column: span 1 / span 1 !important;
  }

  .sm\:col-span-2 {
    grid-column: span 2 / span 2 !important;
  }

  .sm\:col-span-3 {
    grid-column: span 3 / span 3 !important;
  }

  .sm\:col-span-4 {
    grid-column: span 4 / span 4 !important;
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .md\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .md\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .md\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }

  .md\:col-span-1 {
    grid-column: span 1 / span 1 !important;
  }

  .md\:col-span-2 {
    grid-column: span 2 / span 2 !important;
  }

  .md\:col-span-3 {
    grid-column: span 3 / span 3 !important;
  }

  .md\:col-span-4 {
    grid-column: span 4 / span 4 !important;
  }

  .md\:col-span-5 {
    grid-column: span 5 / span 5 !important;
  }

  .md\:col-span-6 {
    grid-column: span 6 / span 6 !important;
  }

  .md\:col-span-7 {
    grid-column: span 7 / span 7 !important;
  }

  .md\:col-span-8 {
    grid-column: span 8 / span 8 !important;
  }

  .md\:col-span-9 {
    grid-column: span 9 / span 9 !important;
  }

  .md\:col-span-10 {
    grid-column: span 10 / span 10 !important;
  }

  .md\:col-span-11 {
    grid-column: span 11 / span 11 !important;
  }

  .md\:col-span-12 {
    grid-column: span 12 / span 12 !important;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }

  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .lg\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .lg\:grid-cols-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }

  .lg\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }

  .lg\:col-span-1 {
    grid-column: span 1 / span 1 !important;
  }

  .lg\:col-span-2 {
    grid-column: span 2 / span 2 !important;
  }

  .lg\:col-span-3 {
    grid-column: span 3 / span 3 !important;
  }

  .lg\:col-span-4 {
    grid-column: span 4 / span 4 !important;
  }

  .lg\:col-span-5 {
    grid-column: span 5 / span 5 !important;
  }

  .lg\:col-span-6 {
    grid-column: span 6 / span 6 !important;
  }

  .lg\:col-span-7 {
    grid-column: span 7 / span 7 !important;
  }

  .lg\:col-span-8 {
    grid-column: span 8 / span 8 !important;
  }

  .lg\:col-span-9 {
    grid-column: span 9 / span 9 !important;
  }

  .lg\:col-span-10 {
    grid-column: span 10 / span 10 !important;
  }

  .lg\:col-span-11 {
    grid-column: span 11 / span 11 !important;
  }

  .lg\:col-span-12 {
    grid-column: span 12 / span 12 !important;
  }
}

/* Explicit Marketplace Filter Card Styling */
#marketplace-filters-form .form-input {
  width: 100%;
  display: block;
  box-sizing: border-box;
}
/* ==========================================================================
   Spanish (GTranslate) Responsive Layer
   --------------------------------------------------------------------------
   `html.cin-lang-es` is set by the inline script in inc/enqueue.php only while
   Spanish is active, so none of these rules affect the English layout.
   Exception: the dashboard language <select> styling (section 3), which keeps
   the switcher looking identical before and after a language change.
   ========================================================================== */

/* 1. Global safety: long Spanish words wrap instead of overflowing */
html.cin-lang-es body {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 639px) {
  html.cin-lang-es h1,
  html.cin-lang-es h2,
  html.cin-lang-es h3 {
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  /* Buttons may wrap to two lines on phones rather than overflow */
  html.cin-lang-es .btn {
    white-space: normal;
    text-align: center;
  }
}

/* 2. Public site header */
html.cin-lang-es .site-header-row {
  gap: 0.75rem;
}

html.cin-lang-es .site-primary-nav > a,
html.cin-lang-es .site-header-actions > *,
html.cin-lang-es .site-header-actions .nav-dropdown-toggle {
  white-space: nowrap;
}

@media (min-width: 1024px) {
  html.cin-lang-es .site-primary-nav {
    gap: 0;
  }

  html.cin-lang-es .site-primary-nav > a {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.8125rem;
  }

  html.cin-lang-es .site-header-actions {
    gap: 0.5rem;
  }

  /* Width is otherwise set by the hidden "Select Language" option */
  html.cin-lang-es .header-language-switcher select.gt_selector {
    width: 8.5rem;
    text-overflow: ellipsis;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  html.cin-lang-es .site-header-row {
    gap: 0.5rem;
  }

  html.cin-lang-es .header-language-switcher select.gt_selector {
    width: 6.25rem;
    padding-right: 1.6rem;
  }

  html.cin-lang-es .site-primary-nav > a {
    padding-left: 0.3125rem;
    padding-right: 0.3125rem;
    font-size: 0.78125rem;
  }

  html.cin-lang-es .site-header-actions > button {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }

  /* Drop the globe icon inside the select to save width */
  html.cin-lang-es .header-language-switcher select.gt_selector {
    padding-left: 0.65rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-position: right 0.65rem center;
    background-size: 0.75rem 0.75rem;
  }
}

/* Dropdown panels inside the action groups keep normal wrapping */
html.cin-lang-es .header-user-dropdown-panel,
html.cin-lang-es #user-dropdown-menu,
html.cin-lang-es #notifications-menu {
  white-space: normal;
}

/* When Spanish labels can't fit on one line, use the hamburger drawer */
#site-header.cin-nav-condensed .site-primary-nav,
#site-header.cin-nav-condensed .site-header-actions {
  display: none !important;
}

#site-header.cin-nav-condensed .site-header-toggle {
  display: flex !important;
}

#site-header.cin-nav-condensed #mobile-menu:not(.hidden) {
  display: block !important;
}

/* Mobile drawer: keep the language row tidy */
html.cin-lang-es .mobile-language-switcher {
  gap: 0.75rem;
}

html.cin-lang-es .mobile-language-switcher > span {
  white-space: nowrap;
}

/* 3. Dashboard language switcher (consistent in every language and on focus) */
.cin-dashboard-language-switcher .gtranslate_wrapper {
  display: flex;
  align-items: center;
}

.cin-dashboard-language-switcher select.gt_selector {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  max-width: 9.5rem;
  margin: 0;
  padding: 0.25rem 1.35rem 0.25rem 0.35rem;
  border: 0;
  border-radius: 0.5rem;
  outline: none;
  box-shadow: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.3rem center;
  background-size: 0.7rem 0.7rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cin-dashboard-language-switcher select.gt_selector:focus,
.cin-dashboard-language-switcher select.gt_selector:focus-visible {
  outline: none;
  box-shadow: none;
}

.cin-dashboard-language-switcher:focus-within {
  border-color: #94A3B8;
  box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.08);
}

.cin-dashboard-language-switcher select.gt_selector option {
  color: #0F172A;
  background-color: #FFFFFF;
}

/* 4. Dashboard topbar (applies in every language; only takes effect when space is tight) */
.cin-topbar-row {
  gap: 0.75rem;
}

.cin-topbar-left {
  flex: 1 1 auto;
  min-width: 0;
}

.cin-topbar-breadcrumb {
  min-width: 0;
}

.cin-topbar-breadcrumb > a,
.cin-topbar-breadcrumb > span:not(.cin-topbar-title) {
  flex-shrink: 0;
  white-space: nowrap;
}

.cin-topbar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cin-topbar-actions {
  flex-shrink: 0;
}

.cin-topbar-actions > * {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .cin-topbar-row {
    gap: 0.5rem;
  }

  .cin-topbar-left {
    gap: 0.5rem;
  }

  .cin-topbar-actions {
    gap: 0.25rem;
  }

  /* Give the page title room: the "Portal /" crumb is also in the drawer */
  .cin-topbar-breadcrumb > a,
  .cin-topbar-breadcrumb > span:not(.cin-topbar-title) {
    display: none;
  }

  .cin-topbar-title {
    max-width: none;
  }

  .cin-dashboard-language-switcher {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .cin-dashboard-language-switcher select.gt_selector {
    width: 5.25rem;
  }
}

/* Progressive compaction, applied only when the Spanish bar does not fit */
.cin-topbar-row.cin-topbar-fit-1 .cin-topbar-pill {
  display: none !important;
}

.cin-topbar-row.cin-topbar-fit-2 .cin-topbar-cta > span {
  display: none;
}

.cin-topbar-row.cin-topbar-fit-2 .cin-topbar-cta {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

.cin-topbar-row.cin-topbar-fit-2 .cin-topbar-cta:not(:has(svg)) {
  display: none !important;
}

.cin-topbar-row.cin-topbar-fit-3 #user-dropdown-button > span,
.cin-topbar-row.cin-topbar-fit-3 #user-dropdown-button > svg {
  display: none !important;
}

/* 5. Dashboard sidebar brand badge ("PORTAL DE ADMINISTRACIÓN") */
html.cin-lang-es .sidebar-desktop > div:first-child {
  gap: 0.5rem;
}

html.cin-lang-es .sidebar-desktop > div:first-child > a {
  flex-shrink: 0;
}

html.cin-lang-es .sidebar-desktop .sidebar-badge {
  max-width: 7.5rem;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.02em;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

/* 6. Dashboard stat cards ("Consultas directas de inversores  Vista →") */
html.cin-lang-es .cin-stat-footer {
  align-items: flex-end;
}

html.cin-lang-es .cin-stat-note {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

html.cin-lang-es .cin-stat-link {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Dashboard page header: keep action buttons on one line, let the intro text wrap */
@media (min-width: 640px) {
  html.cin-lang-es #dashboard-main-content > div:first-child > div:last-child:not(:only-child) {
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  html.cin-lang-es #dashboard-main-content > div:first-child > div:last-child:not(:only-child) > .btn {
    white-space: nowrap;
  }
}

/* 7. Opportunity submission step tabs */
html.cin-lang-es .cin-step-tab {
  min-width: 0;
  max-width: 100%;
}

html.cin-lang-es .cin-step-tab > span {
  max-width: 100%;
}

/* 8. Home hero */
html.cin-lang-es .hero-review-badges {
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (max-width: 639px) {
  html.cin-lang-es #hero-get-started-btn {
    white-space: normal;
  }

  /* The hero grid column must not be sized by the select's longest option */
  html.cin-lang-es .grid > :has(#hero-objective-select) {
    min-width: 0;
  }

  html.cin-lang-es :has(> #hero-objective-select) {
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  html.cin-lang-es #hero-objective-select {
    flex: 1 1 8rem;
    min-width: 0;
    max-width: 100%;
    text-overflow: ellipsis;
  }
}

/* ==========================================================================
   Opportunity Workflow: Cover Image Field & Change Requests (dashboard)
   Self-contained component styles (the compiled Tailwind build does not
   include every utility, so these components do not rely on it).
   ========================================================================== */
.cin-cover-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.6);
}
.cin-cover-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
}
.cin-cover-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cin-cover-pick {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(10, 37, 64, 0.3);
  border-radius: 0.75rem;
  background: #fff;
  color: #0A2540;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s ease;
}
.cin-cover-pick:hover { background: rgba(10, 37, 64, 0.05); }
#cin-cover-field:focus-within .cin-cover-pick { box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.15); }
.cin-cover-remove {
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  color: #e11d48;
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  transition: background-color .15s ease;
}
.cin-cover-remove:hover { background: #fff1f2; }
.cin-cover-remove.hidden { display: none; }
.cin-cover-status {
  font-size: 0.75rem;
  line-height: 1.5;
  color: #64748b;
  overflow-wrap: anywhere;
}
.cin-cover-status.is-error { color: #e11d48; font-weight: 600; }
@media (min-width: 640px) {
  .cin-cover-box { flex-direction: row; align-items: center; }
  .cin-cover-thumb { width: 14rem; }
}

.cin-preview-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 22rem;
  object-fit: cover;
  border-bottom: 1px solid #f1f5f9;
}

.cin-change-request { scroll-margin-top: 6rem; }
.cin-req-notice {
  margin: 0.75rem 0 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.cin-req-notice.is-pending { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.cin-req-notice.is-declined { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.cin-req-message {
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #dbeafe;
  color: #1e293b;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.cin-req-textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  font-size: 0.875rem;
  color: #0f172a;
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cin-req-textarea:focus {
  outline: none;
  border-color: #0A2540;
  box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.15);
}
.cin-req-actions { display: flex; justify-content: flex-end; }
.cin-req-submit {
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  background: #0A2540;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  transition: background-color .15s ease;
}
.cin-req-submit:hover { background: #00875A; }
@media (max-width: 639px) {
  .cin-req-submit { width: 100%; }
}

/* ==========================================================================
   Dashboard UX Layer (investor + business owner portals)
   Presentation only — no markup behaviour is changed.
   ========================================================================== */

/* --- Clickable stat & quick-action cards (whole card follows its link) --- */
#dashboard-main-content .cin-stat-card,
#dashboard-main-content .cin-quick-grid > .card {
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
#dashboard-main-content .cin-stat-card .cin-stat-link::after,
#dashboard-main-content .cin-quick-grid > .card > div:last-child a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
#dashboard-main-content .cin-stat-card:has(.cin-stat-link):hover,
#dashboard-main-content .cin-quick-grid > .card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .18);
}
#dashboard-main-content .cin-stat-card:focus-within,
#dashboard-main-content .cin-quick-grid > .card:focus-within {
  border-color: #0A2540;
  box-shadow: 0 0 0 3px rgba(10, 37, 64, .15);
}
@media (prefers-reduced-motion: reduce) {
  #dashboard-main-content .cin-stat-card,
  #dashboard-main-content .cin-quick-grid > .card { transition: none; transform: none !important; }
}

/* --- Phones: compact 2-up stats, condensed quick actions --- */
@media (max-width: 639px) {
  #dashboard-main-content .cin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  #dashboard-main-content .cin-stat-card {
    padding: 0.875rem;
    border-radius: 1rem;
  }
  #dashboard-main-content .cin-stat-card > div:first-child { gap: 0.5rem; }
  #dashboard-main-content .cin-stat-card > div:first-child > div:first-child { min-width: 0; }
  #dashboard-main-content .cin-stat-card > div:first-child > div:first-child > span {
    font-size: 0.625rem;
    line-height: 1.3;
    letter-spacing: 0.04em;
  }
  #dashboard-main-content .cin-stat-card .text-3xl { font-size: 1.625rem; line-height: 1.1; }
  #dashboard-main-content .cin-stat-card > div:first-child > div:last-child {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
  }
  #dashboard-main-content .cin-stat-card > div:first-child > div:last-child svg { width: 1.125rem; height: 1.125rem; }
  #dashboard-main-content .cin-stat-footer { margin-top: 0.625rem; padding-top: 0.5rem; }
  #dashboard-main-content .cin-stat-note { display: none; }
  #dashboard-main-content .cin-stat-footer { justify-content: flex-end; }

  #dashboard-main-content .cin-quick-grid { gap: 0.75rem; }
  #dashboard-main-content .cin-quick-grid > .card { padding: 0.875rem 1rem; }
  #dashboard-main-content .cin-quick-grid > .card > div:first-child {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: start;
  }
  #dashboard-main-content .cin-quick-grid > .card > div:first-child > :first-child {
    grid-row: span 2;
    margin-bottom: 0;
  }
  #dashboard-main-content .cin-quick-grid > .card > div:first-child > p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #dashboard-main-content .cin-quick-grid > .card > div:last-child {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    padding-left: 3.25rem;
    border-top: 0;
  }
}

/* --- Responsive data table: rows become cards on small screens --- */
@media (max-width: 767px) {
  #dashboard-main-content .cin-responsive-table,
  #dashboard-main-content .cin-responsive-table tbody { display: block; width: 100%; }
  #dashboard-main-content .cin-responsive-table thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  #dashboard-main-content .cin-responsive-table tbody { border: 0; }
  #dashboard-main-content .cin-responsive-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
  }
  #dashboard-main-content .cin-responsive-table tr:last-child { border-bottom: 0; }
  #dashboard-main-content .cin-responsive-table td {
    display: block;
    padding: 0 !important;
    min-width: 0;
    text-align: left;
    overflow-wrap: anywhere;
  }
  #dashboard-main-content .cin-responsive-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
  }
  #dashboard-main-content .cin-responsive-table .cin-cell-title,
  #dashboard-main-content .cin-responsive-table .cin-cell-actions { grid-column: 1 / -1; }
  #dashboard-main-content .cin-responsive-table .cin-cell-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem !important;
    border-top: 1px dashed #e2e8f0;
  }
  #dashboard-main-content .cin-responsive-table .cin-cell-actions > * { margin: 0 !important; }
}

/* --- Horizontally scrolling tab strips: hide scrollbar, hint overflow --- */
.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }
@media (max-width: 767px) {
  #dashboard-main-content .overflow-x-auto.scrollbar-none {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
    scroll-snap-type: x proximity;
  }
  #dashboard-main-content .overflow-x-auto.scrollbar-none > * { scroll-snap-align: start; }
}

/* --- Topbar dropdowns: keep inside the viewport on phones --- */
@media (max-width: 639px) {
  .cin-topbar-row #notifications-menu,
  .cin-topbar-row #user-dropdown-menu {
    position: fixed;
    top: 4.75rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }
}

/* --- Forms on phones: 16px inputs stop iOS from zooming on focus --- */
@media (max-width: 639px) {
  #dashboard-main-content input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
  #dashboard-main-content select,
  #dashboard-main-content textarea {
    font-size: 16px;
  }
}

/* --- Comfortable touch targets on touch devices --- */
@media (pointer: coarse) {
  #dashboard-main-content .btn-xs,
  #dashboard-main-content .btn-sm { min-height: 2.25rem; }
  #dashboard-main-content .cin-step-tab { min-height: 2.75rem; }
}

/* --- Visible keyboard focus throughout the portal --- */
#dashboard-main-content a:focus-visible,
#dashboard-main-content button:focus-visible,
.cin-topbar-row a:focus-visible,
.cin-topbar-row button:focus-visible {
  outline: 2px solid #00875A;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* --- Long words / emails never force horizontal scrolling --- */
#dashboard-main-content { overflow-wrap: break-word; min-width: 0; }
.main-content-area { min-width: 0; }

/* --- Page header: action buttons never break mid-label (all languages) --- */
@media (min-width: 640px) {
  #dashboard-main-content div:has(> div > h1) > :not(:has(h1)) {
    flex-shrink: 0;
  }
  #dashboard-main-content div:has(> div > h1) > :not(:has(h1)):not(.btn) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
  }
  #dashboard-main-content div:has(> div > h1) > .btn,
  #dashboard-main-content div:has(> div > h1) > :not(:has(h1)) .btn {
    white-space: nowrap;
  }
}

/* --- Responsive data table: richer card grid on tablets --- */
@media (min-width: 768px) and (max-width: 1023px) {
  #dashboard-main-content .cin-responsive-table,
  #dashboard-main-content .cin-responsive-table tbody { display: block; width: 100%; }
  #dashboard-main-content .cin-responsive-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  #dashboard-main-content .cin-responsive-table tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
  }
  #dashboard-main-content .cin-responsive-table tr:last-child { border-bottom: 0; }
  #dashboard-main-content .cin-responsive-table td { display: block; padding: 0 !important; min-width: 0; text-align: left; }
  #dashboard-main-content .cin-responsive-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
  }
  #dashboard-main-content .cin-responsive-table .cin-cell-title { grid-column: 1 / -1; }
  #dashboard-main-content .cin-responsive-table .cin-cell-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.75rem !important;
    border-top: 1px dashed #e2e8f0;
  }
  #dashboard-main-content .cin-responsive-table .cin-cell-actions > * { margin: 0 !important; }
}

/* --- Table row actions stay on one line on desktop --- */
@media (min-width: 1024px) {
  #dashboard-main-content .cin-responsive-table .cin-cell-actions { white-space: nowrap; }
}

/* --- Dashboard layout width: content and topbar share one wide, aligned frame --- */
#dashboard-main-content,
.cin-topbar-row.max-w-7xl {
  max-width: 100rem; /* 1600px: fills typical desktop screens, caps ultra-wide ones */
}
