/* ============================================
   Chrysanthemum Holdings — Slate Theme
   Professional, consistent across all pages
   ============================================ */
:root {
    --ch-primary: #2c3e50;
    --ch-primary-dark: #1a252f;
    --ch-accent: #475569;
    --ch-accent-light: #64748b;
    --ch-bg: #f8fafc;
    --ch-text: #334155;
    --ch-text-muted: #64748b;
    --ch-border: #e2e8f0;
}

/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--ch-bg);
    color: var(--ch-text);
    margin: 20px;
    line-height: 1.6;
}

/* Headings — slate */
.text-darkgreen {
    color: var(--ch-primary) !important;
}

h1.text-darkgreen, h2.text-darkgreen, h3.text-darkgreen, h4.text-darkgreen {
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Navbar — slate */
.navbar-dark, .navbar.bg-dark {
    background-color: var(--ch-primary) !important;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
}

.navbar-nav .text-danger {
    color: #dc3545 !important;
}

.navbar-nav .text-success {
    color: #22c55e !important;
}

/* Table Styling — slate, no green */
.table th,
.table thead th,
thead th {
    background-color: var(--ch-primary) !important;
    color: white !important;
    font-weight: 600;
    border-color: var(--ch-primary-dark) !important;
}

.table.table-dark th,
.table.table-striped th,
thead.table-dark th {
    background-color: var(--ch-primary) !important;
    color: white !important;
    border-color: var(--ch-primary-dark);
}

/* Override Bootstrap green table variants */
.table-success,
.table-success > th,
.table-success > td,
thead.table-success th {
    background-color: #f1f5f9 !important;
    color: var(--ch-text) !important;
    border-color: var(--ch-border);
}

.table-bordered {
    border-color: var(--ch-border);
}

.table-bordered th,
.table-bordered td {
    border-color: var(--ch-border);
}

/* Striped rows — subtle slate tint, no green */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(241, 245, 249, 0.5);
}
.table-striped > tbody > tr:nth-of-type(even) > * {
    --bs-table-accent-bg: transparent;
}

/* Buttons — slate */
.btn-primary {
    background-color: var(--ch-primary);
    border-color: var(--ch-primary);
}

.btn-primary:hover {
    background-color: var(--ch-primary-dark);
    border-color: var(--ch-primary-dark);
}

.btn-success {
    background-color: var(--ch-accent);
    border-color: var(--ch-accent);
}

.btn-success:hover {
    background-color: var(--ch-accent-light);
    border-color: var(--ch-accent-light);
}

/* Badges */
.badge.bg-success {
    background-color: var(--ch-accent) !important;
}

