/**
 * GMNet Dashboard Styles
 *
 * Brand-consistent styling using the Grand Matriarchy palette:
 * - FOREST_MID:  #4A4E8A (headings, accents)
 * - GOLD_BRIGHT: #D4A84B (borders, buttons, highlights)
 * - CREAM:       #F0EEE9 (backgrounds)
 * - PANEL_FILL:  #F8F5EC (card fills)
 * - INK:         #1A1A30 (body text)
 * - WHITE_SOFT:  #FAFAF5 (page background)
 * - DARK_GOLD:   #4A4E8A (secondary headings)
 * - GOLD_DIM:    #9A7830 (subtle accents)
 * - FOREST_DARK: #2B2D5E (footer elements)
 *
 * @package Gma_Gmnet
 * @since   1.0.0
 */

/* ================================================================
 * Layout and containers
 * ================================================================ */

.gmnet-dashboard {
	font-family: 'Source Serif 4', Georgia, serif;
	color: #1A1A30;
	background: #FAFAF5;
	max-width: 900px;
	margin: 0 auto;
	padding: 0;
}

.gmnet-header,
.gmnet-share-section,
.gmnet-invite-section,
.gmnet-rewards-section {
	padding: 24px;
	margin-bottom: 2px;
	background: #FAFAF5;
}

.gmnet-header {
	border-bottom: 2px solid #D4A84B;
}

/* ================================================================
 * Typography
 * ================================================================ */

.gmnet-title {
	font-family: 'Playfair Display', Georgia, serif;
	color: #4A4E8A;
	font-size: 1.8em;
	margin: 0 0 6px 0;
	line-height: 1.2;
}

.gmnet-subtitle {
	color: #4A4E8A;
	font-size: 0.95em;
	margin: 0 0 20px 0;
}

.gmnet-section-title {
	font-family: 'Playfair Display', Georgia, serif;
	color: #4A4E8A;
	font-size: 1.25em;
	margin: 0 0 16px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #D4A84B;
}

.gmnet-subsection-title {
	font-family: 'Source Serif 4', Georgia, serif;
	color: #4A4E8A;
	font-size: 1.05em;
	margin: 16px 0 10px 0;
}

/* ================================================================
 * Stats row
 * ================================================================ */

.gmnet-stats-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.gmnet-stat-card {
	flex: 1;
	min-width: 100px;
	background: #F8F5EC;
	border: 1px solid #D4A84B;
	border-radius: 8px;
	padding: 16px 12px;
	text-align: center;
}

.gmnet-stat-value {
	display: block;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 2em;
	color: #4A4E8A;
	line-height: 1;
	margin-bottom: 4px;
}

