/**
 * 5 UP / 5 DOWN — Frontend App Styles
 *
 * Mobile-first design system. Base breakpoint: 375px.
 * Tablet: 768px+. Desktop: 1024px+.
 */

/* =========================================================
   CSS CUSTOM PROPERTIES
   ========================================================= */
:root {
	--oec-green-dark:   #1a472a;
	--oec-green:        #2d6a4f;
	--oec-green-mid:    #40916c;
	--oec-green-light:  #74c69d;
	--oec-green-pale:   #d8f3dc;

	--oec-up:           #e63946;
	--oec-up-pale:      #ffe8ea;
	--oec-down:         #f4a261;
	--oec-down-pale:    #fff3e8;

	--oec-bg:           #f4f6f4;
	--oec-surface:      #ffffff;
	--oec-border:       #e2e8e4;

	--oec-text:         #1c2b23;
	--oec-text-mid:     #4a6358;
	--oec-text-muted:   #7a9487;

	--oec-red:          #e63946;
	--oec-red-pale:     #ffe8ea;
	--oec-yellow:       #f4a261;
	--oec-yellow-pale:  #fff3e8;
	--oec-blue:         #2b7fff;
	--oec-blue-pale:    #e8f0ff;
	--oec-green-status: #2d6a4f;
	--oec-green-pale-s: #d8f3dc;
	--oec-gray:         #8e9e97;
	--oec-gray-pale:    #eef1ef;
	--oec-ai-bg:        #eef4ff;
	--oec-ai-border:    #c2d4f8;

	--oec-radius:       12px;
	--oec-radius-sm:    8px;
	--oec-shadow:       0 2px 12px rgba(26,71,42,0.08);
	--oec-shadow-lg:    0 8px 32px rgba(26,71,42,0.14);

	--oec-nav-h:        64px;
	--oec-header-h:     112px;
	--oec-transition:   0.22s ease;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
.oec-app *,
.oec-app *::before,
.oec-app *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Protect the HTML hidden attribute from being overridden by display rules. */
.oec-app [hidden] {
	display: none !important;
}

.oec-app {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--oec-text);
	background: var(--oec-bg);
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	/* Prevent pull-to-refresh from triggering on vertical swipe navigation. */
	overscroll-behavior: none;
}

.oec-app button {
	cursor: pointer;
	font-family: inherit;
	font-size: inherit;
	border: none;
	background: none;
	-webkit-tap-highlight-color: transparent;
}

.oec-app a {
	text-decoration: none;
	color: inherit;
}

/* =========================================================
   HEADER
   ========================================================= */
.oec-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--oec-green-dark);
	color: #fff;
	padding: 12px 16px 0;
	box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.oec-header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 10px;
}

.oec-logo {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.3px;
	display: flex;
	gap: 4px;
	align-items: center;
}

