:root {
	--ocean-deep: #052F5F;
	--ocean-mid: #0B5FA5;
	--ocean-bright: #3E8EDE;
	--ocean-sky: #5070FF;
	--coral: #F7941D;
	--coral-light: #FFB25C;
	--foam: #F4FAFF;
	--ink: #0F2A3D;
	--muted: #6b8299;
	--border: #dbe9f5;

	--font-display: 'Baloo 2', 'Segoe UI', sans-serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font-body);
	background: var(--ocean-deep);
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* ---------- Login ---------- */
#fsc-login-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle at 30% 20%, var(--ocean-bright) 0%, var(--ocean-mid) 45%, var(--ocean-deep) 100%);
	position: relative;
	overflow: hidden;
}
#fsc-login-wrap::before {
	content: "";
	position: absolute; inset: 0;
	background-image: url('https://fintasticswimacademy.com/wp-content/uploads/2025/02/Starfish-V2.webp');
	background-repeat: repeat;
	background-size: 140px 140px;
	opacity: 0.05;
	pointer-events: none;
}
#fsc-login-box {
	background: rgba(255,255,255,0.97);
	border-radius: 24px;
	padding: 48px 40px;
	width: 100%;
	max-width: 360px;
	text-align: center;
	box-shadow: 0 25px 60px rgba(5,47,95,0.45);
	position: relative;
	z-index: 1;
}
#fsc-login-logo { height: 64px; margin-bottom: 16px; filter: drop-shadow(0 4px 10px rgba(11,95,165,0.25)); }
#fsc-login-box h2 {
	margin: 0 0 24px; color: var(--ocean-deep); font-size: 26px;
	font-family: var(--font-display); font-weight: 700; letter-spacing: 0.3px;
}
#fsc-login-box input {
	width: 100%; padding: 13px 16px; margin-bottom: 12px;
	border: 2px solid var(--border); border-radius: 12px; font-size: 14.5px;
	font-family: var(--font-body); background: var(--foam); transition: border-color 0.15s ease;
}
#fsc-login-box input:focus { outline: none; border-color: var(--ocean-sky); background: #fff; }
#fsc-login-box button {
	width: 100%; padding: 13px; background: linear-gradient(135deg, var(--coral), var(--coral-light));
	color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 700;
	font-family: var(--font-display); cursor: pointer; letter-spacing: 0.3px;
	box-shadow: 0 8px 20px rgba(247,148,29,0.35); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#fsc-login-box button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(247,148,29,0.45); }
.fsc-login-error { color: #c0392b; font-size: 13px; margin-bottom: 12px; background: #fdecea; padding: 8px 12px; border-radius: 8px; }

/* ---------- App shell ---------- */
#fsc-app {
	display: flex;
	width: 100%;
	height: 100vh;
	overflow: hidden;
	color: var(--ink);
	background: var(--foam);
}

#fsc-sidebar {
	width: 350px;
	min-width: 290px;
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	background: #fff;
}

#fsc-sidebar-header {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 18px 26px;
	background: linear-gradient(120deg, var(--ocean-deep) 0%, var(--ocean-mid) 55%, var(--ocean-bright) 100%);
	color: #fff;
	font-weight: 700;
	font-family: var(--font-display);
	font-size: 19px;
	letter-spacing: 0.3px;
}
#fsc-sidebar-header::after {
	content: "";
	position: absolute; left: 0; right: 0; bottom: -1px; height: 16px;
	background: #fff;
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	transform: scaleX(1.3);
}
#fsc-sidebar-header span { flex: 1; }
#fsc-sidebar-header a { color: #fff; opacity: 0.85; text-decoration: none; font-size: 19px; line-height: 1; margin-left: 6px; transition: opacity 0.15s ease, transform 0.15s ease; }
#fsc-sidebar-header a:hover { opacity: 1; transform: scale(1.1); }

#fsc-logo {
	height: 38px; width: 38px; object-fit: contain; border-radius: 10px;
	background: #fff; padding: 3px; box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

#fsc-conversation-list { flex: 1; overflow-y: auto; padding: 8px; }

.fsc-conv-item {
	display: flex; align-items: center; gap: 12px; padding: 12px 12px;
	cursor: pointer; border-radius: 14px; margin-bottom: 4px; transition: background 0.15s ease, transform 0.1s ease;
}
.fsc-conv-item:hover { background: var(--foam); }
.fsc-conv-item.active {
	background: linear-gradient(90deg, rgba(11,95,165,0.08), rgba(247,148,29,0.06));
	box-shadow: inset 3px 0 0 var(--coral);
}

