/* Agency CRM — Standalone Edition. Corporate light glassmorphism, v2. */
:root {
	/* Dark sidebar stays dark so the full-color EK logo (white wordmark)
	   stays legible — a light sidebar would need a second logo variant. */
	--ek-sidebar-bg: #0B0F1A;
	--ek-sidebar-border: rgba(255, 255, 255, 0.08);
	--ek-sidebar-text: #93A0B4;
	--ek-sidebar-text-active: #ffffff;

	/* Main content: light glassmorphism. */
	--ek-bg: #EFF2F9;
	--ek-surface: rgba(255, 255, 255, 0.72);
	--ek-surface-solid: #ffffff;
	--ek-border: rgba(15, 23, 42, 0.08);
	--ek-border-strong: rgba(15, 23, 42, 0.14);
	--ek-text: #1E293B;
	--ek-text-strong: #0F172A;
	--ek-muted: #64748B;

	--ek-magenta: #E91E8C;
	--ek-amber: #F5A623;
	--ek-teal: #14C9A5;
	--ek-azure: #2E9BF0;
	--ek-success: #16A34A;
	--ek-warning: #D97706;
	--ek-danger: #DC2626;

	--ek-radius: 16px;
	--ek-radius-sm: 10px;
	--ek-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
	background:
		radial-gradient(circle at 10% 0%, rgba(233, 30, 140, 0.07), transparent 40%),
		radial-gradient(circle at 90% 15%, rgba(46, 155, 240, 0.07), transparent 45%),
		radial-gradient(circle at 50% 100%, rgba(20, 201, 165, 0.06), transparent 50%),
		var(--ek-bg);
	color: var(--ek-text);
	min-height: 100vh;
}

.acrm-shell { display: flex; min-height: 100vh; }

/* ---------- SIDEBAR (dark, holds the logo) ---------- */
.acrm-sidebar {
	width: 230px;
	flex-shrink: 0;
	background: var(--ek-sidebar-bg);
	border-right: 1px solid var(--ek-sidebar-border);
	padding: 24px 16px;
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
}

.acrm-brand { margin-bottom: 24px; display: flex; align-items: center; }
.acrm-brand img { max-width: 150px; width: 100%; height: auto; display: block; }
.acrm-brand-fallback {
	font-weight: 700; font-size: 16px; color: #fff;
}

.acrm-sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.acrm-sidebar nav a {
	color: var(--ek-sidebar-text);
	text-decoration: none;
	padding: 10px 12px;
	border-radius: var(--ek-radius-sm);
	font-size: 14px;
	font-weight: 600;
}

.acrm-sidebar nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.acrm-sidebar nav a.active {
	background: linear-gradient(90deg, rgba(233, 30, 140, 0.25), rgba(46, 155, 240, 0.25));
	color: var(--ek-sidebar-text-active);
}

.acrm-logout { color: var(--ek-sidebar-text); text-decoration: none; font-size: 13px; padding: 10px 12px; }
.acrm-logout:hover { color: var(--ek-danger); }

/* Mobile nav toggle (hidden on desktop) */
.acrm-mobile-topbar { display: none; }

/* ---------- MAIN CONTENT (light glass) ---------- */
.acrm-main { flex: 1; padding: 32px 36px; max-width: 1300px; }

h1 {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 24px 0;
	color: var(--ek-text-strong);
}

.acrm-card {
	background: var(--ek-surface);
	backdrop-filter: blur(20px) saturate(160%);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	border: 1px solid var(--ek-border);
	border-radius: var(--ek-radius);
	box-shadow: var(--ek-shadow);
	padding: 22px;
	margin-bottom: 16px;
	transition: box-shadow 0.15s ease;
}

.acrm-dash-section-label {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ek-muted);
	margin-bottom: 10px;
	padding-left: 2px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.acrm-dash-section-label::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--ek-border-strong);
}

.acrm-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 8px; }
.acrm-kpi-grid .acrm-card {
	position: relative; overflow: hidden; padding: 22px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
}
.acrm-kpi-grid .acrm-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08); }

.acrm-kpi-icon {
	width: 40px; height: 40px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 14px;
	background: rgba(100, 116, 139, 0.10);
	color: var(--ek-muted);
}
.acrm-kpi-icon svg { width: 19px; height: 19px; stroke-width: 2; }

/* One consistent color per dashboard SECTION, not a rotating rainbow per
   card — this is what actually reads as "designed" instead of "random". */
