body {
	min-height: 100vh;
	margin: 0;
	background: linear-gradient(135deg, #0f2027, #2c5364 80%);
	color: #00ffe7;
	font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
}

/* Keep page content flowing normally so the document scrolls, not inner blocks */
main, .page-wrap, .admin-inner { width: 100%; }
.container {
	background: rgba(20, 30, 40, 0.97);
	border: 2px solid #00ffe7;
	border-radius: 18px;
	box-shadow: 0 0 40px #00ffe7cc;
	padding: 1.3rem 1.2rem;
	text-align: center;
	max-width: 420px;
	width: 100%;
	margin: 1.2rem auto;
}

/* Topbar inner container styled like the login frame */
.topbar-inner {
	background: rgba(20, 30, 40, 0.97);
	border: 2px solid #00ffe7;
	border-radius: 18px;
	box-shadow: 0 0 40px #00ffe7cc;
	padding: 6px 14px;
	max-width: 1200px;
	width: calc(100% - 48px);
	margin: 6px auto;
	display: flex;
	align-items: center;
	gap: 16px;
}

/* extra spacing when topbar-inner is used for the admin wrapper */
.topbar-inner.admin-top { margin-top: 18px; }

.topbar-inner .menu-btn { background: transparent; border-color: rgba(0,255,231,0.06); }
.topbar-inner .brand { color: #00ffe7; }
.topbar-inner .search { flex: 1 1 100%; max-width: 1200px; min-width: 240px; }
.topbar-inner .search input[type="search"] { width:100%; background: #181f2a; border: 1px solid rgba(0,255,231,0.06); padding: 10px 12px; }

.title {
	font-size: 2rem;
	letter-spacing: 2px;
	margin-bottom: 1.2rem;
	color: #00ffe7;
	text-shadow: 0 0 10px #00ffe7cc;
}
.icon {
	font-size: 2.5rem;
	margin-bottom: 1.2rem;
	color: #00ffe7;
}
.text {
	font-size: 1.1rem;
	color: #b2fefa;
	margin-bottom: 1.2rem;
}
.footer {
	font-size: 0.95rem;
	color: #00ffe7;
	opacity: 0.7;
	margin-top: 2rem;
}
.field {
	margin-bottom: 1.1rem;
	text-align: left;
}
.field label {
	display: block;
	margin-bottom: 0.4rem;
	color: #b0bad6;
	font-size: 1rem;
	margin-bottom: 0.5rem;
	font-weight: 600;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: #181f2a;
	border-radius: 10px;
	border: 1.5px solid #232b3b;
	color: #fff;
	font-size: 1.05rem;
	padding: 12px 10px;
	outline: none;
	font-family: inherit;
	transition: border 0.2s;
}
.field input:focus {
	border: 1.5px solid #00ffe7;
	box-shadow: 0 0 8px #00ffe799;
}
.actions {
	display: flex;
	align-items: center;
	margin-bottom: 0.4rem;
	margin-bottom: 1.1rem;
}
.btn {
	width: 100%;
	background: linear-gradient(90deg, #00ffe7 0%, #2d8cf0 100%);
	color: #10151f;
	border: none;
	border-radius: 10px;
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
	padding: 0.8rem 0;
	margin-bottom: 1rem;
	box-shadow: 0 0 16px #00ffe7cc;
	margin-top: 0.2rem;
	transition: background 0.2s, color 0.2s;
}
.btn:hover {
	background: linear-gradient(90deg, #2d8cf0 0%, #00ffe7 100%);
}
.link {
	color: #00ffe7;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.98rem;
}
.switch, .legal {
	margin-top: 0.7rem;
	font-size: 0.98rem;
	color: #b2fefa;
}
.msg {
	color: #ff4b4b;
	margin: 0.7rem 0 0.5rem 0;
	font-size: 1rem;
}
.link {
		color: #00ffe7;
		text-decoration: underline;
		font-size: 0.98rem;
		transition: color 0.2s;
}
.link:hover {
		color: #2d8cf0;
}
.switch {
		margin-top: 1.2rem;
		color: #b0bad6;
		font-size: 1.01rem;
}
.legal {
		margin-top: 1.5rem;
		font-size: 0.98rem;
}
.terms {
		display: block;
		margin-bottom: 1.2rem;
}

/* Small pill button used in top-right for maintenance bypass/login */
.pill-btn {
	position: fixed;
	top: 16px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: rgba(10,14,18,0.6);
	border: 1px solid rgba(0,255,231,0.15);
	color: #00ffe7;
	border-radius: 12px;
	box-shadow: 0 0 18px rgba(0,255,231,0.08);
	text-decoration: none;
	font-size: 0.98rem;
}
.pill-btn .p-icon {
	width: 18px;
	height: 18px;
	display: inline-block;
	line-height: 18px;
	text-align: center;
	font-size: 16px;
}
.pill-btn:hover {
	background: rgba(16,20,26,0.8);
}

/* Topbar / Header styles to match TopTracker look */
.topbar {
	position: relative; /* allow header to scroll with the page */
	min-height: 64px; /* keep baseline height */
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 18px 8px;
	background: transparent;
	border-bottom: none;
	backdrop-filter: blur(6px);
}
.topbar-left { display:flex; align-items:center; gap:12px; flex: 1 1 auto; }
.topbar-right { display:flex; align-items:center; gap:12px; }
.topbar .menu-btn {
	width: 100px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	border: 1px solid rgba(0,255,231,0.06);
	background: rgba(10,14,18,0.4);
	color: #00ffe7;
	cursor: pointer;
}
.topbar .brand {
	color: #cfeef6;
	font-weight: 700;
	margin-left: 6px;
}
.topbar .search {
	flex: 1 1 auto;
	max-width: 720px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.topbar .search input[type="search"] {
	width: 100%;
	background: rgba(20,30,40,0.6);
	border: 1px solid rgba(255,255,255,0.03);
	color: #cfeef6;
	padding: 10px 12px;
	border-radius: 8px;
	outline: none;
}
.topbar .search input:focus {
	box-shadow: 0 0 12px rgba(0,255,231,0.06);
	border-color: rgba(0,255,231,0.25);
}
.topbar-inner {
	background: rgba(20, 30, 40, 0.97);
	border: 2px solid #00ffe7;
	border-radius: 18px;
	box-shadow: 0 0 40px #00ffe7cc;
	padding: 6px 14px;
	max-width: 1452px; /* increased another 10% from 1320px */
	width: calc(100% - 48px);
	margin: 6px auto;
	display: flex;
	align-items: center;
	gap: 16px;
}

.admin-inner {
	background: rgba(20, 30, 40, 0.97);
	border: 2px solid #00ffe7;
	border-radius: 18px;
	box-shadow: 0 0 40px #00ffe7cc;
	padding: 6px 14px;
	max-width: 1452px; /* increased another 10% from 1320px */
	width: calc(100% - 48px);
	margin: 2px auto 5px auto; /* reduced top margin so header stays above naturally */
	display: block;
}


/* Main content below fixed header */
.page-wrap { padding-top: 24px; display:block; }
.home-card { width:100%; padding: 2rem; background: rgba(16,22,28,0.6); border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,0.6); border:1px solid rgba(0,255,231,0.03); }

.nav-dropdown { position: absolute; top:64px; left:16px; background: rgba(8,12,16,0.95); border-radius: 8px; padding: 12px; min-width: 260px; box-shadow: 0 8px 32px rgba(0,0,0,0.6); display:none; z-index:1100; }
.nav-dropdown.open { display:block; }
.profile-dropdown { position: absolute; top:64px; right:16px; background: rgba(8,12,16,0.95); border-radius: 8px; padding: 8px 12px; min-width: 180px; box-shadow: 0 8px 32px rgba(0,0,0,0.6); display:none; z-index:1100; }
.profile-dropdown.open { display:block; }
.menu-btn.open { border-color: rgba(0,255,231,0.18); box-shadow: 0 0 12px rgba(0,255,231,0.06); }
.user-toggle { cursor: pointer; }

/* Welcome + logout styling matching screenshot */
.topbar .welcome {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 10px;
	border-radius: 12px;
	background: rgba(12,16,20,0.25);
	border: 1px solid rgba(255,255,255,0.02);
}
.topbar .welcome .displayname {
	color: #cfeef6;
	font-weight: 600;
}
.topbar .welcome .displayname .highlight {
	color: #ffd24a;
	text-shadow: 0 0 6px rgba(255,210,74,0.08);
}
.logout-btn {
   display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #712121;
    background: linear-gradient(180deg, #420909 0%, #290505 100%);
    color: #ff4f4f;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
	transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.logout-btn:hover {
	transform: translateY(-1px);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 20px rgba(0,0,0,0.65), 0 0 18px rgba(180,40,40,0.12);
	opacity: 1;
}
.topbar .avatar.small {
	width: 32px;
	height: 32px;
	border-radius: 18px;
	border: 2px solid rgba(0,255,231,0.08);
}

/* Up / Down / Ratio colors */
.stat-up .stat-value { color: #2ecc71; font-weight:700; }
.stat-down .stat-value { color: #ff4b4b; font-weight:700; }
.stat-ratio { color: #cfeef6; font-weight:600; }
.stat-ratio .stat-value { color: #00ffe7; font-weight:700; }
.stat-ratio .ratio-low { color: #ff4b4b !important; }
.stat-ratio .ratio-mid { color: #ffd24a !important; }
.stat-ratio .ratio-high { color: #2ecc71 !important; }

/* Admin panel card styling (matches site frames) */
.card {
	width: 100%;
	background: rgba(16,22,28,0.72);
	border: 1px solid rgba(0,255,231,0.04);
	border-radius: 14px;
	padding: 18px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.6);
	backdrop-filter: blur(6px);
}
.admin-grid {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.fullwidth-admin {
	/* exactly match .topbar-inner sizing and centering */
	max-width: 1452px;
	width: calc(100% - 48px);
	margin: 6px auto;
	box-sizing: border-box;
}
.fullwidth-admin .card { width: 100%; box-sizing: border-box; border-radius: 12px; }
/* Make admin frames visually match the header inner frame */
.fullwidth-admin .card {
	background: rgba(20, 30, 40, 0.97);
	border: 2px solid #00ffe7;
	border-radius: 18px;
	box-shadow: 0 0 40px #00ffe7cc;
	padding: 18px;
}
.fullwidth-admin .card.topbar-style {
	/* apply header/topbar-inner visual style */
	background: rgba(20, 30, 40, 0.97);
	border: 2px solid #00ffe7;
	border-radius: 18px;
	box-shadow: 0 0 40px #00ffe7cc;
	padding: 18px;
}
.card-header .grade-name { font-size: 1.25rem; letter-spacing: 1px; }
.card-header {
	display:flex; align-items:center; justify-content:space-between;
	gap:12px; margin-bottom:6px;
}
.card-header .grade-name {
	font-weight:800; color:#00ffe7; font-size:1.05rem;
}
.card-header .grade-id {
	color:#bfeef0; background:rgba(0,255,231,0.02); padding:6px 10px; border-radius:10px; font-weight:700;
}
.card .placeholder { height:88px; margin-top:12px; border-radius:10px; background:linear-gradient(90deg, rgba(255,255,255,0.01), rgba(255,255,255,0.005)); display:flex; align-items:center; justify-content:center; color:#9fbfc1 }

/* Left badge used inside each staff card (G12 left) */
.grade-badge {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: linear-gradient(135deg, #021216, #063033);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: #bfeef0; /* match .card-header .grade-id text color */
}

/* Row containing the left badge and meta details - align to top */
.card-row {
	display: flex;
	align-items: flex-start; /* align tops so Grade ID aligns with badge */
	gap: 12px;
}

.meta { margin-top: 0; color: #bfeef0; }

/* Ensure the meta column sticks to the top of the badge */
.card-meta { display:flex; flex-direction:column; justify-content:flex-start; }