.oec-logo-up     { color: #ff8fa3; }
.oec-logo-divider { color: #74c69d; opacity: .6; }
.oec-logo-down   { color: #ffd166; }

.oec-header-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.oec-user-name {
	font-size: 13px;
	opacity: .85;
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.oec-ask-ai-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255,255,255,0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--oec-transition);
}
.oec-ask-ai-btn:hover { background: rgba(255,255,255,0.25); }
.oec-ask-ai-btn .oec-ai-icon { font-size: 16px; }

/* Date bar */
.oec-date-bar {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 2px;
}
.oec-date-bar::-webkit-scrollbar { display: none; }

.oec-date-btn {
	flex-shrink: 0;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	color: rgba(255,255,255,0.65);
	background: transparent;
	transition: all var(--oec-transition);
	white-space: nowrap;
}
.oec-date-btn:hover,
.oec-date-btn.active {
	background: rgba(255,255,255,0.2);
	color: #fff;
}

.oec-range-label {
	font-size: 11px;
	color: rgba(255,255,255,0.5);
	padding: 4px 0 8px;
}

/* Custom date picker */
.oec-custom-date-picker {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	padding-bottom: 10px;
}
.oec-custom-date-picker label {
	font-size: 12px;
	color: rgba(255,255,255,.75);
	display: flex;
	align-items: center;
	gap: 4px;
}
.oec-date-input {
	background: rgba(255,255,255,0.15);
	border: 1px solid rgba(255,255,255,0.3);
	border-radius: 6px;
	color: #fff;
	padding: 4px 8px;
	font-size: 12px;
}
.oec-date-input::-webkit-calendar-picker-indicator {
	filter: invert(1);
	opacity: .7;
}

/* =========================================================
   VIEWS CONTAINER & SWIPE SYSTEM
   ========================================================= */
.oec-views-container {
	flex: 1;
	display: flex;
	overflow: hidden;
	position: relative;
	padding-bottom: var(--oec-nav-h);
}

.oec-view {
	flex-shrink: 0;
	width: 100%;
	height: calc(100svh - var(--oec-header-h) - var(--oec-nav-h));
	overflow-y: auto;
	overflow-x: hidden;
	scroll-behavior: smooth;
	display: none;
	-webkit-overflow-scrolling: touch;
}

.oec-view.oec-view-active {
	display: block;
}

.oec-view-inner {
	padding: 16px 16px 32px;
	max-width: 640px;
	margin: 0 auto;
}

/* View header */
.oec-view-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.oec-view-header h2 {
	font-size: 20px;
	font-weight: 700;
	color: var(--oec-text);
	flex: 1;
}

.oec-view-badge {
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.5px;
}
.oec-badge-up   { background: var(--oec-up-pale);   color: var(--oec-up); }
.oec-badge-down { background: var(--oec-down-pale);  color: #d4580a; }

/* View tabs */
.oec-view-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 2px solid var(--oec-border);
	margin-bottom: 16px;
}
.oec-tab {
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--oec-text-muted);
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: all var(--oec-transition);
}
.oec-tab.active {
	color: var(--oec-green);
	border-bottom-color: var(--oec-green);
}

/* =========================================================
   CARDS
   ========================================================= */
.oec-card-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.oec-card {
	background: var(--oec-surface);
	border-radius: var(--oec-radius);
	padding: 14px 16px;
	box-shadow: var(--oec-shadow);
	cursor: pointer;
	transition: transform var(--oec-transition), box-shadow var(--oec-transition);
	position: relative;
	overflow: hidden;
	border-left: 4px solid transparent;
}

.oec-card:active { transform: scale(0.985); }

/* Status border-left colors */
.oec-card[data-status="not-started"] { border-left-color: var(--oec-gray); }
.oec-card[data-status="starting"]    { border-left-color: var(--oec-yellow); }
.oec-card[data-status="in-progress"] { border-left-color: var(--oec-blue); }
.oec-card[data-status="done"]        { border-left-color: var(--oec-green-status); }
.oec-card[data-status="blocked"]     { border-left-color: var(--oec-red); background: var(--oec-red-pale); }

.oec-card-top {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.oec-card-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 5px;
}
.oec-dot-gray   { background: var(--oec-gray); }
.oec-dot-yellow { background: var(--oec-yellow); }
.oec-dot-blue   { background: var(--oec-blue); }
.oec-dot-green  { background: var(--oec-green-status); }
.oec-dot-red    { background: var(--oec-red); }

.oec-card-main { flex: 1; min-width: 0; }

.oec-card-title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 6px;
	margin-bottom: 4px;
}

.oec-card-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--oec-text);
	line-height: 1.3;
	flex: 1;
	min-width: 0;
}

.oec-card-edit-btn {
	flex-shrink: 0;
	background: none;
	border: none;
	padding: 2px 4px;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.45;
	border-radius: 4px;
	transition: opacity 0.15s;
}

.oec-card-edit-btn:hover,
.oec-card-edit-btn:focus {
	opacity: 1;
	background: var(--oec-surface-2, rgba(0,0,0,0.06));
	outline: none;
}