.acrm-section-client .acrm-kpi-icon { background: rgba(233, 30, 140, 0.10); color: var(--ek-magenta); }
.acrm-section-financial .acrm-kpi-icon { background: rgba(20, 201, 165, 0.12); color: #0F766E; }
.acrm-section-service .acrm-kpi-icon { background: rgba(46, 155, 240, 0.12); color: #1D4ED8; }

.acrm-section-client .acrm-dash-section-label { color: var(--ek-magenta); }
.acrm-section-financial .acrm-dash-section-label { color: #0F766E; }
.acrm-section-service .acrm-dash-section-label { color: #1D4ED8; }

.acrm-kpi-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ek-muted); font-weight: 700; margin-bottom: 6px; }
.acrm-kpi-value { font-size: 28px; font-weight: 800; color: var(--ek-text-strong); letter-spacing: -0.02em; line-height: 1.1; }

.acrm-section-title { font-size: 14px; font-weight: 700; color: var(--ek-text-strong); margin: 0 0 14px 0; display: flex; align-items: center; justify-content: space-between; }

.acrm-list-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ek-border); font-size: 13px; }
.acrm-list-row:last-child { border-bottom: none; }

.acrm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.acrm-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ek-muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--ek-border-strong); }
.acrm-table td { padding: 12px 14px; border-bottom: 1px solid var(--ek-border); }
.acrm-table tr:hover td { background: rgba(15, 23, 42, 0.02); }
.acrm-table a { color: var(--ek-azure); text-decoration: none; font-weight: 600; }
.acrm-table a:hover { text-decoration: underline; }