.gmnet-stat-label {
	display: block;
	font-size: 0.85em;
	color: #4A4E8A;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ================================================================
 * Share section
 * ================================================================ */

.gmnet-share-row {
	display: flex;
	gap: 10px;
	align-items: center;
}

.gmnet-share-input {
	flex: 1;
	padding: 10px 14px;
	font-family: 'Source Serif 4', Georgia, serif;
	font-size: 0.95em;
	color: #1A1A30;
	background: #F8F5EC;
	border: 1px solid #9A7830;
	border-radius: 6px;
	outline: none;
}

.gmnet-share-input:focus {
	border-color: #D4A84B;
	box-shadow: 0 0 0 2px rgba(200, 168, 64, 0.2);
}

.gmnet-qr-container {
	margin-top: 16px;
	text-align: center;
}

.gmnet-qr-container canvas {
	border: 2px solid #D4A84B;
	border-radius: 8px;
}

.gmnet-qr-label {
	font-size: 0.85em;
	color: #4A4E8A;
	margin-top: 6px;
}

/* ================================================================
 * Buttons
 * ================================================================ */

.gmnet-btn {
	display: inline-block;
	padding: 10px 20px;
	font-family: 'Source Serif 4', Georgia, serif;
	font-size: 0.95em;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, transform 0.1s;
	line-height: 1.4;
}

.gmnet-btn:active {
	transform: scale(0.98);
}

.gmnet-btn-primary {
	background: #4A4E8A;
	color: #F0EEE9;
}

.gmnet-btn-primary:hover {
	background: #2B2D5E;
}

.gmnet-btn-secondary {
	background: #F8F5EC;
	color: #4A4E8A;
	border: 1px solid #9A7830;
}

.gmnet-btn-secondary:hover {
	background: #F0EEE9;
}

.gmnet-btn-small {
	padding: 6px 12px;
	font-size: 0.85em;
}

.gmnet-btn-copied {
	background: #4A4E8A;
}

/* Invite button (Life Board card) */
.gmnet-invite-btn {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	font-family: 'Source Serif 4', Georgia, serif;
	font-size: 0.85em;
	font-weight: 600;
	color: #4A4E8A;
	background: #F8F5EC;
	border: 1px solid #D4A84B;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s;
}

.gmnet-invite-btn:hover {
	background: #F0EEE9;
	border-color: #9A7830;
}

/* ================================================================
 * Invite list table
 * ================================================================ */

.gmnet-invite-table {
	width: 100%;
}

.gmnet-invite-header-row {
	display: flex;
	padding: 8px 0;
	border-bottom: 2px solid #D4A84B;
	font-size: 0.85em;
	font-weight: 600;
	color: #4A4E8A;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.gmnet-invite-row {
	display: flex;
	padding: 12px 0;
	border-bottom: 1px solid #F8F5EC;
	align-items: center;
}

.gmnet-invite-row:hover {
	background: #F8F5EC;
}

.gmnet-col-name {
	flex: 2;
	font-weight: 500;
}

.gmnet-col-status {
	flex: 1;
	text-align: center;
}

.gmnet-col-channel {
	flex: 1;
	text-align: center;
	font-size: 0.9em;
	color: #4A4E8A;
}

.gmnet-col-clicks {
	flex: 0.5;
	text-align: center;
}

.gmnet-col-date {
	flex: 1;
	text-align: right;
	font-size: 0.9em;
	color: #9A7830;
}

/* ================================================================
 * Status pills
 * ================================================================ */

.gmnet-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.gmnet-pill-draft {
	background: #F8F5EC;
	color: #4A4E8A;
}

.gmnet-pill-sent {
	background: #F0EEE9;
	color: #9A7830;
	border: 1px solid #9A7830;
}

.gmnet-pill-clicked {
	background: #D4A84B;
	color: #1A1A30;
}

.gmnet-pill-joined {
	background: #4A4E8A;
	color: #F0EEE9;
}

.gmnet-pill-active {
	background: #4A4E8A;
	color: #F0EEE9;
}

.gmnet-pill-churned {
	background: #E8D5AD;
	color: #1A1A30;
}

.gmnet-pill-expired {
	background: #ddd;
	color: #888;
}

/* ================================================================
 * Badges
 * ================================================================ */

.gmnet-badge-grid {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.gmnet-badge-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 16px 12px;
	background: #F8F5EC;
	border: 1px solid #D4A84B;
	border-radius: 10px;
	min-width: 110px;
	text-align: center;
}

.gmnet-badge-icon {
	font-size: 2em;
	line-height: 1;
	margin-bottom: 6px;
}

.gmnet-badge-label {
	font-size: 0.85em;
	font-weight: 600;
	color: #4A4E8A;
}

.gmnet-badge-date {
	font-size: 0.75em;
	color: #9A7830;
	margin-top: 4px;
}

/* ================================================================
 * Reward summary and history
 * ================================================================ */

.gmnet-reward-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.gmnet-reward-list li {
	padding: 8px 0;
	border-bottom: 1px solid #F8F5EC;
	font-size: 0.95em;
}

.gmnet-reward-list li:last-child {
	border-bottom: none;
}

.gmnet-reward-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #F8F5EC;
}

.gmnet-reward-desc {
	font-size: 0.95em;
	color: #1A1A30;
}

.gmnet-reward-who {
	font-size: 0.85em;
	color: #4A4E8A;
}

.gmnet-reward-date {
	font-size: 0.85em;
	color: #9A7830;
}

/* ================================================================
 * Modal
 * ================================================================ */

.gmnet-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(14, 30, 8, 0.6);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gmnet-modal {
	background: #FAFAF5;
	border: 2px solid #D4A84B;
	border-radius: 12px;
	width: 90%;
	max-width: 500px;
	box-shadow: 0 12px 40px rgba(14, 30, 8, 0.3);
}

.gmnet-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #D4A84B;
}

.gmnet-modal-title {
	font-family: 'Playfair Display', Georgia, serif;
	color: #4A4E8A;
	font-size: 1.2em;
	margin: 0;
}