.oec-card-meta {
	font-size: 12px;
	color: var(--oec-text-muted);
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.oec-card-owner {
	display: flex;
	align-items: center;
	gap: 4px;
}

.oec-card-you {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--oec-accent, #2563eb);
	background: rgba(37, 99, 235, 0.1);
	border-radius: 4px;
	padding: 1px 5px;
	line-height: 1.4;
}

.oec-avatar {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--oec-green-mid);
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
}
.oec-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.oec-deadline {
	display: flex;
	align-items: center;
	gap: 3px;
}
.oec-deadline.overdue { color: var(--oec-red); font-weight: 600; }

.oec-card-desc {
	font-size: 13px;
	color: var(--oec-text-mid);
	margin-top: 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.oec-card-blocked-note {
	margin-top: 8px;
	padding: 8px 10px;
	background: #fff;
	border-radius: var(--oec-radius-sm);
	font-size: 12px;
	color: var(--oec-red);
	font-weight: 600;
}

/* Carried-over critical cards */
.oec-card-critical {
	border-left: 3px solid var(--oec-red);
	background: rgba(220, 38, 38, 0.04);
}

/* Section dividers inside priority lists */
.oec-section-divider {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--oec-text-muted);
	padding: 12px 0 6px;
}

.oec-section-critical {
	color: var(--oec-red);
}

/* Slot badge in view header */
.oec-slots-badge {
	font-size: 12px;
	font-weight: 700;
	color: var(--oec-text-muted);
	background: var(--oec-surface-2, rgba(0,0,0,0.06));
	border-radius: 20px;
	padding: 2px 10px;
	white-space: nowrap;
}

.oec-slots-badge.oec-slots-full {
	color: var(--oec-red);
	background: rgba(220, 38, 38, 0.1);
}

