/* MLRC Frontend CSS v1.0.3 */

.mlrc-dashboard {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 920px; margin: 20px auto; padding: 0 16px;
}

/* Welcome Bar */
.mlrc-welcome-bar {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.mlrc-welcome-bar h2 { margin: 0; }
.mlrc-member-id {
	background: #2271b1; color: #fff; padding: 6px 14px;
	border-radius: 20px; font-size: .85em; font-weight: 700; font-family: monospace; letter-spacing: 1px;
}

/* Stats Row */
.mlrc-stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.mlrc-stat-card {
	flex: 1 1 140px; background: #fff; border: 1px solid #e2e6ea;
	border-radius: 8px; padding: 16px; text-align: center;
	box-shadow: 0 1px 3px rgba(0,0,0,.05); border-top: 3px solid #ccc;
}
.mlrc-stat-card--primary { border-top-color: #2271b1; }
.mlrc-stat-card--green   { border-top-color: #00a32a; }
.mlrc-stat-card--blue    { border-top-color: #0891b2; }
.mlrc-stat-number { display: block; font-size: 1.4em; font-weight: 700; margin-bottom: 4px; }
.mlrc-stat-label  { font-size: .78em; color: #646970; }

/* Card */
.mlrc-card {
	background: #fff; border: 1px solid #e2e6ea; border-radius: 8px;
	padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.mlrc-card h3 { margin: 0 0 14px; color: #1d2327; }

/* Member ID Card */
.mlrc-id-card { background: linear-gradient(135deg, #1e3a5f 0%, #2271b1 100%); color: #fff; border: none; }
.mlrc-id-card-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.mlrc-id-card-left { flex: 1; }
.mlrc-id-card-label { font-size: .7em; letter-spacing: 2px; opacity: .7; text-transform: uppercase; margin-bottom: 6px; }
.mlrc-id-card-number { font-size: 1.6em; font-weight: 700; font-family: monospace; letter-spacing: 2px; margin-bottom: 10px; }
.mlrc-id-card-name  { font-size: 1em; font-weight: 600; margin-bottom: 4px; }
.mlrc-id-card-email { font-size: .8em; opacity: .8; margin-bottom: 6px; }
.mlrc-id-card-sponsor { font-size: .78em; opacity: .7; }
.mlrc-id-card-right { flex-shrink: 0; }
.mlrc-qr-img { border-radius: 8px; background: #fff; padding: 4px; display: block; }

/* Referral Row */
.mlrc-ref-row { display: flex; gap: 8px; }
.mlrc-ref-input {
	flex: 1; padding: 10px 12px; border: 1px solid #e2e6ea;
	border-radius: 6px; font-family: monospace; font-size: .85em; background: #f8f9fa;
}

/* Buttons */
.mlrc-btn {
	display: inline-flex; align-items: center; padding: 10px 18px;
	border-radius: 6px; border: none; cursor: pointer;
	font-weight: 600; font-size: .9em; transition: all .2s; text-decoration: none;
}
.mlrc-btn--primary { background: #2271b1; color: #fff; }
.mlrc-btn--primary:hover { background: #1a5f99; color: #fff; }
.mlrc-btn--primary:disabled { background: #8aabcc; cursor: not-allowed; }
.mlrc-btn--copy { background: #f0f0f0; color: #1d2327; }
.mlrc-btn--copy:hover { background: #e0e0e0; }

/* Table */
.mlrc-table { width: 100%; border-collapse: collapse; font-size: .88em; }
.mlrc-table th, .mlrc-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e2e6ea; }
.mlrc-table th { background: #f8f9fa; font-weight: 600; font-size: .8em; text-transform: uppercase; color: #646970; }
.mlrc-table tr:last-child td { border-bottom: none; }

/* Form */
.mlrc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.mlrc-form-group--full { grid-column: 1 / -1; }
.mlrc-form-group label { display: block; font-size: .83em; font-weight: 600; margin-bottom: 5px; color: #646970; text-transform: uppercase; letter-spacing: .5px; }
.mlrc-form-group input,
.mlrc-form-group textarea,
.mlrc-form-group select {
	width: 100%; padding: 10px 12px; border: 1px solid #e2e6ea;
	border-radius: 6px; font-size: .9em; box-sizing: border-box; background: #fff;
}
.mlrc-form-group input:focus,
.mlrc-form-group textarea:focus {
	outline: none; border-color: #2271b1; box-shadow: 0 0 0 3px rgba(34,113,177,.12);
}

/* Shop Rate Info */
.mlrc-shop-rate-info {
	background: #f0f7ff; border-left: 3px solid #2271b1;
	padding: 10px 14px; border-radius: 0 6px 6px 0; margin-bottom: 16px; font-size: .9em;
}

/* Preview Box */
.mlrc-preview-box {
	background: #f0f7ff; border: 1px solid #c3d9f5; border-radius: 8px;
	padding: 14px 18px; margin-bottom: 16px;
}
.mlrc-preview-box h4 { margin: 0 0 10px; color: #1d2327; }
.mlrc-preview-row {
	display: flex; justify-content: space-between; padding: 6px 0;
	border-bottom: 1px solid #dde8f5; font-size: .9em;
}
.mlrc-preview-row:last-child { border-bottom: none; }
.mlrc-preview-row--highlight { color: #006b2e; font-weight: 600; }

/* Notices */
.mlrc-notice { padding: 12px 14px; border-radius: 6px; margin-bottom: 14px; font-size: .9em; }
.mlrc-notice--success { background: #d1f2e1; color: #006b2e; border: 1px solid #52c87b; }
.mlrc-notice--error   { background: #fde8e8; color: #a00; border: 1px solid #e9a0a0; }

/* Referral Banner */
.mlrc-referral-banner {
	background: linear-gradient(135deg, #f0f7ff, #e8f5e9);
	border: 1px solid #c3d9f5; border-radius: 8px; padding: 14px 18px;
	margin-bottom: 20px; font-size: .95em;
}

/* Register Form */
.mlrc-register-form { max-width: 480px; margin: 30px auto; }
.mlrc-register-form h2 { text-align: center; margin-bottom: 20px; }
.mlrc-register-form .mlrc-form-group { margin-bottom: 14px; }
.mlrc-register-form .mlrc-form-grid { grid-template-columns: 1fr; }

/* Autocomplete */
.ui-autocomplete {
	background: #fff; border: 1px solid #e2e6ea; border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0,0,0,.12); z-index: 9999 !important;
	max-height: 250px; overflow-y: auto;
}
.ui-autocomplete .ui-menu-item-wrapper { padding: 10px 14px; cursor: pointer; font-size: .9em; }
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active { background: #2271b1; color: #fff; }

.hidden { display: none !important; }

@media (max-width: 600px) {
	.mlrc-form-grid { grid-template-columns: 1fr; }
	.mlrc-stats-row { flex-direction: column; }
	.mlrc-id-card-inner { flex-direction: column; text-align: center; }
}

/* ── Custom Search Dropdown ───────────────────────────────────────────────── */
.mlrc-form-group { position: relative; }

.mlrc-search-dropdown {
	position:       absolute;
	top:            100%;
	left:           0;
	right:          0;
	background:     #fff;
	border:         2px solid #2271b1;
	border-top:     none;
	border-radius:  0 0 8px 8px;
	box-shadow:     0 6px 16px rgba(0,0,0,.15);
	z-index:        99999;
	max-height:     250px;
	overflow-y:     auto;
}

.mlrc-result-item {
	padding:        11px 14px;
	cursor:         pointer;
	font-size:      .9em;
	border-bottom:  1px solid #f0f0f0;
	transition:     background .15s;
	outline:        none;
}

.mlrc-result-item:last-child { border-bottom: none; }

.mlrc-result-item:hover,
.mlrc-result-item:focus {
	background: #2271b1;
	color:      #fff;
}

.mlrc-result-loading {
	padding:    12px 14px;
	color:      #646970;
	font-size:  .88em;
	font-style: italic;
}

.mlrc-result-empty {
	padding:    12px 14px;
	color:      #a00;
	font-size:  .88em;
}