.gmnet-modal-close {
	background: none;
	border: none;
	font-size: 1.6em;
	color: #9A7830;
	cursor: pointer;
	padding: 0;
	line-height: 1;
}

.gmnet-modal-close:hover {
	color: #4A4E8A;
}

.gmnet-modal-body {
	padding: 20px;
}

/* ================================================================
 * Form elements
 * ================================================================ */

.gmnet-form-group {
	margin-bottom: 16px;
}

.gmnet-form-label {
	display: block;
	font-size: 0.9em;
	font-weight: 600;
	color: #4A4E8A;
	margin-bottom: 6px;
}

.gmnet-form-input,
.gmnet-form-select {
	width: 100%;
	padding: 10px 12px;
	font-family: 'Source Serif 4', Georgia, serif;
	font-size: 0.95em;
	color: #1A1A30;
	background: #F8F5EC;
	border: 1px solid #9A7830;
	border-radius: 6px;
	outline: none;
	box-sizing: border-box;
}

.gmnet-form-input:focus,
.gmnet-form-select:focus {
	border-color: #D4A84B;
	box-shadow: 0 0 0 2px rgba(200, 168, 64, 0.2);
}

.gmnet-form-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 20px;
}

.gmnet-form-result {
	margin-top: 16px;
}

.gmnet-result-success {
	background: #F8F5EC;
	border: 1px solid #4A4E8A;
	border-radius: 8px;
	padding: 12px 16px;
	color: #4A4E8A;
}

.gmnet-result-success p {
	margin: 0 0 8px 0;
	font-weight: 600;
}

.gmnet-result-link {
	display: flex;
	gap: 8px;
	align-items: center;
}

.gmnet-result-link input {
	flex: 1;
}

.gmnet-result-error {
	background: #fdf0f0;
	border: 1px solid #c44;
	border-radius: 8px;
	padding: 12px 16px;
	color: #8b1a1a;
	margin: 0;
}

/* ================================================================
 * Login prompt
 * ================================================================ */

.gmnet-login-prompt {
	background: #F8F5EC;
	border: 2px solid #D4A84B;
	border-radius: 12px;
	padding: 48px 24px;
	text-align: center;
	max-width: 600px;
	margin: 24px auto;
}

.gmnet-login-inner .gmnet-title {
	margin-bottom: 12px;
}

.gmnet-login-inner .gmnet-body {
	color: #4A4E8A;
	margin-bottom: 20px;
	font-size: 1em;
}

/* ================================================================
 * Empty and loading states
 * ================================================================ */

.gmnet-empty,
.gmnet-loading {
	color: #9A7830;
	font-style: italic;
	font-size: 0.95em;
	padding: 12px 0;
}

.gmnet-error {
	color: #8b1a1a;
	font-size: 0.95em;
}

.gmnet-more {
	font-size: 0.85em;
	color: #9A7830;
	text-align: center;
	margin-top: 12px;
}

/* ================================================================
 * Responsive
 * ================================================================ */

@media ( max-width: 600px ) {
	.gmnet-stats-row {
		flex-direction: column;
		gap: 10px;
	}

	.gmnet-stat-card {
		min-width: auto;
	}

	.gmnet-share-row {
		flex-direction: column;
	}

	.gmnet-share-input {
		width: 100%;
	}

	.gmnet-invite-header-row {
		display: none;
	}

	.gmnet-invite-row {
		flex-wrap: wrap;
		gap: 6px;
	}

	.gmnet-col-name {
		flex: 1 1 100%;
		font-size: 1em;
	}

	.gmnet-col-status {
		flex: 0 0 auto;
		text-align: left;
	}

	.gmnet-col-channel {
		flex: 0 0 auto;
	}

	.gmnet-col-clicks {
		flex: 0 0 auto;
	}

	.gmnet-col-date {
		flex: 1 1 auto;
		text-align: left;
	}

	.gmnet-badge-grid {
		justify-content: center;
	}

	.gmnet-modal {
		width: 95%;
		margin: 10px;
	}
}

/* -- Scroll container + tablet (v2.1) -- */

.gmnet-invite-list {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .gmnet-dashboard {
        max-width: 820px;
    }
    .gmnet-stat-card {
        min-height: 80px;
    }
    .gmnet-btn {
        min-height: 44px;
    }
}
