/* ============================================================
   Bripau Property Manager — Frontend Portal
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body.bpm-frontend {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
	background: #f0f2f5;
	-webkit-font-smoothing: antialiased;
}

body.bpm-frontend .wrap {
	margin: 0;
	max-width: none;
}

/* ---------- Login Page ---------- */
.bpm-login-body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 50%, #3182ce 100%);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bpm-login-wrapper {
	width: 100%;
	max-width: 420px;
	padding: 20px;
}

.bpm-login-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.bpm-login-header {
	text-align: center;
	padding: 40px 30px 20px;
	background: linear-gradient(180deg, #f7fafc 0%, #fff 100%);
}

.bpm-login-logo {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	background: #2b6cb0;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bpm-login-logo .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	color: #fff;
}

.bpm-login-header h1 {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: #1a202c;
}

.bpm-login-header p {
	margin: 0;
	font-size: 14px;
	color: #718096;
}

.bpm-login-error {
	margin: 0 24px;
	padding: 12px 16px;
	background: #fff5f5;
	border: 1px solid #feb2b2;
	border-radius: 8px;
	color: #c53030;
	font-size: 13px;
}

.bpm-login-form {
	padding: 24px 30px 30px;
}

.bpm-form-group {
	margin-bottom: 18px;
}

.bpm-form-group label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #4a5568;
}

.bpm-form-group input[type="text"],
.bpm-form-group input[type="password"],
.bpm-form-group input[type="email"] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 15px;
	transition: border-color 0.15s, box-shadow 0.15s;
	outline: none;
}

.bpm-form-group input:focus {
	border-color: #3182ce;
	box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.bpm-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	cursor: pointer;
}

.bpm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
}

.bpm-btn-primary {
	background: #2b6cb0;
	color: #fff;
}

.bpm-btn-primary:hover {
	background: #2c5282;
}

.bpm-btn-block {
	width: 100%;
}

.bpm-login-footer {
	text-align: center;
	padding: 0 30px 24px;
	font-size: 12px;
	color: #a0aec0;
}

/* ---------- App Shell ---------- */
.bpm-app {
	display: flex;
	min-height: 100vh;
}

/* Sidebar */
.bpm-sidebar {
	width: 260px;
	background: #1a365d;
	color: #e2e8f0;
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 100;
	transition: transform 0.25s ease;
}

.bpm-sidebar-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 20px;
	border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bpm-sidebar-header .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #63b3ed;
}

.bpm-sidebar-title {
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bpm-sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: 12px 0;
}

.bpm-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 20px;
	color: #a0aec0;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.15s, color 0.15s;
}

.bpm-nav-item:hover {
	background: rgba(255,255,255,0.06);
	color: #fff;
}

.bpm-nav-item.active {
	background: rgba(49, 130, 206, 0.25);
	color: #fff;
	border-right: 3px solid #63b3ed;
}

.bpm-nav-item .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	opacity: 0.85;
}

.bpm-sidebar-footer {
	border-top: 1px solid rgba(255,255,255,0.08);
	padding: 8px 0;
}

.bpm-nav-logout:hover {
	color: #fc8181 !important;
}

/* Main area */
.bpm-main {
	flex: 1;
	margin-left: 260px;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.bpm-topbar {
	height: 56px;
	background: #fff;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	position: sticky;
	top: 0;
	z-index: 50;
}

.bpm-menu-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	color: #4a5568;
}

.bpm-menu-toggle .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.bpm-topbar-right {
	font-size: 13px;
	color: #718096;
}

.bpm-content {
	flex: 1;
	padding: 24px;
}

/* Override some admin styles for frontend */
.bpm-frontend .bpm-wrap {
	margin: 0;
}

.bpm-frontend .bpm-page-title {
	font-size: 22px;
	margin-bottom: 20px;
}

.bpm-frontend .page-title-action {
	background: #2b6cb0 !important;
	border-color: #2b6cb0 !important;
	color: #fff !important;
	border-radius: 6px;
	padding: 4px 12px;
	font-size: 13px;
	text-decoration: none;
	margin-left: 10px;
}

.bpm-frontend .page-title-action:hover {
	background: #2c5282 !important;
}

