@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

* {
	font-family: 'Open Sans', sans-serif;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--grey: #F1F0F6;
	--dark-grey: #8D8D8D;
	--light: #fff;
	--dark: #000;
	--green: #81D43A;
	--light-green: #E3FFCB;
	--blue: #FFC107; /* electric yellow */
	--light-blue: #FFF4CC; /* light electric yellow */
	--dark-blue: #E0A800; /* darker electric yellow */
	--red: #FC3B56;
}

html {
	overflow-x: hidden;
	scrollbar-gutter: stable;
}

body {
	background: var(--grey);
	overflow-x: hidden;
}


a {
	text-decoration: none;
}

li {
	list-style: none;
}







/* SIDEBAR */
#sidebar {
	position: fixed;
	max-width: 260px;
	width: 100%;
	background: var(--light);
	top: 0;
	left: 0;
	height: 100%;
	overflow-y: auto;
	scrollbar-width: none;
	transition: all .3s ease;
	z-index: 200;
}
#sidebar.hide {
	max-width: 60px;
}
#sidebar.hide:hover { /* disable hover-to-open; keep collapsed */ max-width: 60px; }
/* Also disable transitions on sidebar during prepaint-collapsed to avoid layout animation */
html.sb-collapsed #sidebar { transition: none !important; }

/* Early-collapsed styling via html.sb-collapsed to avoid initial flicker */
html.sb-collapsed #sidebar { max-width: 60px; }
html.sb-collapsed #sidebar .side-menu { padding: 0 6px; }
html.sb-collapsed #sidebar .ads { display: none; }
html.sb-collapsed #sidebar .divider { text-align: center; }
/* Ensure content is already positioned for collapsed sidebar on first paint */
html.sb-collapsed #content { width: calc(100% - 60px); left: 60px; }
#sidebar.hide:hover { /* disable hover-to-open; keep collapsed */ max-width: 60px; }
#sidebar::-webkit-scrollbar {
	display: none;
}
#sidebar .brand {
	font-size: 18px; /* smaller brand text */
	display: flex;
	align-items: center;
	height: 64px;
	font-weight: 700;
	color: var(--blue);
	position: sticky;
	top: 0;
	left: 0;
	z-index: 100;
	background: var(--light);
	transition: all .3s ease;
	padding: 0 6px;
}
#sidebar .brand .icon { font-size: 32px; }
#sidebar .icon {
	min-width: 48px;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-right: 6px;
}
#sidebar .icon-right {
	margin-left: auto;
	transition: all .3s ease;
}
#sidebar .side-menu {
	margin: 36px 0;
	padding: 0 20px;
	transition: all .3s ease;
}
#sidebar.hide .side-menu {
	padding: 0 6px;
}
/* keep compact padding while collapsed, even on hover */
#sidebar.hide:hover .side-menu { padding: 0 6px; }
#sidebar .side-menu a {
	display: flex;
	align-items: center;
	font-size: 14px;
	color: var(--dark);
	padding: 12px 16px 12px 0;
	transition: all .3s ease;
	border-radius: 10px;
	margin: 4px 0;
	white-space: nowrap;
}
#sidebar .side-menu > li > a:hover {
	background: var(--grey);
}
#sidebar .side-menu > li > a.active .icon-right {
	transform: rotateZ(90deg);
}
#sidebar .side-menu > li > a.active,
#sidebar .side-menu > li > a.active:hover {
	background: var(--blue);
	color: var(--light);
}
#sidebar .divider {
	margin-top: 24px;
	font-size: 12px;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--dark-grey);
	transition: all .3s ease;
	white-space: nowrap;
}
/* no divider alignment change on hover when collapsed */
#sidebar.hide .divider {
	text-align: center;
}
#sidebar .side-dropdown {
	padding-left: 54px;
	max-height: 0;
	overflow-y: hidden;
	transition: all .15s ease;
}
#sidebar .side-dropdown.show {
	max-height: 1000px;
}
#sidebar .side-dropdown a:hover { color: var(--blue); }
#sidebar .ads {
	width: 100%;
	padding: 20px;
}
#sidebar.hide .ads {
	display: none;
}
#sidebar.hide:hover .ads { display: none; }

