/**
 * Employee Management System - shared styles.
 * Namespaced under .ems- / #ems- to avoid theme collisions.
 */

.ems-form-wrapper {
	max-width: 480px;
	margin: 0 auto;
	padding: 24px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
}

.ems-form-wrapper * {
	box-sizing: border-box;
}

.ems-notice {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 16px;
	font-size: 14px;
}

.ems-notice ul {
	margin: 0;
	padding-left: 18px;
}

.ems-notice-success {
	background: #e6f6ec;
	border: 1px solid #34a853;
	color: #1e7e34;
}

.ems-notice-error {
	background: #fdecea;
	border: 1px solid #d93025;
	color: #a50e0e;
}

.ems-notice-info {
	background: #e8f0fe;
	border: 1px solid #4285f4;
	color: #174ea6;
}

.ems-field {
	margin-bottom: 16px;
}

.ems-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.ems-field input[type="text"],
.ems-field input[type="email"],
.ems-field input[type="password"],
.ems-field input[type="date"],
.ems-field select,
.ems-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}

.ems-field-hint,
.ems-field-note {
	display: block;
	font-size: 12px;
	color: #666;
	margin-top: 4px;
}

.required {
	color: #d93025;
}

.ems-btn {
	display: inline-block;
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	background: #2563eb;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease;
}

.ems-btn:hover {
	background: #1d4ed8;
	color: #fff;
}

.ems-btn-secondary {
	background: #6b7280;
}

.ems-btn-secondary:hover {
	background: #4b5563;
}

.ems-btn-small {
	padding: 6px 12px;
	font-size: 12px;
}

.ems-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Dashboard */
.ems-dashboard {
	max-width: 960px;
	margin: 0 auto;
}

.ems-dashboard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.ems-logout-link {
	font-size: 13px;
	color: #d93025;
	text-decoration: none;
}

.ems-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.ems-tab-btn {
	padding: 10px 18px;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #6b7280;
}

.ems-tab-btn.active {
	color: #2563eb;
	border-bottom-color: #2563eb;
}

.ems-tab-panel {
	display: none;
}

.ems-tab-panel.active {
	display: block;
}

.ems-table {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 24px;
	font-size: 14px;
}

.ems-table th,
.ems-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #eee;
}

.ems-table-compact th,
.ems-table-compact td {
	padding: 6px 8px;
	font-size: 13px;
}

.ems-balance-grid {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.ems-balance-card {
	flex: 1 1 140px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 14px;
	text-align: center;
}

.ems-balance-type {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	color: #6b7280;
	letter-spacing: 0.03em;
}

.ems-balance-remaining {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
	margin: 4px 0;
}

.ems-balance-label {
	font-size: 11px;
	color: #9ca3af;
}

.ems-status {
	padding: 3px 8px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
}

.ems-status-pending {
	background: #fef3c7;
	color: #92400e;
}

.ems-status-approved {
	background: #d1fae5;
	color: #065f46;
}

.ems-status-rejected {
	background: #fee2e2;
	color: #991b1b;
}

.ems-badge {
	padding: 3px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	vertical-align: middle;
}

.ems-badge-active {
	background: #d1fae5;
	color: #065f46;
}

.ems-badge-completed {
	background: #e0e7ff;
	color: #3730a3;
}

.ems-badge-on_hold {
	background: #fef3c7;
	color: #92400e;
}

.ems-project-card {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 16px;
	background: #fff;
}

.ems-chip {
	display: inline-block;
	padding: 3px 10px;
	margin: 2px 4px 2px 0;
	background: #eef2ff;
	color: #4338ca;
	border-radius: 12px;
	font-size: 12px;
}

/* Admin screens */
.ems-admin-wrap .ems-stats-grid {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin: 20px 0;
}

.ems-stat-card {
	flex: 1 1 200px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 18px;
}

.ems-stat-number {
	display: block;
	font-size: 30px;
	font-weight: 700;
	color: #111827;
}

.ems-stat-label {
	display: block;
	font-size: 13px;
	color: #6b7280;
	margin: 4px 0 10px;
}

.ems-shortcode-hint {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	padding: 10px 14px;
	border-radius: 6px;
	display: inline-block;
}

.ems-admin-form {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 16px 20px;
	max-width: 640px;
	margin-bottom: 24px;
}

.ems-project-assign {
	margin: 10px 0;
	display: flex;
	gap: 8px;
	align-items: center;
}

.ems-form-message {
	margin-top: 10px;
	font-size: 13px;
}

.ems-form-message.success {
	color: #1e7e34;
}

.ems-form-message.error {
	color: #a50e0e;
}