/* Add Task button when at cap */
.oec-btn-add-full {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Event cards */
.oec-event-card {
	display: flex;
	gap: 12px;
}

.oec-event-date-badge {
	flex-shrink: 0;
	width: 44px;
	text-align: center;
	background: var(--oec-green-pale);
	border-radius: var(--oec-radius-sm);
	padding: 6px 4px;
}
.oec-event-date-badge .oec-month {
	font-size: 10px;
	font-weight: 700;
	color: var(--oec-green);
	text-transform: uppercase;
}
.oec-event-date-badge .oec-day {
	font-size: 22px;
	font-weight: 800;
	color: var(--oec-green-dark);
	line-height: 1;
}

.oec-traffic-light {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	align-self: center;
}
.oec-traffic-green  { background: #27ae60; }
.oec-traffic-yellow { background: #f39c12; }
.oec-traffic-red    { background: var(--oec-red); }

.oec-participant-bar {
	margin-top: 6px;
	height: 4px;
	background: var(--oec-border);
	border-radius: 2px;
	overflow: hidden;
}
.oec-participant-fill {
	height: 100%;
	background: var(--oec-green-mid);
	border-radius: 2px;
	transition: width .4s ease;
}

/* Partner cards */
.oec-partner-card .oec-engagement {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
}
.oec-engagement-cold   { background: var(--oec-gray-pale);  color: var(--oec-gray); }
.oec-engagement-active { background: var(--oec-blue-pale);  color: var(--oec-blue); }
.oec-engagement-core   { background: var(--oec-green-pale); color: var(--oec-green); }

/* Team workload */
.oec-workload-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid var(--oec-border);
}
.oec-workload-row:last-child { border-bottom: none; }
.oec-workload-name { flex: 1; font-size: 14px; font-weight: 600; }
.oec-workload-bar-wrap {
	width: 80px;
	height: 6px;
	background: var(--oec-border);
	border-radius: 3px;
	overflow: hidden;
}
.oec-workload-fill {
	height: 100%;
	border-radius: 3px;
	transition: width .4s ease;
}
.oec-capacity-open      .oec-workload-fill { background: var(--oec-green-status); }
.oec-capacity-full      .oec-workload-fill { background: var(--oec-yellow); }
.oec-capacity-overloaded .oec-workload-fill { background: var(--oec-red); }
.oec-workload-count { font-size: 12px; color: var(--oec-text-muted); min-width: 40px; text-align: right; }

/* ED private tasks */
.oec-ed-task-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: var(--oec-surface);
	border-radius: var(--oec-radius);
	box-shadow: var(--oec-shadow);
	border-left: 3px solid var(--oec-green-light);
}
.oec-ed-task-title { flex: 1; font-size: 14px; font-weight: 600; }
.oec-ed-task-status {
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 12px;
	font-weight: 600;
}
.oec-ed-status-todo     { background: var(--oec-gray-pale);   color: var(--oec-gray); }
.oec-ed-status-progress { background: var(--oec-blue-pale);   color: var(--oec-blue); }
.oec-ed-status-done     { background: var(--oec-green-pale);  color: var(--oec-green-status); }

/* =========================================================
   DASHBOARD SECTIONS
   ========================================================= */
.oec-dashboard-section {
	background: var(--oec-surface);
	border-radius: var(--oec-radius);
	padding: 16px;
	margin-bottom: 14px;
	box-shadow: var(--oec-shadow);
}

.oec-section-title-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.oec-section-title-bar h3 {
	font-size: 14px;
	font-weight: 700;
	color: var(--oec-text);
}

/* Health score */
.oec-health-section {
	text-align: center;
	background: linear-gradient(135deg, var(--oec-green-dark) 0%, var(--oec-green) 100%);
	color: #fff;
}

.oec-health-score {
	font-size: 72px;
	font-weight: 900;
	line-height: 1;
	margin-bottom: 8px;
}

.oec-health-stats {
	display: flex;
	justify-content: center;
	gap: 20px;
}

.oec-stat {
	font-size: 13px;
	opacity: .85;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}
.oec-stat strong { font-size: 22px; font-weight: 800; opacity: 1; }
.oec-stat-done    .oec-stat strong { color: #b7f0d0; }
.oec-stat-progress .oec-stat strong { color: #9ec8ff; }
.oec-stat-blocked  .oec-stat strong { color: #ffb3ba; }

/* Blocked alert */
.oec-blocked-alert {
	background: var(--oec-red-pale);
	border: 1px solid #ffcdd2;
}
.oec-blocked-alert h3 { color: var(--oec-red); }

/* Pending approval section */
.oec-pending-approval {
	background: var(--oec-yellow-pale);
	border: 1px solid #f4d0a2;
}
.oec-pending-approval h3 { color: #b25e00; }

.oec-badge-count {
	display: inline-block;
	background: var(--oec-yellow);
	color: #fff;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	padding: 1px 7px;
	margin-left: 4px;
	vertical-align: middle;
}

.oec-card-pending {
	border-left: 4px solid var(--oec-yellow);
}

.oec-pending-actions {
	display: flex;
	gap: 8px;
	padding: 8px 12px 12px;
}

.oec-btn-approve {
	flex: 1;
	background: var(--oec-green);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 7px 0;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.oec-btn-approve:hover { background: var(--oec-green-dark); }

.oec-btn-reject {
	flex: 1;
	background: transparent;
	color: var(--oec-red);
	border: 1px solid var(--oec-red);
	border-radius: 6px;
	padding: 7px 0;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.oec-btn-reject:hover {
	background: var(--oec-red-pale);
}

/* Native task form in drawer */
.oec-native-form {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.oec-native-form label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--oec-text-muted);
}

.oec-native-form input[type="text"],
.oec-native-form input[type="date"],
.oec-native-form select,
.oec-native-form textarea {
	width: 100%;
	border: 1px solid #d0d5d0;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 15px;
	color: var(--oec-text);
	background: #fff;
	box-sizing: border-box;
	font-family: inherit;
}

.oec-native-form textarea {
	resize: vertical;
	min-height: 80px;
}

.oec-native-form input:focus,
.oec-native-form select:focus,
.oec-native-form textarea:focus {
	outline: none;
	border-color: var(--oec-green);
	box-shadow: 0 0 0 3px rgba(31, 97, 62, 0.12);
}

.oec-form-actions {
	display: flex;
	gap: 10px;
	margin-top: 4px;
}

.oec-btn-primary {
	flex: 1;
	background: var(--oec-green);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 0;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.oec-btn-primary:disabled { opacity: 0.6; }
.oec-btn-primary:hover:not(:disabled) { background: var(--oec-green-dark); }

.oec-btn-ghost {
	flex: 0 0 auto;
	background: transparent;
	color: var(--oec-text-muted);
	border: 1px solid #d0d5d0;
	border-radius: 8px;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.oec-btn-ghost:hover { background: #f0f2f0; }

.oec-form-error {
	color: var(--oec-red);
	font-size: 13px;
	padding: 8px 0 0;
}

.oec-form-hint {
	background: #fff8e1;
	border: 1px solid #f0d060;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	color: #7a5800;
	margin: 0 16px;
}

.oec-req { color: var(--oec-red); }

/* BSK numbers */
.oec-bsk-numbers {
	display: flex;
	justify-content: space-around;
	text-align: center;
	gap: 8px;
}

.oec-big-num strong {
	display: block;
	font-size: 32px;
	font-weight: 800;
	color: var(--oec-green-dark);
	line-height: 1;
}
.oec-big-num span {
	font-size: 11px;
	color: var(--oec-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Quick actions */
.oec-quick-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.oec-quick-btn {
	flex: 1;
	min-width: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 16px;
	background: var(--oec-green-pale);
	border-radius: var(--oec-radius);
	font-size: 14px;
	font-weight: 600;
	color: var(--oec-green-dark);
	cursor: pointer;
	transition: background var(--oec-transition);
}
.oec-quick-btn:hover,
.oec-quick-btn:focus { background: var(--oec-green-light); }

/* Private badge */
.oec-private-badge {
	display: inline-block;
	padding: 1px 6px;
	background: var(--oec-green-pale);
	color: var(--oec-green);
	border-radius: 10px;
	font-size: 10px;
	font-weight: 600;
	vertical-align: middle;
}

/* Outcomes */
.oec-outcome-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	font-size: 13px;
}
.oec-outcome-row > span:first-child {
	width: 130px;
	flex-shrink: 0;
	color: var(--oec-text-mid);
}
.oec-progress-bar {
	flex: 1;
	height: 8px;
	background: var(--oec-border);
	border-radius: 4px;
	overflow: hidden;
}
.oec-progress-fill {
	height: 100%;
	background: var(--oec-green-mid);
	border-radius: 4px;
	transition: width .5s ease;
}
.oec-pct {
	min-width: 34px;
	text-align: right;
	font-weight: 700;
	color: var(--oec-green);
}

/* Stories */
.oec-story-card {
	padding: 12px 14px;
	background: var(--oec-bg);
	border-radius: var(--oec-radius-sm);
	border-left: 3px solid var(--oec-green-light);
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--oec-text-mid);
	line-height: 1.6;
}

/* =========================================================
   AI CARDS
   ========================================================= */
.oec-ai-card {
	background: var(--oec-ai-bg);
	border: 1px solid var(--oec-ai-border);
	border-radius: var(--oec-radius);
	padding: 12px 14px;
	margin-bottom: 14px;
	position: relative;
}

.oec-ai-header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 700;
	color: #3361bb;
}

.oec-dismiss-ai {
	margin-left: auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0,0,0,0.06);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: var(--oec-text-muted);
}

.oec-ai-card p {
	font-size: 13px;
	color: #2a4a9c;
	line-height: 1.55;
}

.oec-inline-ai {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px 12px;
}
.oec-inline-ai .oec-ai-icon {
	font-size: 14px;
	color: #3361bb;
	flex-shrink: 0;
	margin-top: 1px;
}
.oec-inline-ai p { font-size: 13px; flex: 1; }
.oec-inline-ai .oec-dismiss-ai { flex-shrink: 0; }

/* =========================================================
   BOTTOM NAV RAIL
   ========================================================= */
.oec-nav-rail {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 200;
	height: var(--oec-nav-h);
	background: var(--oec-surface);
	border-top: 1px solid var(--oec-border);
	display: flex;
	align-items: stretch;
	box-shadow: 0 -2px 12px rgba(26,71,42,0.08);
	/* Safe area support for notched phones */
	padding-bottom: env(safe-area-inset-bottom, 0);
}

.oec-nav-btn {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 6px 4px;
	color: var(--oec-text-muted);
	transition: color var(--oec-transition);
	position: relative;
}

.oec-nav-btn::after {
	content: '';
	position: absolute;
	top: 0;
	left: 20%;
	right: 20%;
	height: 2px;
	background: var(--oec-green);
	border-radius: 0 0 2px 2px;
	transform: scaleX(0);
	transition: transform var(--oec-transition);
}

.oec-nav-btn.active {
	color: var(--oec-green-dark);
}
.oec-nav-btn.active::after { transform: scaleX(1); }

.oec-nav-icon  { font-size: 20px; line-height: 1; }
.oec-nav-label { font-size: 10px; font-weight: 600; }

/* =========================================================
   STATUS UPDATE MODAL
   ========================================================= */
.oec-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.45);
	z-index: 300;
	display: flex;
	align-items: flex-end;
	padding-bottom: env(safe-area-inset-bottom, 0);
}

.oec-modal {
	background: var(--oec-surface);
	border-radius: 20px 20px 0 0;
	padding: 20px 16px 32px;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	box-shadow: var(--oec-shadow-lg);
}

.oec-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.oec-modal-header h3 {
	font-size: 17px;
	font-weight: 700;
}

.oec-modal-close {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--oec-gray-pale);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: var(--oec-text-muted);
}

.oec-status-buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.oec-status-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-radius: var(--oec-radius);
	background: var(--oec-bg);
	font-size: 15px;
	font-weight: 600;
	color: var(--oec-text);
	transition: background var(--oec-transition);
	text-align: left;
}
.oec-status-btn:hover,
.oec-status-btn:focus { background: var(--oec-green-pale); }
.oec-status-btn .oec-dot { width: 12px; height: 12px; }

.oec-status-notes-wrap {
	margin-top: 14px;
}
.oec-status-notes-wrap label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--oec-red);
}

.oec-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--oec-border);
	border-radius: var(--oec-radius-sm);
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	color: var(--oec-text);
	background: var(--oec-surface);
}
.oec-textarea:focus {
	outline: none;
	border-color: var(--oec-green-mid);
	box-shadow: 0 0 0 3px rgba(64,145,108,0.15);
}

