/* =====================================================================
   Team Reminder Tool — Frontend Portal (Glassmorphism)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ----- Portal shell -------------------------------------------------- */
.trt-portal {
	position: relative;
	overflow: hidden;
	border-radius: 28px;
	padding: 64px 40px 56px;
	margin: 32px 0;
	background:
		linear-gradient(160deg, #f8fbff 0%, #f1f6fb 55%, #ffffff 100%);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #1f2937;
	min-height: 520px;
	border: 1px solid #dbe6f0;
}

/* Ambient orbs */
.trt-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	pointer-events: none;
	opacity: 0.55;
}
.trt-orb--1 {
	width: 420px; height: 420px;
	background: radial-gradient(circle, rgba(59, 130, 246, 0.24), transparent 70%);
	top: -120px; left: -80px;
}
.trt-orb--2 {
	width: 340px; height: 340px;
	background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 70%);
	bottom: -60px; right: 10%;
	opacity: 0.45;
}
.trt-orb--3 {
	width: 260px; height: 260px;
	background: radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 70%);
	top: 30%; right: -60px;
	opacity: 0.35;
}

.trt-portal-shell {
	position: relative;
	z-index: 1;
}

/* ----- Header -------------------------------------------------------- */
.trt-portal-header {
	text-align: center;
	margin-bottom: 48px;
}
.trt-header-badge {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 999px;
	border: 1px solid #cfe0f1;
	background: rgba(255, 255, 255, 0.8);
	color: #3b4f66;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 16px;
}
.trt-portal-header h2 {
	margin: 0 0 12px;
	font-size: clamp(28px, 5vw, 48px);
	font-weight: 700;
	letter-spacing: -0.03em;
	color: #1f2937;
	line-height: 1.1;
}
.trt-portal-header p {
	margin: 0;
	font-size: 17px;
	color: #64748b;
	max-width: 480px;
	margin: 0 auto;
}

/* ----- Auth gate ----------------------------------------------------- */
.trt-auth-gate {
	display: grid;
	place-items: center;
	padding: 20px 0 40px;
}
.trt-auth-card {
	width: min(480px, 100%);
	background: rgba(255, 255, 255, 0.74);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid rgba(203, 217, 231, 0.95);
	border-radius: 24px;
	padding: 40px 36px;
	text-align: center;
	box-shadow:
		0 0 0 1px rgba(255,255,255,0.35) inset,
		0 18px 36px rgba(15, 23, 42, 0.08);
}
.trt-auth-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px; height: 64px;
	border-radius: 50%;
	background: rgba(37, 99, 235, 0.1);
	border: 1px solid rgba(37, 99, 235, 0.25);
	color: #2563eb;
	margin-bottom: 20px;
}
.trt-auth-card h3 {
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 700;
	color: #1f2937;
}
.trt-auth-card > p {
	margin: 0 0 28px;
	color: #64748b;
	font-size: 15px;
	line-height: 1.6;
}
.trt-google-btn-wrap {
	display: flex;
	justify-content: center;
}

/* ----- Toolbar (signed-in bar) --------------------------------------- */
.trt-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	padding: 14px 20px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid #d4e1ed;
}
.trt-toolbar-label {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #64748b;
	font-weight: 600;
}
.trt-toolbar-email {
	margin: 3px 0 0;
	font-weight: 600;
	color: #1f2937;
	font-size: 15px;
}

/* ----- Sign-out button ----------------------------------------------- */
#trt-sign-out {
	background: #ffffff !important;
	border: 1px solid #d4e1ed !important;
	color: #334155 !important;
	border-radius: 10px !important;
	padding: 7px 16px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: background 0.2s, border-color 0.2s !important;
	font-family: inherit !important;
}
#trt-sign-out:hover {
	background: #f8fafc !important;
	border-color: #bfd0e2 !important;
}

/* ----- Two-panel grid ------------------------------------------------ */
.trt-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: start;
}
.trt-panel {
	background: rgba(255, 255, 255, 0.86);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid #d4e1ed;
	border-radius: 20px;
	padding: 24px;
	box-shadow:
		0 0 0 1px rgba(255,255,255,0.45) inset,
		0 12px 26px rgba(15, 23, 42, 0.06);
}
.trt-panel h3,
#trt-form-title {
	margin: 0 0 18px !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	color: #1f2937 !important;
	letter-spacing: -0.01em;
}
.trt-list-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}
#trt-refresh-list {
	background: #f8fafc !important;
	border: 1px solid #d4e1ed !important;
	color: #475569 !important;
	border-radius: 8px !important;
	padding: 5px 12px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	font-family: inherit !important;
	transition: background 0.2s !important;
}
#trt-refresh-list:hover {
	background: #f1f5f9 !important;
}