/* restore upgrade button styling (previously broken by edit) */
#sidebar .btn-upgrade {
	font-size: 14px;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 12px 0;
	color: var(--light);
	background: var(--blue);
	transition: all .3s ease;
	border-radius: 5px;
	font-weight: 600;
	margin-bottom: 12px;
}
#sidebar .btn-upgrade:hover {
	background: var(--dark-blue);
}
#sidebar .ads .wrapper p {
	font-size: 12px;
	color: var(--dark-grey);
	text-align: center;
}
#sidebar .ads .wrapper p span {
	font-weight: 700;
}
/* SIDEBAR */





/* CONTENT */
#content {
	position: relative;
	width: calc(100% - 260px);
	left: 260px;
	transition: all .3s ease;
}
#sidebar.hide + #content {
	width: calc(100% - 60px);
	left: 60px;
}
/* When prepaint-collapsed class is present, avoid sliding animation */
html.sb-collapsed #content { transition: none !important; }
/* NAVBAR */
nav {
	background: var(--light);
	height: 64px;
	padding: 0 20px;
	display: flex;
	align-items: center;
	grid-gap: 28px;
	position: sticky;
	top: 0;
	left: 0;
	z-index: 100;
}
nav .toggle-sidebar {
	font-size: 18px;
	cursor: pointer;
}
nav form {
	max-width: 400px;
	width: 100%;
	margin-right: auto;
}
nav .form-group {
	position: relative;
}
nav .form-group input {
	width: 100%;
	background: var(--grey);
	border-radius: 5px;
	border: none;
	outline: none;
	padding: 10px 36px 10px 16px;
	transition: all .3s ease;
}
nav .form-group input:focus {
	box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--light-blue);
}
nav .form-group .icon {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: 16px;
	color: var(--dark-grey);
}
nav .nav-link {
	position: relative;
}
nav .nav-link .icon {
	font-size: 18px;
	color: var(--dark);
}
nav .nav-link .badge {
	position: absolute;
	top: -12px;
	right: -12px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--light);
	background: var(--red);
	display: flex; /* flex centering */
	justify-content: center;
	align-items: center;
	text-align: center;
	line-height: 1; /* avoid vertical offset from font metrics */
	color: var(--light);
	font-size: 10px;
	font-weight: 700;
}
/* Hide the badge when there's no number/text */
nav .nav-link .badge:empty { display: none; }
nav .divider {
	width: 1px;
	background: var(--grey);
	height: 12px;
	display: block;
}
nav .profile {
	position: relative;
}
nav .profile img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	cursor: pointer;
}
nav .profile .profile-link {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background: var(--light);
	padding: 10px 0;
	box-shadow: 4px 4px 16px rgba(0, 0, 0, .1);
	border-radius: 10px;
	width: 190px;
	opacity: 0;
	pointer-events: none;
	transition: all .3s ease;
}
nav .profile .profile-link.show {
	opacity: 1;
	pointer-events: visible;
	top: 100%;
}
nav .profile .profile-link a {
	padding: 10px 20px;
	display: flex;
	grid-gap: 10px;
	font-size: 14px;
	color: var(--dark);
	align-items: center;
	transition: all .3s ease;
}
nav .profile .profile-link a:hover {
	background: var(--grey);
}
/* NAVBAR */