/* =========================================================
   FORM DRAWER
   ========================================================= */
.oec-drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.4);
	z-index: 400;
}

.oec-drawer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 401;
	background: var(--oec-surface);
	border-radius: 20px 20px 0 0;
	max-height: 85svh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.25,0.8,0.25,1);
	padding-bottom: env(safe-area-inset-bottom, 0);
}

.oec-drawer.oec-drawer-open { transform: translateY(0); }

.oec-drawer-handle {
	width: 40px;
	height: 4px;
	background: var(--oec-border);
	border-radius: 2px;
	margin: 10px auto 6px;
	flex-shrink: 0;
}

.oec-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px 14px;
	border-bottom: 1px solid var(--oec-border);
	flex-shrink: 0;
}
.oec-drawer-header h3 { font-size: 17px; font-weight: 700; }

.oec-drawer-close {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--oec-gray-pale);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: var(--oec-text-muted);
}

.oec-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	-webkit-overflow-scrolling: touch;
}

.oec-drawer-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 32px;
	gap: 12px;
	color: var(--oec-text-muted);
}

/* =========================================================
   AI MODAL
   ========================================================= */
.oec-ai-modal {
	border-radius: 20px 20px 0 0;
}

.oec-ai-examples {
	margin-bottom: 14px;
}

