/* MerchantKits Attendance Manager — frontend styles */

.mkam-widget {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 480px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 24px;
	box-sizing: border-box;
	color: #1f2937;
}

.mkam-attendance,
.mkam-my-leaves {
	max-width: 800px;
}

.mkam-notice {
	text-align: center;
	color: #6b7280;
}

.mkam-widget__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.mkam-widget__title {
	margin: 0 0 16px;
}

.mkam-clock__name {
	font-weight: 700;
}

.mkam-clock__date {
	color: #6b7280;
	font-size: 14px;
}

.mkam-clock__time {
	font-family: "Courier New", monospace;
	font-size: 2rem;
	text-align: center;
	margin: 12px 0;
}

.mkam-clock__status {
	text-align: center;
	margin-bottom: 16px;
}

.mkam-clock__worked {
	color: #2563eb;
	font-weight: 600;
	margin-top: 4px;
}

.mkam-clock__note {
	width: 100%;
	box-sizing: border-box;
	margin-top: 8px;
}

.mkam-btn {
	display: block;
	width: 100%;
	border: none;
	border-radius: 8px;
	padding: 14px 20px;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	min-height: 48px;
	background: #2563eb;
}

.mkam-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.mkam-btn--clock-in { background: #16a34a; }
.mkam-btn--clock-out { background: #dc2626; }
.mkam-btn--primary { background: #2563eb; }

.mkam-btn--small {
	display: inline-block;
	width: auto;
	padding: 6px 12px;
	font-size: 13px;
	min-height: 0;
}

.mkam-clock__message,
.mkam-leave-form__message {
	margin-top: 12px;
	text-align: center;
	font-size: 14px;
}

.mkam-leave-form p {
	margin-bottom: 12px;
}

.mkam-leave-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.mkam-leave-form input,
.mkam-leave-form select,
.mkam-leave-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 8px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
}

.mkam-leave-balance {
	font-size: 14px;
	color: #2563eb;
	font-weight: 600;
}

/* Calendar */
.mkam-attendance__nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.mkam-attendance__title {
	font-weight: 700;
}

.mkam-calendar {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.mkam-calendar__head {
	text-align: center;
	font-weight: 700;
	font-size: 12px;
	color: #6b7280;
	padding: 4px 0;
}

.mkam-calendar__cell {
	min-height: 56px;
	border-radius: 6px;
	padding: 4px;
	font-size: 12px;
	background: #f3f4f6;
}

.mkam-calendar__cell--empty {
	background: transparent;
}

.mkam-calendar__day {
	font-weight: 700;
}

.mkam-calendar__time {
	display: block;
	font-size: 10px;
	color: #374151;
}

.mkam-calendar__cell--present { background: #dcfce7; }
.mkam-calendar__cell--absent { background: #fee2e2; }
.mkam-calendar__cell--late { background: #ffedd5; }
.mkam-calendar__cell--on_leave { background: #dbeafe; }
.mkam-calendar__cell--weekend,
.mkam-calendar__cell--holiday { background: #e5e7eb; }

.mkam-attendance__summary {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 16px;
	font-size: 14px;
}

.mkam-leave-balances {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.mkam-balance-card {
	flex: 1 1 120px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 12px;
	text-align: center;
}

.mkam-balance-card__value {
	display: block;
	font-size: 20px;
	font-weight: 700;
}

.mkam-balance-card__label {
	font-size: 12px;
	color: #6b7280;
}

.mkam-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

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

.mkam-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: #64748b;
}

.mkam-badge--approved { background: #16a34a; }
.mkam-badge--pending { background: #ea580c; }
.mkam-badge--rejected { background: #dc2626; }
.mkam-badge--cancelled { background: #94a3b8; }

@media screen and (max-width: 360px) {
	.mkam-widget {
		padding: 16px;
	}
}
