/* ==========================================================================
   Golden Loan Management — Public Styles
   ========================================================================== */

.glm-wrap { max-width: 920px; margin: 30px auto; padding: 0 16px; }
.glm-wrap-narrow { max-width: 460px; }
.glm-text-center { text-align: center; }

.glm-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 28px 30px;
	box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
	margin-bottom: 22px;
}

.glm-title { font-size: 24px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.glm-subtitle { color: #6b7280; margin: 0 0 22px; font-size: 14px; }

/* Forms */
.glm-form { margin: 0; }
.glm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.glm-field { display: flex; flex-direction: column; margin-bottom: 4px; }
.glm-field.glm-full { grid-column: 1 / -1; }
.glm-field label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.glm-field input,
.glm-field select,
.glm-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: #111827;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}
.glm-field input:focus,
.glm-field select:focus,
.glm-field textarea:focus {
	outline: none;
	border-color: #0f172a;
	box-shadow: 0 0 0 3px rgba(15, 23, 42, .12);
}
.glm-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; margin: 10px 0; }
.glm-checkbox input { width: auto; }

/* Buttons */
.glm-btn {
	display: inline-block;
	padding: 12px 22px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: transform .05s, opacity .15s, background .15s;
	margin-top: 14px;
}
.glm-btn:active { transform: translateY(1px); }
.glm-btn-primary { background: #0f172a; color: #fff; }
.glm-btn-primary:hover { background: #1e293b; color: #fff; }
.glm-btn-dark { background: #b45309; color: #fff; }
.glm-btn-dark:hover { background: #92400e; color: #fff; }
.glm-btn-light { background: #f1f5f9; color: #0f172a; }
.glm-btn-light:hover { background: #e2e8f0; }
.glm-btn-sm { padding: 7px 14px; font-size: 13px; margin-top: 0; }
.glm-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Alerts */
.glm-alert { padding: 13px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }
.glm-alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.glm-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Badges */
.glm-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 600; }
.glm-badge-lg { padding: 8px 18px; font-size: 14px; }

/* Tracking result */
.glm-track-result { margin-top: 24px; border-top: 1px solid #e5e7eb; padding-top: 22px; }
.glm-track-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.glm-track-label { display: block; font-size: 12px; color: #6b7280; }
.glm-track-head strong { font-size: 18px; color: #0f172a; }
.glm-track-table { width: 100%; border-collapse: collapse; }
.glm-track-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.glm-track-table td:first-child { color: #6b7280; width: 40%; }
.glm-notes-title { margin: 22px 0 10px; font-size: 15px; color: #0f172a; }
.glm-track-note { background: #f8fafc; border-left: 3px solid #0f172a; padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 10px; }
.glm-note-date { font-size: 11px; color: #94a3b8; }
.glm-track-note p { margin: 4px 0 0; font-size: 14px; }

/* Dashboard */
.glm-dash { max-width: 1140px; margin: 26px auto; padding: 0 16px; }
.glm-dash-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.glm-dash-user { font-size: 14px; color: #374151; display: flex; align-items: center; gap: 14px; }

.glm-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.glm-stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; text-align: center; }
.glm-stat-num { display: block; font-size: 30px; font-weight: 700; color: #0f172a; }
.glm-stat-num.glm-stat-sm { font-size: 20px; }
.glm-stats-2 { grid-template-columns: repeat(2, 1fr); max-width: 520px; }
.glm-row-muted td { color: #94a3b8; background: #fafafa; }
.glm-stat-label { font-size: 13px; color: #6b7280; }

.glm-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.glm-chart-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px 20px; }
.glm-chart-box h4 { margin: 0 0 12px; font-size: 15px; color: #0f172a; }
.glm-chart-box canvas { max-height: 260px; }

.glm-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.glm-filters input[type=text], .glm-filters select { padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.glm-filters input[type=text] { flex: 1; min-width: 220px; }
.glm-filters .glm-btn { margin-top: 0; }

.glm-table-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.glm-table { width: 100%; border-collapse: collapse; }
.glm-table th { text-align: left; padding: 14px 16px; background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.glm-table td { padding: 14px 16px; border-top: 1px solid #f1f5f9; font-size: 14px; color: #1f2937; }
.glm-table tr:hover td { background: #fafafa; }
.glm-table small { color: #94a3b8; }
.glm-empty { text-align: center; color: #94a3b8; padding: 30px 0; }

/* Detail view */
.glm-back { display: inline-block; margin-bottom: 16px; color: #0f172a; text-decoration: none; font-size: 14px; font-weight: 600; }
.glm-detail-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.glm-ref { color: #6b7280; margin: 4px 0 0; font-size: 14px; }
.glm-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.glm-detail-grid .glm-card { margin-bottom: 0; }
.glm-detail-grid h3, .glm-dash .glm-card h3 { margin: 0 0 14px; font-size: 16px; color: #0f172a; }
.glm-detail-table { width: 100%; border-collapse: collapse; }
.glm-detail-table td { padding: 9px 8px; border-bottom: 1px solid #f1f5f9; font-size: 14px; vertical-align: top; }
.glm-detail-table td:first-child { color: #6b7280; width: 40%; }
.glm-hr { border: none; border-top: 1px solid #e5e7eb; margin: 20px 0; }

/* Comments */
.glm-comment { border: 1px solid #f1f5f9; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.glm-comment-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: #94a3b8; margin-bottom: 6px; }
.glm-comment-meta strong { color: #0f172a; }
.glm-comment p { margin: 0; font-size: 14px; color: #1f2937; }
.glm-tag-visible { color: #16a34a; font-style: normal; background: #ecfdf5; padding: 2px 8px; border-radius: 999px; }
.glm-tag-internal { color: #b45309; font-style: normal; background: #fffbeb; padding: 2px 8px; border-radius: 999px; }
.glm-muted { color: #94a3b8; font-size: 14px; }

/* History */
.glm-history { list-style: none; margin: 0; padding: 0; }
.glm-history li { position: relative; padding: 0 0 14px 22px; font-size: 14px; color: #374151; border-left: 2px solid #e5e7eb; }
.glm-history li:last-child { border-left-color: transparent; }
.glm-history-dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #0f172a; }
.glm-history small { display: block; color: #94a3b8; margin-top: 2px; }

/* Responsive */
@media (max-width: 768px) {
	.glm-grid, .glm-charts, .glm-detail-grid { grid-template-columns: 1fr; }
	.glm-stats { grid-template-columns: repeat(2, 1fr); }
	.glm-table thead { display: none; }
	.glm-table, .glm-table tbody, .glm-table tr, .glm-table td { display: block; width: 100%; box-sizing: border-box; }
	.glm-table tr { border-top: 1px solid #e5e7eb; padding: 8px 0; }
	.glm-table td { border: none; padding: 6px 16px; display: flex; justify-content: space-between; }
	.glm-table td::before { content: attr(data-label); font-weight: 600; color: #64748b; }
	.glm-table td[data-label=""]::before { content: ""; }
}