/* MAIN */
main {
	width: 100%;
	padding: 24px 20px 20px 20px;
    transition: opacity .25s ease;
}
main .title {
	font-size: 28px;
	font-weight: 600;
	margin-bottom: 10px;
}
main .breadcrumbs {
	display: flex;
	grid-gap: 6px;
}
main .breadcrumbs li,
main .breadcrumbs li a {
	font-size: 14px;
}
main .breadcrumbs li a {
	color: var(--blue);
}
main .breadcrumbs li a.active,
main .breadcrumbs li.divider {
	color: var(--dark-grey);
	pointer-events: none;
}
main .info-data {
	margin-top: 36px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	grid-gap: 20px;
}
/* Responsive layout variants for repairing cards (6 cards) */
#repairCardsGrid { grid-auto-rows: 1fr; }
/* Reduce top spacing below filter bar on repairing page */
#repairCardsGrid { margin-top: 20px; }
/* Creating page cards responsive (reuse same pattern) */
#createCardsGrid { grid-auto-rows:1fr; margin-top:20px; }
@media (min-width:1200px){ #createCardsGrid { grid-template-columns:repeat(3,1fr);} }
@media (min-width:900px) and (max-width:1199.98px){ #createCardsGrid { grid-template-columns:repeat(2,1fr);} }
@media (max-width:599.98px){ #createCardsGrid { grid-template-columns:1fr; } }
@media (min-width:600px) and (max-width:899.98px){ #createCardsGrid { grid-template-columns:repeat(6,minmax(160px,1fr)); overflow-x:auto; } #createCardsGrid .card { min-width:160px; } }
/* Default (large): 3 x 2 (three columns, two rows) */
@media (min-width: 1200px) { #repairCardsGrid { grid-template-columns: repeat(3, 1fr); } }
/* Medium wide: 2 x 3 */
@media (min-width: 900px) and (max-width: 1199.98px) { #repairCardsGrid { grid-template-columns: repeat(2, 1fr); } }
/* Narrow tablet: 1 x 6 (single column stack) */
@media (max-width: 599.98px) { #repairCardsGrid { grid-template-columns: 1fr; } }
/* Intermediate small landscape: 6 x 1 (single row scrollable) */
@media (min-width: 600px) and (max-width: 899.98px) {
  #repairCardsGrid { grid-template-columns: repeat(6, minmax(160px, 1fr)); overflow-x: auto; }
  #repairCardsGrid .card { min-width: 160px; }
}
main .info-data .card {
	padding: 20px;
	border-radius: 10px;
	background: var(--light);
	box-shadow: 4px 4px 16px rgba(0, 0, 0, .05);
}
main .card .head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}
main .card .head h2 {
	font-size: 24px;
	font-weight: 600;
}
main .card .head p {
	font-size: 14px;
}
main .card .head .icon {
	font-size: 20px;
	color: var(--green);
}
main .card .head .icon.down {
	color: var(--red);
}
main .card .progress {
	display: block;
	margin-top: 24px;
	height: 10px;
	width: 100%;
	border-radius: 10px;
	background: var(--grey);
	overflow-y: hidden;
	position: relative;
	margin-bottom: 4px;
}
main .card .progress::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: var(--blue);
	width: var(--value);
}
main .card .label {
	font-size: 14px;
	font-weight: 700;
}
main .data {
	display: flex;
	flex-direction: column; /* stack vertically: row 2 chart, row 3 add form, row 4 records */
	row-gap: 20px; /* vertical spacing between blocks */
	margin-top: 20px;
}
main .data .content-data { width: 100%; }
main .data .content-data {
	flex-grow: 1;
	flex-basis: 400px;
	padding: 20px;
	background: var(--light);
	border-radius: 10px;
	box-shadow: 4px 4px 16px rgba(0, 0, 0, .1);
}
/* Compact variant for small filter bar (repairing + creating page) */
#repairFilterWrapper > .content-data.compact-filter-box,
#createFilterWrapper > .content-data.compact-filter-box {
	/* Konsisten: padding lebih kecil dibanding .content-data default */
	padding: 12px 20px !important;
	flex-basis: auto;
	min-height: 0;
	box-shadow: 4px 4px 16px rgba(0, 0, 0, .05) !important; /* match cards subtle */
}
#repairFilterWrapper .compact-filter-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 30px;
}
main .content-data .head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
}
main .content-data .head h3 {
	font-size: 20px;
	font-weight: 600;
}
main .content-data .head .menu {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
}
main .content-data .head .menu .icon {
	cursor: pointer;
}
main .content-data .head .menu-link {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 140px;
	background: var(--light);
	border-radius: 10px;
	box-shadow: 4px 4px 16px rgba(0, 0, 0, .1);
	padding: 10px 0;
	z-index: 100;
	opacity: 0;
	pointer-events: none;
	transition: all .3s ease;
}
main .content-data .head .menu-link.show {
	top: 100%;
	opacity: 1;
	pointer-events: visible;
}
main .content-data .head .menu-link a {
	display: block;
	padding: 6px 16px;
	font-size: 14px;
	color: var(--dark);
	transition: all .3s ease;
}
main .content-data .head .menu-link a:hover {
	background: var(--grey);
}
main .content-data .chart {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
}
main .content-data .chart::-webkit-scrollbar {
	display: none;
}

main .chat-box {
	width: 100%;
	max-height: 360px;
	overflow-y: auto;
	scrollbar-width: none;
}
main .chat-box::-webkit-scrollbar {
	display: none;
}
main .chat-box .day {
	text-align: center;
	margin-bottom: 10px;
}
main .chat-box .day span {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 20px;
	background: var(--light-blue);
	color: var(--blue);
	font-size: 12px;
	font-weight: 600;
}
main .chat-box .msg img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
}
main .chat-box .msg {
	display: flex;
	grid-gap: 6px;
	align-items: flex-start;
}
main .chat-box .profile .username {
	font-size: 14px;
	font-weight: 600;
	display: inline-block;
	margin-right: 6px;
}
main .chat-box .profile .time {
	font-size: 12px;
	color: var(--dark-grey);
}
main .chat-box .chat p {
	font-size: 14px;
	padding: 6px 10px;
	display: inline-block;
	max-width: 400px;
	line-height: 150%;
}
main .chat-box .msg:not(.me) .chat p {
	border-radius: 0 5px 5px 5px;
	background: var(--blue);
	color: var(--light);
}
main .chat-box .msg.me {
	justify-content: flex-end;
}
main .chat-box .msg.me .profile {
	text-align: right;
}
main .chat-box .msg.me p {
	background: var(--grey);
	border-radius: 5px 0 5px 5px;
}
main form {
	margin-top: 6px;
}
main .form-group {
	width: 100%;
	display: flex;
	grid-gap: 10px;
}
main .form-group input {
	flex-grow: 1;
	padding: 10px 16px;
	border-radius: 5px;
	outline: none;
	background: var(--grey);
	border: none;
	transition: all .3s ease;
	width: 100%;
}
main .form-group input:focus {
	box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--light-blue);
}
main .btn-send {
	padding: 0 16px;
	background: var(--blue);
	border-radius: 5px;
	color: var(--light);
	cursor: pointer;
	border: none;
	transition: all .3s ease;
}
main .btn-send:hover {
	background: var(--dark-blue);
}
/* MAIN */
/* CONTENT */