.oec-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--oec-text-muted);
	margin-bottom: 8px;
}

.oec-example-q {
	display: block;
	width: 100%;
	text-align: left;
	padding: 8px 12px;
	background: var(--oec-ai-bg);
	border: 1px solid var(--oec-ai-border);
	border-radius: var(--oec-radius-sm);
	color: #2a4a9c;
	font-size: 13px;
	margin-bottom: 6px;
	transition: background var(--oec-transition);
}
.oec-example-q:hover { background: #dce8ff; }

.oec-ai-input-wrap {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}
.oec-ai-input-wrap .oec-textarea { flex: 1; }

.oec-ai-answer {
	margin-top: 14px;
	padding: 14px;
	background: var(--oec-ai-bg);
	border: 1px solid var(--oec-ai-border);
	border-radius: var(--oec-radius);
}
.oec-ai-answer p { font-size: 14px; color: #2a4a9c; line-height: 1.6; }

/* =========================================================
   CORE REPORT MODAL
   ========================================================= */
.oec-core-modal {
	border-radius: 20px 20px 0 0;
	max-height: 75svh;
	overflow-y: auto;
}

.oec-core-field {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--oec-border);
	font-size: 14px;
}
.oec-core-field:last-child { border-bottom: none; }
.oec-core-label { color: var(--oec-text-muted); }
.oec-core-value { font-weight: 600; }

.oec-core-actions {
	display: flex;
	gap: 10px;
	padding: 14px 16px;
	border-top: 1px solid var(--oec-border);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.oec-btn-primary {
	padding: 12px 20px;
	background: var(--oec-green-dark);
	color: #fff;
	border-radius: var(--oec-radius);
	font-size: 15px;
	font-weight: 700;
	transition: background var(--oec-transition);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.oec-btn-primary:hover,
.oec-btn-primary:focus { background: var(--oec-green); }

.oec-btn-secondary {
	padding: 10px 18px;
	background: var(--oec-green-pale);
	color: var(--oec-green-dark);
	border-radius: var(--oec-radius);
	font-size: 14px;
	font-weight: 700;
	transition: background var(--oec-transition);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.oec-btn-secondary:hover { background: var(--oec-green-light); }

.oec-btn-add {
	padding: 7px 14px;
	background: var(--oec-green-dark);
	color: #fff;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 700;
	transition: background var(--oec-transition);
	white-space: nowrap;
}
.oec-btn-add:hover { background: var(--oec-green); }

.oec-btn-sm {
	padding: 5px 12px;
	background: var(--oec-green-pale);
	color: var(--oec-green-dark);
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
}

/* =========================================================
   TOAST
   ========================================================= */
.oec-toast {
	position: fixed;
	bottom: calc(var(--oec-nav-h) + 16px);
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--oec-text);
	color: #fff;
	padding: 10px 20px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	opacity: 0;
	transition: opacity .25s, transform .25s;
	pointer-events: none;
	white-space: nowrap;
	z-index: 500;
	max-width: 90vw;
	text-align: center;
}
.oec-toast.oec-toast-show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}
.oec-toast.oec-toast-success { background: var(--oec-green-status); }
.oec-toast.oec-toast-error   { background: var(--oec-red); }

/* =========================================================
   LOADING / SPINNER
   ========================================================= */
.oec-loading {
	position: fixed;
	inset: 0;
	background: rgba(255,255,255,0.7);
	z-index: 600;
	display: flex;
	align-items: center;
	justify-content: center;
}

.oec-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--oec-border);
	border-top-color: var(--oec-green);
	border-radius: 50%;
	animation: oec-spin .7s linear infinite;
}