.bpm-frontend .button-primary {
	background: #2b6cb0 !important;
	border-color: #2b6cb0 !important;
}

.bpm-frontend .button-primary:hover {
	background: #2c5282 !important;
}

.bpm-frontend .wp-list-table {
	border: none;
}

.bpm-frontend .form-table th {
	width: 200px;
}

/* Mobile */
@media (max-width: 768px) {
	.bpm-sidebar {
		transform: translateX(-100%);
	}

	.bpm-sidebar.open {
		transform: translateX(0);
	}

	.bpm-main {
		margin-left: 0;
	}

	.bpm-menu-toggle {
		display: block;
	}

	.bpm-content {
		padding: 16px;
	}

	.bpm-stats-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 480px) {
	.bpm-stats-grid {
		grid-template-columns: 1fr;
	}
}

/* ============================================================
   Modern Form Styles (all add/edit screens)
   ============================================================ */

.bpm-frontend .bpm-form {
	max-width: 720px;
}

.bpm-frontend .bpm-card {
	border: none;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
	overflow: hidden;
}

.bpm-frontend .bpm-card-header {
	background: #fff;
	border-bottom: 1px solid #edf2f7;
	padding: 16px 24px;
}

.bpm-frontend .bpm-card-header h2 {
	font-size: 15px;
	font-weight: 600;
	color: #2d3748;
	margin: 0;
}

.bpm-frontend .bpm-card-body {
	padding: 8px 24px 24px;
}

/* Convert classic form-table into stacked modern fields */
.bpm-frontend .form-table {
	width: 100%;
	border-collapse: collapse;
}

.bpm-frontend .form-table tbody {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.bpm-frontend .form-table tr {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 14px 0;
	border-bottom: 1px solid #f0f4f8;
}

.bpm-frontend .form-table tr:last-child {
	border-bottom: none;
}

.bpm-frontend .form-table th {
	width: 100% !important;
	padding: 0 0 6px 0 !important;
	font-size: 13px;
	font-weight: 600;
	color: #4a5568;
	text-align: left;
	line-height: 1.4;
}

.bpm-frontend .form-table td {
	padding: 0 !important;
	margin: 0;
}

.bpm-frontend .form-table .required {
	color: #e53e3e;
	font-weight: 700;
}

/* Inputs */
.bpm-frontend .form-table input[type="text"],
.bpm-frontend .form-table input[type="email"],
.bpm-frontend .form-table input[type="number"],
.bpm-frontend .form-table input[type="date"],
.bpm-frontend .form-table input[type="password"],
.bpm-frontend .form-table input[type="tel"],
.bpm-frontend .form-table select,
.bpm-frontend .form-table textarea,
.bpm-frontend input.regular-text,
.bpm-frontend input.small-text,
.bpm-frontend input.large-text,
.bpm-frontend select,
.bpm-frontend textarea {
	width: 100% !important;
	max-width: 100% !important;
	padding: 11px 14px !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #1a202c !important;
	background: #fff !important;
	box-shadow: none !important;
	transition: border-color 0.15s, box-shadow 0.15s !important;
	height: auto !important;
	min-height: 44px;
}

.bpm-frontend .form-table textarea,
.bpm-frontend textarea.large-text {
	min-height: 100px;
	resize: vertical;
}

.bpm-frontend .form-table input:focus,
.bpm-frontend .form-table select:focus,
.bpm-frontend .form-table textarea:focus,
.bpm-frontend input:focus,
.bpm-frontend select:focus,
.bpm-frontend textarea:focus {
	border-color: #3182ce !important;
	box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15) !important;
	outline: none !important;
}

.bpm-frontend .form-table input::placeholder,
.bpm-frontend .form-table textarea::placeholder {
	color: #a0aec0;
}

/* Number inputs a bit narrower feel but still full width on mobile */
.bpm-frontend .form-table input[type="number"] {
	max-width: 200px !important;
}

.bpm-frontend .form-table select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23718096' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	padding-right: 36px !important;
	cursor: pointer;
}

/* Submit row */
.bpm-frontend p.submit {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
	padding: 0;
	max-width: 720px;
}

