/**
 * Ashok Uniforms - School Partner Portal Stylesheet
 * Executive Dashboard with CanvasJS, unified design with /school/ and /uniforms/
 */

:root {
	--navy: #0f2347;
	--navy-dark: #081532;
	--navy-light: #eff4fc;
	--gold: #c19a3e;
	--gold-2: #e3c477;
	--gold-light: #fef3c7;
	--gold-soft: #f6ecd0;
	--gold-subtle: rgba(193, 154, 62, 0.15);
	--slate-bg: #f8fafc;
	--line: #e1e7f0;
	--line-border: #e2e8f0;
	--mist: #f4f6fa;
	--ink: #18223a;
	--muted: #5d687c;
	--stripe: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 9px);
}

body.page-template-default:has(.ashok-portal-dashboard),
body:has(.ashok-portal-login-wrapper),
body.page-id-50 {
	background-color: var(--mist) !important;
}

/* ==========================================================================
   1. Login Screen
   ========================================================================== */
.ashok-portal-login-wrapper {
	min-height: 80vh;
	display: flex;
	align-items: center;
	padding: 4rem 0;
	background: var(--mist);
}

.ashok-portal-card {
	border-radius: 1.5rem !important;
	overflow: hidden;
	box-shadow: 0 20px 45px rgba(15, 35, 71, 0.12) !important;
}