@keyframes oec-spin { to { transform: rotate(360deg); } }

/* =========================================================
   SKELETON LOADER
   ========================================================= */
.oec-skeleton {
	height: 80px;
	background: var(--oec-surface);
	border-radius: var(--oec-radius);
	background: linear-gradient(90deg, #f0f0f0 25%, #fafafa 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: oec-shimmer 1.2s infinite;
}

@keyframes oec-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* =========================================================
   LOGIN PROMPT
   ========================================================= */
.oec-login-prompt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	gap: 16px;
	text-align: center;
	padding: 32px;
	color: var(--oec-text-mid);
}

/* =========================================================
   LOGIN SCREEN (full-screen template, logged-out state)
   ========================================================= */
.oec-login-screen {
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient( 160deg, var(--oec-green-dark) 0%, var(--oec-green-mid) 100% );
	padding: 24px 16px;
}

.oec-login-card {
	background: #fff;
	border-radius: 20px;
	padding: 36px 28px 28px;
	width: 100%;
	max-width: 380px;
	box-shadow: 0 16px 48px rgba( 0, 0, 0, 0.22 );
}

/* Logo */
.oec-login-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 28px;
	font-weight: 900;
	letter-spacing: -0.5px;
	margin-bottom: 6px;
}
.oec-login-logo-up   { color: var(--oec-up); }
.oec-login-logo-sep  { color: var(--oec-green-light); opacity: .5; }
.oec-login-logo-down { color: var(--oec-down); }