/* ----- Form ---------------------------------------------------------- */
.trt-frontend-form {
	display: grid;
	gap: 6px;
}
.trt-frontend-form label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 4px;
	margin-top: 10px;
}
.trt-frontend-form label:first-child {
	margin-top: 0;
}
.trt-frontend-form input,
.trt-frontend-form textarea,
.trt-frontend-form select {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border-radius: 12px;
	border: 1px solid #d7e0ea;
	background: #ffffff;
	color: #1f2937;
	font-size: 14px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
	-webkit-appearance: none;
	appearance: none;
}
.trt-frontend-form select option {
	background: #ffffff;
	color: #1f2937;
}
.trt-frontend-form input::placeholder,
.trt-frontend-form textarea::placeholder {
	color: #94a3b8;
}
.trt-frontend-form input:focus,
.trt-frontend-form textarea:focus,
.trt-frontend-form select:focus {
	border-color: #3b82f6;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
/* datetime-local calendar icon colour */
.trt-frontend-form input[type="datetime-local"]::-webkit-calendar-picker-indicator {
	filter: invert(1) opacity(0.5);
	cursor: pointer;
}

.trt-actions {
	display: flex;
	gap: 10px;
	margin-top: 14px;
}
#trt-front-submit {
	flex: 1;
	padding: 12px 20px !important;
	border-radius: 12px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	font-family: inherit !important;
	cursor: pointer !important;
	border: none !important;
	background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
	color: #fff !important;
	letter-spacing: 0.02em;
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24) !important;
	transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s !important;
}
#trt-front-submit:hover {
	opacity: 0.92 !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 8px 24px rgba(124, 58, 237, 0.55) !important;
}
#trt-front-cancel {
	padding: 12px 16px !important;
	border-radius: 12px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	font-family: inherit !important;
	cursor: pointer !important;
	border: 1px solid #d4e1ed !important;
	background: #ffffff !important;
	color: #475569 !important;
	transition: background 0.2s !important;
}
#trt-front-cancel:hover {
	background: #f8fafc !important;
}

/* ----- Reminder cards ------------------------------------------------ */
.trt-reminders-list {
	display: grid;
	gap: 10px;
	max-height: 560px;
	overflow-y: auto;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: #cdd8e3 transparent;
}
.trt-reminders-list::-webkit-scrollbar { width: 4px; }
.trt-reminders-list::-webkit-scrollbar-track { background: transparent; }
.trt-reminders-list::-webkit-scrollbar-thumb { background: #cdd8e3; border-radius: 4px; }

.trt-card {
	border-radius: 14px;
	padding: 14px 16px;
	background: #ffffff;
	border: 1px solid #d9e4ee;
	transition: background 0.2s, border-color 0.2s;
}
.trt-card:hover {
	background: #ffffff;
	border-color: #bfd0e2;
}
.trt-card-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 6px;
}
.trt-card h4 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #1f2937;
	line-height: 1.3;
}
.trt-chip {
	flex-shrink: 0;
	padding: 3px 9px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	border-radius: 999px;
	letter-spacing: 0.06em;
}
.trt-chip--pending { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.trt-chip--failed  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.trt-chip--sent    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.trt-meta {
	margin: 0 0 6px;
	font-size: 12px;
	color: #64748b;
}
.trt-meta--creator {
	font-size: 11px;
	color: #94a3b8;
	font-style: italic;
	margin-top: -2px;
}
.trt-comments {
	margin: 0 0 8px;
	font-size: 13px;
	color: #475569;
	line-height: 1.5;
}
.trt-card a {
	color: #2563eb;
	font-size: 13px;
	text-decoration: none;
}
.trt-card a:hover { text-decoration: underline; }
.trt-card-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 10px;
}
.trt-card-actions .button,
[data-edit-id] {
	background: #f8fafc !important;
	border: 1px solid #d4e1ed !important;
	color: #334155 !important;
	border-radius: 8px !important;
	padding: 5px 12px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	font-family: inherit !important;
	transition: background 0.2s !important;
}
[data-edit-id]:hover {
	background: #f1f5f9 !important;
}

/* ----- Empty state --------------------------------------------------- */
.trt-empty {
	padding: 24px 16px;
	text-align: center;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px dashed #d4e1ed;
	color: #64748b;
	font-size: 14px;
}

/* ----- Notice -------------------------------------------------------- */
.trt-frontend-notice {
	padding: 12px 16px;
	border-radius: 12px;
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	border: 1px solid transparent;
}
.trt-frontend-notice--success {
	background: #ecfdf3;
	border-color: #bbf7d0;
	color: #166534;
}
.trt-frontend-notice--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #b91c1c;
}

/* ----- Responsive ---------------------------------------------------- */
@media (max-width: 820px) {
	.trt-portal {
		padding: 40px 20px 36px;
		border-radius: 18px;
	}
	.trt-grid {
		grid-template-columns: 1fr;
	}
	.trt-portal-header h2 {
		font-size: 28px;
	}
}