.card-header-brand {
	background: var(--stripe), radial-gradient(circle at 85% 0, #1d3a72 0, var(--navy) 50%, var(--navy-dark) 100%);
	color: #ffffff;
}

.brand-crest {
	width: 58px;
	height: 58px;
	margin: 0 auto;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(227, 196, 119, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	color: var(--gold-2);
}

.brand-name {
	font-family: 'Newsreader', Georgia, serif;
	font-weight: 700;
	color: #ffffff;
}

.brand-sub {
	font-size: 0.85rem;
	color: #b9c6de;
	letter-spacing: 0.02em;
}

.btn-portal-primary {
	background: var(--navy) !important;
	border-color: var(--navy) !important;
	color: #ffffff !important;
	border-radius: 50rem !important;
	font-weight: 600 !important;
	transition: all 0.25s ease !important;
}

.btn-portal-primary:hover {
	background: var(--gold) !important;
	border-color: var(--gold) !important;
	color: var(--navy-dark) !important;
	box-shadow: 0 8px 20px rgba(193, 154, 62, 0.3) !important;
	transform: translateY(-2px);
}

/* ==========================================================================
   2. Executive Dashboard Layout: Hero & Flush Header
   ========================================================================== */
.ashok-portal-dashboard {
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--mist);
}

/* Flush Hero Header (Identical to Single School Page) */
.ashok-portal-dashboard .hero {
	background: var(--stripe), radial-gradient(circle at 85% 0, #1d3a72 0, var(--navy) 45%, var(--navy-dark) 100%);
	color: #b9c6de;
	padding: 1.35rem 0 3.5rem;
	margin: 0 !important;
	border-radius: 0 !important;
}

.ashok-portal-dashboard .crumb {
	--bs-breadcrumb-divider-color: #7f8fb0;
	--bs-breadcrumb-item-active-color: var(--gold-2);
	font-size: .84rem;
	margin-bottom: 0.85rem;
}

.ashok-portal-dashboard .crumb a {
	color: #b9c6de;
	text-decoration: none;
}

.ashok-portal-dashboard .crumb a:hover {
	color: #fff;
}

.ashok-portal-dashboard .shead {
	display: flex;
	gap: 1.1rem;
	align-items: center;
	flex-wrap: wrap;
}

.ashok-portal-dashboard .screst {
	width: 3.6rem;
	height: 3.6rem;
	border-radius: 0.95rem;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(227, 196, 119, .55);
	color: var(--gold-2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	flex: none;
	overflow: hidden;
}

.ashok-portal-dashboard .screst img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ashok-portal-dashboard .hero h1 {
	color: #fff !important;
	font-family: 'Newsreader', Georgia, 'Times New Roman', serif !important;
	font-size: clamp(1.4rem, 2.2vw, 1.85rem) !important;
	font-weight: 700 !important;
	line-height: 1.2;
	margin: 0 0 .35rem;
}

.ashok-portal-dashboard .sbadges {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.ashok-portal-dashboard .hb {
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .05em;
	padding: .2rem .75rem;
	border-radius: 50rem;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	margin-right: .35rem;
}

.ashok-portal-dashboard .hb-gold {
	background: #f6ecd0;
	color: #7a5c14;
}

.ashok-portal-dashboard .btn-line {
	border: 1.5px solid rgba(255, 255, 255, 0.4);
	color: #ffffff;
	padding: .38rem .9rem;
	font-size: .84rem;
	border-radius: 50rem;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.08);
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
}

.ashok-portal-dashboard .btn-line:hover {
	background: #ffffff;
	color: var(--navy);
	border-color: #ffffff;
}

/* ==========================================================================
   3. Control Bar (Toolbar Panel matching Single School Kit)
   ========================================================================== */
.ashok-portal-dashboard .panelwrap {
	margin-top: -1.75rem;
	margin-bottom: 1.25rem;
	position: relative;
	z-index: 3;
}

.ashok-portal-dashboard .panel {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 1rem;
	padding: 0.55rem 0.95rem;
	box-shadow: 0 14px 34px rgba(15, 35, 71, .09);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.ashok-portal-dashboard .panel-left {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
	flex: 1;
}

.ashok-portal-dashboard .panel-tag {
	font-size: 0.74rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
}

.ashok-portal-dashboard .panel-right {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: none;
}

.ashok-portal-dashboard .lbl {
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--muted);
	white-space: nowrap;
}

/* ==========================================================================
   4. Main Content Area & KPI Metric Cards
   ========================================================================== */
.ashok-portal-dashboard .main {
	padding: 0.5rem 0 3.5rem;
	background: var(--mist);
}

.kpi-card {
	border: 1.5px solid var(--line) !important;
	border-radius: 1.1rem !important;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	box-shadow: 0 4px 14px rgba(15, 35, 71, 0.03) !important;
}

.kpi-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(15, 35, 71, 0.08) !important;
	border-color: #cbd5e1 !important;
}

.kpi-label {
	font-size: 0.76rem;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.kpi-value {
	font-size: 1.65rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 0.25rem;
	font-family: 'Figtree', sans-serif;
}

.kpi-subtext {
	font-size: 0.8rem;
}

.kpi-icon {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
}

.bg-gold-subtle-box {
	background: #fffdf5 !important;
	border-color: #f6ecd0 !important;
}

.bg-navy-light { background-color: #eff6ff; }
.bg-blue-light { background-color: #f0fdf4; }
.bg-green-light { background-color: #ecfdf5; }
.bg-amber-light { background-color: #fef3c7; }
.text-amber { color: #d97706; }
.text-gold { color: var(--gold) !important; }
.bg-gold { background-color: var(--gold) !important; }
.bg-navy { background-color: var(--navy) !important; }
.text-navy { color: var(--navy) !important; }
.text-light-slate { color: #cbd5e1; }
.bg-white-20 { background-color: rgba(255, 255, 255, 0.2); }

/* ==========================================================================
   5. Chart Cards & Orders Ledger Table
   ========================================================================== */
.chart-card,
.orders-card {
	border: 1.5px solid var(--line) !important;
	border-radius: 1.1rem !important;
	box-shadow: 0 4px 14px rgba(15, 35, 71, 0.03) !important;
}

.chart-card h3,
.orders-card h3 {
	font-family: 'Newsreader', Georgia, serif;
	font-size: 1.25rem;
	color: var(--navy);
}

.portal-orders-table th {
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #475569;
	font-weight: 700;
	padding: 11px 14px;
	background: #f8fafc;
	border-bottom: 2px solid var(--line);
}

.portal-orders-table td {
	padding: 12px 14px;
	font-size: 0.88rem;
	border-bottom: 1px solid var(--line);
}

.utr-ref {
	font-size: 0.72rem;
	font-family: monospace;
	color: #059669;
	margin-top: 2px;
}

/* CanvasJS Branding Clean Hide */
.canvasjs-chart-credit {
	display: none !important;
}

/* Responsive Rules */
@media (max-width: 991px) {
	/* Center Hero Section, Crest, Titles & Badges on Mobile */
	.ashok-portal-dashboard .shead {
		flex-direction: column !important;
		text-align: center !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 0.85rem !important;
	}

	.ashok-portal-dashboard .screst {
		margin: 0 auto !important;
	}

	.ashok-portal-dashboard .sinfo {
		text-align: center !important;
		width: 100% !important;
	}

	.ashok-portal-dashboard .hero h1 {
		text-align: center !important;
	}

	.ashok-portal-dashboard .sbadges {
		display: flex !important;
		flex-wrap: wrap !important;
		justify-content: center !important;
		align-items: center !important;
		margin: 0.5rem auto 0 !important;
		text-align: center !important;
		gap: 0.45rem !important;
		width: 100% !important;
	}

	.ashok-portal-dashboard .hb {
		margin: 0 !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
	}

	.ashok-portal-dashboard .sactions {
		width: 100% !important;
		margin: 0.75rem auto 0 !important;
		justify-content: center !important;
	}

	.ashok-portal-dashboard .panel {
		flex-direction: column;
		align-items: stretch;
		gap: 0.6rem;
		padding: 0.75rem 0.85rem;
	}

	.ashok-portal-dashboard .panel-left,
	.ashok-portal-dashboard .panel-right {
		width: 100%;
		justify-content: space-between;
	}

	.ashok-portal-dashboard .panel-right {
		padding-top: 0.5rem;
		border-top: 1px solid var(--line);
	}

	.ashok-portal-dashboard .panel-right form {
		width: 100%;
		justify-content: space-between;
	}

	.ashok-portal-dashboard .panel-right select {
		width: auto;
		flex: 1;
	}
}