.acrm-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: capitalize; border: 1px solid transparent; }
.acrm-badge.status-active { background: rgba(22, 163, 74, 0.1); color: #15803D; border-color: rgba(22, 163, 74, 0.25); }
.acrm-badge.status-lead, .acrm-badge.status-prospect { background: rgba(46, 155, 240, 0.1); color: #1D6FC7; border-color: rgba(46, 155, 240, 0.25); }
.acrm-badge.status-paused, .acrm-badge.status-renewal_due, .acrm-badge.status-onboarding { background: rgba(217, 119, 6, 0.1); color: #B45309; border-color: rgba(217, 119, 6, 0.25); }
.acrm-badge.status-inactive, .acrm-badge.status-lost { background: rgba(220, 38, 38, 0.1); color: #B91C1C; border-color: rgba(220, 38, 38, 0.25); }
.acrm-badge.priority-urgent, .acrm-badge.priority-high { background: rgba(220, 38, 38, 0.1); color: #B91C1C; border-color: rgba(220, 38, 38, 0.25); }
.acrm-badge.priority-medium { background: rgba(217, 119, 6, 0.1); color: #B45309; border-color: rgba(217, 119, 6, 0.25); }
.acrm-badge.priority-low { background: rgba(100, 116, 139, 0.1); color: #475569; border-color: rgba(100, 116, 139, 0.25); }

.acrm-btn {
	background: linear-gradient(90deg, var(--ek-magenta) 0%, var(--ek-amber) 100%);
	color: #fff; border: none; border-radius: 10px; padding: 10px 20px;
	font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none;
	display: inline-block; box-shadow: 0 4px 14px rgba(233, 30, 140, 0.22);
}
.acrm-btn:hover { filter: brightness(1.04); }
.acrm-btn-secondary { background: rgba(15, 23, 42, 0.04); border: 1px solid var(--ek-border-strong); box-shadow: none; color: var(--ek-text); }
.acrm-btn-small { padding: 6px 12px; font-size: 12px; }

/* ---------- FORM CONTROLS ----------
   The white-box/invisible-text bug lived here: a <select>'s dropdown
   LIST is rendered by the OS/browser, not by our card CSS. Explicitly
   setting background+color on both the closed control AND its <option>
   elements is what actually fixes it, on every browser. */
.acrm-input, select.acrm-input, textarea.acrm-input {
	background: #ffffff;
	border: 1px solid var(--ek-border-strong);
	border-radius: var(--ek-radius-sm);
	padding: 10px 14px;
	font-size: 13px;
	color: var(--ek-text);
	width: 100%;
	font-family: inherit;
}
select.acrm-input option {
	background: #ffffff;
	color: var(--ek-text);
}
.acrm-input::placeholder { color: #94A3B8; }
.acrm-input:focus { outline: none; border-color: var(--ek-azure); box-shadow: 0 0 0 3px rgba(46, 155, 240, 0.15); }

.acrm-form-row { margin-bottom: 14px; }
.acrm-form-row label { display: block; font-size: 12px; font-weight: 600; color: var(--ek-muted); margin-bottom: 6px; }
.acrm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.acrm-flash { padding: 12px 18px; border-radius: var(--ek-radius-sm); margin-bottom: 20px; font-size: 13px; font-weight: 600; }
.acrm-flash-success { background: rgba(22, 163, 74, 0.08); color: #15803D; border: 1px solid rgba(22, 163, 74, 0.25); }
.acrm-flash-error { background: rgba(220, 38, 38, 0.08); color: #B91C1C; border: 1px solid rgba(220, 38, 38, 0.25); }

.acrm-muted { color: var(--ek-muted); font-size: 12px; }
.acrm-empty { text-align: center; padding: 32px; color: var(--ek-muted); font-size: 13px; }
.acrm-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.acrm-filters { display: flex; gap: 10px; flex: 1; max-width: 500px; }
.acrm-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.acrm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.acrm-reminder-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ek-border); font-size: 13px; }
.acrm-reminder-row:last-child { border-bottom: none; }
.acrm-reminder-row.overdue { color: #B91C1C; }
.acrm-reminder-date { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(15, 23, 42, 0.06); white-space: nowrap; }
.acrm-reminder-row.overdue .acrm-reminder-date { background: rgba(220, 38, 38, 0.12); color: #B91C1C; }

/* Calendar */
.acrm-calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.acrm-calendar-table th { padding: 10px; font-size: 11px; text-transform: uppercase; color: var(--ek-muted); border-bottom: 1px solid var(--ek-border-strong); text-align: left; }
.acrm-calendar-table td { vertical-align: top; padding: 8px; height: 90px; border: 1px solid var(--ek-border); }
.acrm-cal-empty { background: rgba(15, 23, 42, 0.015); }
.acrm-cal-daynum { font-size: 12px; font-weight: 700; color: var(--ek-muted); margin-bottom: 4px; }
.acrm-cal-today { background: rgba(46, 155, 240, 0.06); }
.acrm-cal-today .acrm-cal-daynum { color: var(--ek-azure); }
.acrm-cal-event { font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
	.acrm-calendar-table td { height: 60px; padding: 4px; }
	.acrm-cal-event { display: none; }
}

/* Login page (kept dark to match the full-color logo) */
.acrm-login-wrap {
	min-height: 100vh; display: flex; align-items: center; justify-content: center;
	background:
		radial-gradient(circle at 8% 0%, rgba(233, 30, 140, 0.13), transparent 42%),
		radial-gradient(circle at 92% 10%, rgba(46, 155, 240, 0.13), transparent 45%),
		#0B0F1A;
}
.acrm-login-wrap .acrm-card {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #F1F5F9;
}
.acrm-login-wrap .acrm-input { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); color: #F1F5F9; }
.acrm-login-wrap .acrm-muted { color: #93A0B4; }
.acrm-login-card { width: 360px; text-align: center; }
.acrm-login-card img { max-width: 220px; margin: 0 auto 8px auto; }

/* ---------- MOBILE RESPONSIVENESS ---------- */
@media (max-width: 960px) {
	.acrm-grid-2, .acrm-grid-3 { grid-template-columns: 1fr; }
	.acrm-kpi-grid { grid-template-columns: repeat(2, 1fr); }
	.acrm-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
	.acrm-shell { flex-direction: column; }

	.acrm-sidebar {
		width: 100%; height: auto; position: relative;
		flex-direction: row; align-items: center; padding: 12px 16px;
		overflow-x: auto;
	}
	.acrm-brand { margin-bottom: 0; margin-right: 16px; flex-shrink: 0; }
	.acrm-brand img { max-width: 110px; }
	.acrm-sidebar nav { flex-direction: row; flex: 1; overflow-x: auto; }
	.acrm-sidebar nav a { white-space: nowrap; padding: 8px 10px; font-size: 13px; }
	.acrm-logout { flex-shrink: 0; }

	.acrm-main { padding: 18px; }
	.acrm-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.acrm-kpi-value { font-size: 20px; }
	h1 { font-size: 20px; }

	.acrm-toolbar { flex-direction: column; align-items: stretch; }
	.acrm-filters { flex-direction: column; max-width: none; }

	.acrm-table { display: block; overflow-x: auto; white-space: nowrap; }

	.acrm-login-card { width: 92vw; }
}