.fsc-conv-avatar {
	width: 46px; height: 46px; border-radius: 50%;
	background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-sky));
	color: #fff; display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-family: var(--font-display); font-size: 16px; flex-shrink: 0;
	box-shadow: 0 4px 10px rgba(11,95,165,0.25);
}
.fsc-conv-info { flex: 1; min-width: 0; }
.fsc-conv-name-row { display: flex; align-items: center; gap: 6px; }
.fsc-conv-name { font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsc-location-tag {
	display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: 9.5px;
	letter-spacing: 0.3px; text-transform: uppercase; color: var(--ocean-mid);
	background: rgba(11,95,165,0.1); padding: 2px 7px; border-radius: 999px; flex-shrink: 0;
}
.fsc-location-tag-header {
	font-size: 10.5px; margin-left: 4px; vertical-align: middle;
	color: var(--coral); background: rgba(247,148,29,0.12);
}
.fsc-conv-preview { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.fsc-conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fsc-conv-time { font-size: 11px; color: var(--muted); }
.fsc-unread-badge {
	background: linear-gradient(135deg, var(--coral), var(--coral-light)); color: #fff; font-size: 11px; font-weight: 700;
	border-radius: 999px; min-width: 19px; height: 19px; display: flex; align-items: center; justify-content: center;
	padding: 0 6px; box-shadow: 0 2px 6px rgba(247,148,29,0.4);
}

/* ---------- Chat area ---------- */
#fsc-chat-area { flex: 1; display: flex; flex-direction: column; position: relative; }
#fsc-chat-empty {
	flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
	color: #cfe2f5; gap: 16px;
	background: radial-gradient(circle at 50% 30%, var(--ocean-bright), var(--ocean-mid) 60%, var(--ocean-deep) 100%);
}
#fsc-empty-logo { height: 72px; opacity: 0.85; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25)); }
#fsc-chat-empty p { font-family: var(--font-display); font-weight: 600; font-size: 15px; }

#fsc-chat-active { display: flex; flex-direction: column; height: 100%; }
#fsc-chat-header {
	padding: 16px 22px; background: #fff; border-bottom: 1px solid var(--border);
	font-weight: 700; font-family: var(--font-display); font-size: 16px; color: var(--ocean-deep);
	box-shadow: 0 2px 8px rgba(5,47,95,0.05); z-index: 2;
}

#fsc-chat-messages {
	flex: 1; overflow-y: auto; padding: 24px; position: relative;
	background: radial-gradient(circle at 15% 0%, var(--ocean-bright) 0%, var(--ocean-sky) 35%, var(--ocean-mid) 70%, var(--ocean-deep) 100%);
}
#fsc-chat-messages::before {
	content: "";
	position: absolute; inset: 0;
	background-image: url('https://fintasticswimacademy.com/wp-content/uploads/2025/02/Starfish-V2.webp');
	background-repeat: repeat; background-size: 130px 130px; opacity: 0.07; pointer-events: none;
}

#fsc-bubbles-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.fsc-bubble {
	position: absolute; bottom: -30px; border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.15) 70%);
	animation-name: fsc-rise; animation-timing-function: ease-in; animation-iteration-count: infinite;
}
@keyframes fsc-rise {
	0%   { transform: translateY(0) translateX(0); opacity: 0; }
	10%  { opacity: 1; }
	100% { transform: translateY(-620px) translateX(18px); opacity: 0; }
}

#fsc-messages-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }

.fsc-msg {
	max-width: 66%; padding: 10px 15px; border-radius: 18px; font-size: 14.5px; line-height: 1.45;
	box-shadow: 0 3px 10px rgba(5,47,95,0.12); word-wrap: break-word; font-family: var(--font-body);
}
.fsc-msg-in { align-self: flex-start; background: #fff; color: var(--ink); border-bottom-left-radius: 4px; }
.fsc-msg-out {
	align-self: flex-end; color: #fff; border-bottom-right-radius: 4px;
	background: linear-gradient(135deg, var(--coral), var(--coral-light));
}
.fsc-msg-meta { font-size: 10.5px; opacity: 0.65; margin-top: 4px; text-align: right; }

#fsc-chat-input-area {
	display: flex; align-items: flex-end; gap: 10px; padding: 14px 18px;
	background: #fff; border-top: 1px solid var(--border); z-index: 2;
}
#fsc-chat-input {
	flex: 1; resize: none; border: 2px solid var(--border); border-radius: 22px; padding: 11px 18px;
	font-size: 14.5px; font-family: var(--font-body); max-height: 120px; outline: none; transition: border-color 0.15s ease;
}
#fsc-chat-input:focus { border-color: var(--ocean-sky); }
#fsc-send-btn {
	background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-sky)); color: #fff; border: none;
	width: 46px; height: 46px; border-radius: 50%; font-size: 18px; cursor: pointer; flex-shrink: 0;
	box-shadow: 0 6px 16px rgba(11,95,165,0.35); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#fsc-send-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 20px rgba(11,95,165,0.45); }
#fsc-send-btn:active { transform: scale(0.95); }

/* ---------- Ajustes ---------- */
#fsc-settings-wrap { width: 100%; height: 100%; overflow-y: auto; padding: 36px; background: var(--foam); }
#fsc-settings-box { max-width: 620px; margin: 0 auto; background: #fff; padding: 32px 36px; border-radius: 18px; box-shadow: 0 10px 30px rgba(5,47,95,0.08); }
#fsc-settings-box h2 { color: var(--ocean-deep); font-family: var(--font-display); }
#fsc-settings-box h3 { margin-top: 30px; color: var(--ocean-mid); font-family: var(--font-display); }
#fsc-settings-box input { width: 100%; padding: 10px 14px; margin: 6px 0; border: 2px solid var(--border); border-radius: 10px; font-family: var(--font-body); }
#fsc-settings-box input:focus { outline: none; border-color: var(--ocean-sky); }
#fsc-settings-box button {
	background: linear-gradient(135deg, var(--coral), var(--coral-light)); color: #fff; border: none;
	padding: 10px 18px; border-radius: 10px; cursor: pointer; margin-top: 8px; font-weight: 600; font-family: var(--font-body);
}
#fsc-settings-box button:hover { filter: brightness(1.05); }
#fsc-settings-box table { border-collapse: collapse; margin: 10px 0; width: 100%; }
#fsc-settings-box table td, #fsc-settings-box table th { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; }
#fsc-settings-box a { color: var(--ocean-mid); font-weight: 600; text-decoration: none; }
#fsc-settings-box a:hover { text-decoration: underline; }

@media (max-width: 700px) {
	#fsc-app { flex-direction: column; }
	#fsc-sidebar { width: 100%; height: 40%; }
}