@media screen and (max-width: 768px) {
	#content {
		position: relative;
		width: calc(100% - 60px);
		transition: all .3s ease;
	}
	html.sb-collapsed #content { transition: none !important; }
	nav .nav-link,
	nav .divider {
		display: none;
	}
}

/* LOGIN PAGE */
.login-page {
	position: fixed;
	inset: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	background: linear-gradient(rgba(255,255,255,0.75), rgba(255,255,255,0.85)), var(--grey);
	z-index: 500;
	padding: 20px;
}
.login-card {
	width: 100%;
	max-width: 360px;
	background: var(--light);
	border-radius: 14px;
	box-shadow: 4px 4px 20px rgba(0,0,0,.08);
	padding: 36px 32px 32px;
	position: relative;
}
.login-card h2 {
	font-size: 24px;
	font-weight: 600;
	text-align: center;
	margin-bottom: 28px;
	color: var(--blue);
}
.login-card form .form-group { margin-bottom: 18px; }
.login-card form .form-group input {
	width: 100%;
	background: var(--grey);
	border: none;
	outline: none;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	transition: all .3s ease;
}
.login-card form .form-group input:focus {
	box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--light-blue);
}
.login-card .btn-login {
	width: 100%;
	border: none;
	background: var(--blue);
	color: var(--light);
	padding: 12px 0;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	font-size: 15px;
	letter-spacing: .5px;
	transition: background .3s ease, transform .15s ease;
}
.login-card .btn-login:hover { background: var(--dark-blue); }
.login-card .btn-login:active { transform: translateY(1px); }
.login-card .login-note { margin-top: 14px; font-size: 12px; color: var(--dark-grey); text-align: center; }
.login-card .login-note .mono { font-family: monospace; background: var(--grey); padding: 2px 6px; border-radius: 4px; }
.login-card .error-msg { margin-top: 10px; font-size: 12px; color: var(--red); text-align: center; display:none; }
body.logged-out #sidebar, body.logged-out nav, body.logged-out main { filter: blur(3px); pointer-events: none; user-select: none; }
body.logged-out .login-page { display:flex !important; }
nav .user-badge {
	background: var(--light-blue);
	color: var(--blue);
	font-size: 12px;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 30px;
	margin-right: 10px;
	min-width: 60px;
	text-align: center;
	letter-spacing: .5px;
}
/* END LOGIN PAGE */