/* Icon buttons — professional hover states */
.btn[title]:hover,
.btn[data-bs-toggle]:hover,
.btn-sm:hover,
a.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn-outline-info:hover { background-color: #0dcaf0; color: #000; border-color: #0dcaf0; }
.btn-outline-primary:hover { background-color: var(--ch-primary); color: #fff; border-color: var(--ch-primary); }
.btn-outline-secondary:hover { background-color: var(--ch-accent); color: #fff; border-color: var(--ch-accent); }
.btn-outline-danger:hover { background-color: #dc3545; color: #fff; border-color: #dc3545; }
.btn-outline-dark:hover { background-color: #212529; color: #fff; border-color: #212529; }
.btn-warning:hover { background-color: #ffc107; border-color: #ffc107; color: #000; }

/* Expansion banner */
.banner-expansion {
    background-color: var(--ch-primary) !important;
    color: rgba(255,255,255,0.95) !important;
}

/* Footer */
footer.bg-dark {
    background-color: var(--ch-primary) !important;
}

.fixed-table {
    width: 100%; /* Ensures both tables take full width */
    max-width: 600px; /* Set max width to avoid oversized tables */
    border-collapse: collapse;
}

.fixed-table th, .fixed-table td {
    width: 50%; /* Ensures equal column width */
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
}

.fixed-table th {
    background-color: var(--ch-primary);
    color: white;
    text-align: center;
}


/* Map Styles — Leaflet requires explicit dimensions and position */
#map {
    width: 100%;
    min-height: 500px;
    height: 600px;
    border-radius: 8px;
    position: relative;
    background: #e5e7eb;
}
#map .leaflet-tile-pane { z-index: 1; }
#map .leaflet-overlay-pane { z-index: 2; }
.emoji-marker, .leaflet-div-icon.emoji-marker { background: none !important; border: none !important; }

@import url('https://fonts.googleapis.com/css2?family=Oswald&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap');

@media print {
	body {
		margin: 0 !important;
	}
}

.container-wide {
    max-width: 85%;
    margin: 0 auto;
}

.main-container {
	font-family: 'Lato';
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
}

.ck-content {
	font-family: 'Lato';
	line-height: 1.6;
	word-break: break-word;
}

.editor-container_classic-editor .editor-container__editor {
	min-width: 795px;
	max-width: 795px;
}

.editor-container_include-block-toolbar {
	margin-left: 42px;
}

.ck-content h3.category {
	font-family: 'Oswald';
	font-size: 20px;
	font-weight: bold;
	color: #555;
	letter-spacing: 10px;
	margin: 0;
	padding: 0;
}

.ck-content h2.document-title {
	font-family: 'Oswald';
	font-size: 50px;
	font-weight: bold;
	margin: 0;
	padding: 0;
	border: 0;
}

.ck-content h3.document-subtitle {
	font-family: 'Oswald';
	font-size: 20px;
	color: #555;
	margin: 0 0 1em;
	font-weight: bold;
	padding: 0;
}

.ck-content p.info-box {
	--background-size: 30px;
	--background-color: #e91e63;
	padding: 1.2em 2em;
	border: 1px solid var(--background-color);
	background: linear-gradient(
			135deg,
			var(--background-color) 0%,
			var(--background-color) var(--background-size),
			transparent var(--background-size)
		),
		linear-gradient(
			135deg,
			transparent calc(100% - var(--background-size)),
			var(--background-color) calc(100% - var(--background-size)),
			var(--background-color)
		);
	border-radius: 10px;
	margin: 1.5em 2em;
	box-shadow: 5px 5px 0 #ffe6ef;
}

.ck-content blockquote.side-quote {
	font-family: 'Oswald';
	font-style: normal;
	float: right;
	width: 35%;
	position: relative;
	border: 0;
	overflow: visible;
	z-index: 1;
	margin-left: 1em;
}

.ck-content blockquote.side-quote::before {
	content: '“';
	position: absolute;
	top: -37px;
	left: -10px;
	display: block;
	font-size: 200px;
	color: #e7e7e7;
	z-index: -1;
	line-height: 1;
}

.ck-content blockquote.side-quote p {
	font-size: 2em;
	line-height: 1;
}

.ck-content blockquote.side-quote p:last-child:not(:first-child) {
	font-size: 1.3em;
	text-align: right;
	color: #555;
}

.ck-content span.marker {
	background: yellow;
}

.ck-content span.spoiler {
	background: #000;
	color: #000;
}

.ck-content span.spoiler:hover {
	background: #000;
	color: #fff;
}

.ck-content pre.fancy-code {
	border: 0;
	margin-left: 2em;
	margin-right: 2em;
	border-radius: 10px;
}

.ck-content pre.fancy-code::before {
	content: '';
	display: block;
	height: 13px;
	background: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NCAxMyI+CiAgPGNpcmNsZSBjeD0iNi41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiNGMzZCNUMiLz4KICA8Y2lyY2xlIGN4PSIyNi41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiNGOUJFNEQiLz4KICA8Y2lyY2xlIGN4PSI0Ny41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiM1NkM0NTMiLz4KPC9zdmc+Cg==);
	margin-bottom: 8px;
	background-repeat: no-repeat;
}

.ck-content pre.fancy-code-dark {
	background: #272822;
	color: #fff;
	box-shadow: 5px 5px 0 #0000001f;
}

.ck-content pre.fancy-code-bright {
	background: #dddfe0;
	color: #000;
	box-shadow: 5px 5px 0 #b3b3b3;
}

/* ============================================
   Dashboard — clean, professional, well-styled
   Shared by Home, Admin, Lead Attribution
   ============================================ */

/* Dashboard page wrapper: full width, background, padding */
.dashboard-page {
	background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
	min-height: 60vh;
	padding: 1.5rem 0 2rem;
}

.dashboard-section {
	margin-bottom: 2.25rem;
}

.dashboard-section-title {
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ch-text-muted);
	margin-bottom: 0.875rem;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid var(--ch-primary);
}

.dashboard-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-card:hover {
	border-color: var(--ch-accent);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dashboard-card h5 {
	font-size: 1rem;
	font-weight: 600;
	color: var(--ch-primary);
	margin-bottom: 0.4rem;
}

.dashboard-card p {
	font-size: 0.8125rem;
	color: #64748b;
	margin-bottom: 1rem;
	line-height: 1.5;
	flex: 1;
}

.dashboard-card .btn {
	font-size: 0.8125rem;
	font-weight: 500;
	width: 100%;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
}

.dashboard-card .btn-outline-primary {
	border-color: #94a3b8;
	color: #475569;
}

.dashboard-card .btn-outline-primary:hover {
	background: #f1f5f9;
	border-color: var(--ch-primary);
	color: var(--ch-primary);
}

.dashboard-card .btn-outline-secondary {
	border-color: #cbd5e1;
	color: #64748b;
}

.dashboard-card .btn-outline-secondary:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
	color: #475569;
}

.dashboard-card .btn-primary {
	background: var(--ch-primary);
	border-color: var(--ch-primary);
}

.dashboard-card .btn-success {
	background: var(--ch-accent);
	border-color: var(--ch-accent);
}

.dashboard-page-title {
	color: var(--ch-primary);
	font-weight: 700;
	font-size: 1.5rem;
	letter-spacing: -0.02em;
}

.dashboard-page-subtitle {
	color: #64748b;
	font-size: 0.875rem;
}

.dashboard-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

@media (min-width: 768px) {
	.dashboard-card-grid {
		grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
		gap: 1.25rem;
	}
}

/* Dashboard cards/tables (Admin, Lead Attribution) */
.dashboard-page .card {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-page .card-header {
	background: var(--ch-primary);
	color: #fff;
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: 8px 8px 0 0;
	padding: 0.75rem 1rem;
}

.dashboard-page .card-header h5,
.dashboard-page .card-header h6 {
	color: inherit;
	margin: 0;
	font-size: 0.95rem;
}

.dashboard-page .table th {
	background: #f1f5f9;
	color: var(--ch-primary);
	font-weight: 600;
	font-size: 0.875rem;
}

.dashboard-page .table td {
	border-color: #e2e8f0;
}

.dashboard-page .list-group-item {
	border-color: #e2e8f0;
}

.dashboard-page .badge {
	font-weight: 500;
}

/* Dashboard header bar */
.dashboard-header {
	background: #fff;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	border: 1px solid #e2e8f0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Form pages (login, contact, etc.) — centered card matching dashboard */
.dashboard-page .form-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	padding: 1.5rem 2rem;
	max-width: 480px;
	margin: 0 auto;
}

.dashboard-page .form-card .card-title,
.dashboard-page .form-card h3 {
	color: var(--ch-primary);
	font-weight: 600;
}

/* Alert styling inside dashboard */
.dashboard-page .alert-info {
	background-color: #f0f9ff;
	border-color: #bae6fd;
	color: #0c4a6e;
}

.dashboard-page .alert-warning {
	background-color: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}