.oec-login-tagline {
	text-align: center;
	font-size: 13px;
	color: var(--oec-text-muted);
	margin-bottom: 28px;
}

/* Error message */
.oec-login-error {
	background: var(--oec-red-pale);
	border: 1px solid #ffcdd2;
	border-radius: var(--oec-radius-sm);
	color: var(--oec-red);
	font-size: 13px;
	font-weight: 600;
	padding: 10px 14px;
	margin-bottom: 16px;
	text-align: center;
}

/* WordPress login form — override default styles */
#oec-login-form p {
	margin-bottom: 14px;
}

#oec-login-form label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--oec-text-mid);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 5px;
}

#oec-login-form input[type="text"],
#oec-login-form input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--oec-border);
	border-radius: var(--oec-radius-sm);
	font-size: 15px;
	font-family: inherit;
	color: var(--oec-text);
	background: #fff;
	transition: border-color var(--oec-transition), box-shadow var(--oec-transition);
	-webkit-appearance: none;
	box-sizing: border-box;
}

#oec-login-form input[type="text"]:focus,
#oec-login-form input[type="password"]:focus {
	outline: none;
	border-color: var(--oec-green-mid);
	box-shadow: 0 0 0 3px rgba( 64, 145, 108, 0.18 );
}

#oec-login-form .login-remember {
	display: flex;
	align-items: center;
	gap: 8px;
}

#oec-login-form .login-remember label {
	font-size: 13px;
	text-transform: none;
	letter-spacing: 0;
	color: var(--oec-text-mid);
	font-weight: 500;
	margin-bottom: 0;
}

#oec-login-form .login-submit {
	margin-top: 6px;
}

#oec-login-form input[type="submit"],
#oec-login-form #wp-submit {
	width: 100%;
	padding: 14px;
	background: var(--oec-green-dark);
	color: #fff;
	border: none;
	border-radius: var(--oec-radius);
	font-size: 16px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: background var(--oec-transition);
	-webkit-appearance: none;
}

#oec-login-form input[type="submit"]:hover,
#oec-login-form input[type="submit"]:focus,
#oec-login-form #wp-submit:hover {
	background: var(--oec-green);
}

/* Forgot password */
.oec-login-footer {
	text-align: center;
	margin-top: 18px;
	font-size: 13px;
}

.oec-login-footer a {
	color: var(--oec-green-mid);
	text-decoration: none;
}
.oec-login-footer a:hover {
	text-decoration: underline;
}

/* =========================================================
   ADMIN STYLES (inline in admin CSS, but fallback here)
   ========================================================= */
.oec-shortcode {
	display: inline-block;
	background: var(--oec-gray-pale);
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 14px;
	color: var(--oec-green-dark);
}

/* =========================================================
   RESPONSIVE — TABLET & UP
   ========================================================= */
@media ( min-width: 640px ) {
	.oec-view-inner {
		padding: 24px 24px 40px;
	}

	.oec-modal {
		border-radius: var(--oec-radius);
		margin-bottom: 60px;
	}

	.oec-nav-rail {
		max-width: 640px;
		margin: 0 auto;
		left: 50%;
		transform: translateX(-50%);
		border-radius: var(--oec-radius) var(--oec-radius) 0 0;
		border: 1px solid var(--oec-border);
		border-bottom: none;
	}
}

@media ( min-width: 1024px ) {
	.oec-app {
		max-width: 480px;
		margin: 0 auto;
		box-shadow: var(--oec-shadow-lg);
		min-height: 100svh;
	}
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media ( prefers-reduced-motion: reduce ) {
	.oec-app * {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