.bpm-frontend .button-primary,
.bpm-frontend .button.button-primary,
.bpm-frontend .button-primary.button-large {
	background: #2b6cb0 !important;
	border: none !important;
	border-radius: 8px !important;
	padding: 12px 28px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	height: auto !important;
	line-height: 1.4 !important;
	box-shadow: 0 1px 3px rgba(43, 108, 176, 0.3) !important;
	transition: background 0.15s, transform 0.1s !important;
}

.bpm-frontend .button-primary:hover {
	background: #2c5282 !important;
	transform: translateY(-1px);
}

.bpm-frontend .button-large:not(.button-primary),
.bpm-frontend .button:not(.button-primary):not(.button-small) {
	background: #fff !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	padding: 11px 22px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #4a5568 !important;
	height: auto !important;
	line-height: 1.4 !important;
	text-decoration: none !important;
}

.bpm-frontend .button-large:not(.button-primary):hover {
	background: #f7fafc !important;
	border-color: #cbd5e0 !important;
}

/* Page title */
.bpm-frontend .bpm-page-title {
	font-size: 22px !important;
	font-weight: 700 !important;
	color: #1a202c !important;
	margin: 0 0 24px !important;
	padding: 0 !important;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.bpm-frontend .page-title-action {
	background: #2b6cb0 !important;
	border: none !important;
	color: #fff !important;
	border-radius: 8px !important;
	padding: 8px 16px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	box-shadow: 0 1px 3px rgba(43, 108, 176, 0.25);
}

.bpm-frontend .page-title-action:hover {
	background: #2c5282 !important;
	color: #fff !important;
}

/* Tables list view */
.bpm-frontend .wp-list-table {
	border: none !important;
	border-collapse: separate;
	border-spacing: 0;
}

.bpm-frontend .wp-list-table thead th {
	background: #f7fafc !important;
	border-bottom: 1px solid #e2e8f0 !important;
	padding: 12px 16px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #718096 !important;
}

.bpm-frontend .wp-list-table tbody td {
	padding: 14px 16px !important;
	border-bottom: 1px solid #edf2f7 !important;
	vertical-align: middle;
	font-size: 14px;
}

.bpm-frontend .wp-list-table tbody tr:hover {
	background: #f7fafc;
}

.bpm-frontend .button-small {
	border-radius: 6px !important;
	padding: 5px 12px !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	height: auto !important;
	line-height: 1.4 !important;
	border: 1px solid #e2e8f0 !important;
	background: #fff !important;
	color: #4a5568 !important;
}

.bpm-frontend .button-small:hover {
	background: #edf2f7 !important;
	border-color: #cbd5e0 !important;
}

/* Filters bar */
.bpm-frontend .bpm-filters {
	background: #fff;
	padding: 14px 18px;
	border-radius: 10px;
	margin-bottom: 16px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.bpm-frontend .bpm-filters select {
	min-width: 160px;
	max-width: 220px !important;
	padding: 9px 14px !important;
	min-height: 40px;
}

.bpm-frontend .bpm-filters .button {
	border-radius: 8px !important;
	padding: 9px 18px !important;
	height: auto !important;
	font-weight: 500 !important;
}

/* Notices */
.bpm-frontend .notice {
	border-radius: 8px !important;
	border-left-width: 4px !important;
	padding: 12px 16px !important;
	margin-bottom: 20px !important;
}

/* Two-column form layout on wider screens */
@media (min-width: 700px) {
	.bpm-frontend .form-table tr {
		flex-direction: row;
		align-items: center;
		gap: 20px;
	}

	.bpm-frontend .form-table th {
		width: 200px !important;
		flex-shrink: 0;
		padding: 0 !important;
	}

	.bpm-frontend .form-table td {
		flex: 1;
	}
}

/* Mobile form tweaks */
@media (max-width: 699px) {
	.bpm-frontend .bpm-card-body {
		padding: 8px 16px 20px;
	}

	.bpm-frontend .form-table input[type="number"] {
		max-width: 100% !important;
	}

	.bpm-frontend p.submit {
		flex-direction: column;
		align-items: stretch;
	}

	.bpm-frontend p.submit .button {
		width: 100%;
		text-align: center;
		justify-content: center;
	}
}
