@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

:root {
	--primary-color: #0077ff;
	--secondary-color: #2d2d2d;
	--bg-color: #f9fafb;
	--sidebar-bg: #ffffff;
	--text-color: #333333;
	--card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
	--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "DM Sans", "Inter", sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	display: flex;
	min-height: 100vh;
	overflow-x: hidden;
}

button,
a {
	cursor: pointer;
}

.hidden {
	display: none !important;
}

.login-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--primary-color), #ff8e6e);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.login-card {
	background: white;
	padding: 3rem;
	border-radius: 30px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
	width: 90%;
	max-width: 400px;
	text-align: center;
}

#app-container {
	display: flex;
	width: 100%;
}

.sidebar {
	width: 240px;
	background: var(--sidebar-bg);
	border-right: 1px solid #f0f0f0;
	display: flex;
	flex-direction: column;
	padding: 2rem 1.2rem;
	position: fixed;
	height: 100vh;
	z-index: 100;
	overflow-y: auto;
}

.sidebar .logo {
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--primary-color);
	margin-bottom: 2.5rem;
	display: flex;
	align-items: center;
	gap: 10px;
}

.nav-links {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
}

.nav-link {
	display: flex;
	align-items: center;
	padding: 0.9rem 1.2rem;
	text-decoration: none;
	color: #888;
	border-radius: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--transition);
}

.nav-link i {
	margin-right: 12px;
	font-style: normal;
}

.feather {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
	vertical-align: middle;
}

.nav-link .feather {
	margin-right: 12px;
}

.nav-link:hover {
	color: var(--primary-color);
	background: #fff5f2;
}

.nav-link.active {
	background: var(--primary-color);
	color: white;
	box-shadow: 0 8px 15px rgba(255, 95, 46, 0.3);
}

.main-wrapper {
	margin-left: 240px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.top-header {
	background: white;
	padding: 1rem 3rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 90;
	border-bottom: 1px solid #f0f0f0;
}

.search-bar {
	background: #f3f4f6;
	padding: 0.7rem 1.5rem;
	border-radius: 50px;
	display: flex;
	align-items: center;
	width: 450px;
}

.search-bar input {
	background: transparent;
	border: none;
	outline: none;
	margin-left: 10px;
	width: 100%;
}

.header-icons {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.user-badge {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}

.user-badge img {
	width: 35px;
	height: 35px;
	border-radius: 50%;
	object-fit: cover;
}

.content-area {
	padding: 2rem 3rem;
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2rem;
}

.hero-banner {
	background:
		linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
		url("https://images.unsplash.com/photo-1481627834876-b7833e8f5570?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80");
	background-size: cover;
	background-position: center;
	height: 220px;
	border-radius: 24px;
	padding: 2.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	color: white;
	margin-bottom: 2rem;
}

.hero-banner h1 {
	font-size: 2rem;
	margin-bottom: 1rem;
}

.hero-btns {
	display: flex;
	gap: 15px;
}

.hero-btns button {
	padding: 0.8rem 1.5rem;
	border-radius: 12px;
	font-weight: 600;
	cursor: pointer;
	border: none;
}

.btn-primary {
	user-select: none;
	border: none;
	outline: none;
	background: var(--primary-color);
	color: white;
}
.btn-secondary {
	background: rgba(255, 255, 255, 0.1);
	color: white;
	backdrop-filter: blur(5px);
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.section-header h2 {
	font-size: 1.3rem;
}

.book-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.5rem;
}

.book-card {
	background: white;
	border-radius: 20px;
	padding: 1rem;
	box-shadow: var(--card-shadow);
	transition: var(--transition);
}

.book-card:hover {
	transform: translateY(-5px);
}

.book-card .cover {
	width: 100%;
	height: 220px;
	border-radius: 16px;
	object-fit: cover;
	margin-bottom: 1rem;
}

.book-card h3 {
	font-size: 1rem;
	margin-bottom: 0.3rem;
}
.book-card .author {
	font-size: 0.85rem;
	color: #888;
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 0.8rem;
}
.book-card .author img {
	width: 18px;
	height: 18px;
	border-radius: 50%;
}

.book-card .footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.book-card .price {
	font-weight: 700;
	color: var(--primary-color);
}

.buy-btn {
	padding: 0.5rem 1rem;
	background: #fff5f2;
	color: var(--primary-color);
	border: none;
	border-radius: 10px;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
}

.buy-btn:hover {
	background: var(--primary-color);
	color: white;
}

.widget {
	background: white;
	border-radius: 24px;
	padding: 1.5rem;
	margin-bottom: 2rem;
	box-shadow: var(--card-shadow);
}

.widget-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.2rem;
}

.widget-header h3 {
	font-size: 1rem;
}
.see-more {
	font-size: 0.8rem;
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
}

.author-list,
.free-books {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.author-item,
.free-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.author-item img,
.free-item img {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	object-fit: cover;
}
.item-info h4 {
	font-size: 0.9rem;
}
.item-info p {
	font-size: 0.75rem;
	color: #888;
}

.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	backdrop-filter: blur(5px);
}

.modal-content {
	background: white;
	padding: 2.5rem;
	border-radius: 30px;
	width: 90%;
	max-width: 450px;
	position: relative;
}

.close-btn:hover {
	color: #666;
}

.close-btn-v2 {
	width: 32px;
	height: 32px;
	background: #f1f5f9;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 1.2rem;
	cursor: pointer;
	color: #64748b;
	transition: var(--transition);
}

.close-btn-v2:hover {
	background: #e2e8f0;
	color: #1e293b;
}

.modal-header-v2 {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 2rem;
}

.modal-body-horizontal {
	display: flex;
	gap: 2.5rem;
	align-items: flex-start;
}

.modal-left {
	flex: 0 0 280px;
}

.modal-right {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

.modal-right .detail-field:first-child {
	grid-column: span 2;
}

tbody tr {
	transition: var(--transition);
}

tbody tr:hover {
	background-color: #f0f7ff !important;
	cursor: pointer;
}

.detail-header {
	text-align: center;
	margin-bottom: 2rem;
}

.detail-header h2 {
	font-size: 1.5rem;
	font-weight: 800;
	color: #333;
}

.detail-header p {
	color: #888;
	font-size: 0.9rem;
	margin-top: 4px;
}

.detail-img-container {
	width: 100%;
	margin-bottom: 2rem;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-img-container img {
	width: 100%;
	height: auto;
	display: block;
}

.detail-field {
	margin-bottom: 1.2rem;
	text-align: left;
}

.detail-field label {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	color: #64748b;
	margin-bottom: 6px;
}

.detail-field-box {
	background: #f8fafc;
	padding: 0.9rem 1.2rem;
	border-radius: 12px;
	color: #333;
	font-weight: 600;
	font-size: 0.95rem;
}

.modal-form {
	margin-top: 1.5rem;
}

.form-group {
	margin-bottom: 1.5rem;
	text-align: left;
}

.form-group label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #64748b;
	margin-bottom: 8px;
}

.form-group input {
	width: 100%;
	padding: 0.8rem 1rem;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
	font-family: "Inter", sans-serif;
	font-size: 0.9rem;
	transition: var(--transition);
}

.form-group input:focus {
	outline: none;
	border-color: var(--primary-color);
	background: white;
	box-shadow: 0 0 0 4px rgba(0, 119, 255, 0.1);
}

.modal-footer {
	display: flex;
	gap: 12px;
	margin-top: 2rem;
}

.modal-footer button {
	flex: 1;
	padding: 0.8rem;
	border-radius: 12px;
	font-weight: 700;
	cursor: pointer;
	border: none;
	transition: var(--transition);
}

.btn-cancel {
	background: #f1f5f9;
	color: #64748b;
}

.btn-cancel:hover {
	background: #e2e8f0;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.stat-card {
	padding: 1.8rem;
	border-radius: 24px;
	color: #424242;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
	transition: var(--transition);
	position: relative;
	overflow: hidden;
}

.stat-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.stat-info h4 {
	font-size: 0.95rem;
	font-weight: 600;
	opacity: 0.9;
	margin-bottom: 0.5rem;
}

.stat-info .stat-value {
	font-size: 2.2rem;
	font-weight: 800;
}

.stat-icon-bg {
	background: rgba(255, 255, 255, 0.2);
	width: 45px;
	height: 45px;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.bg-orange {
	background: linear-gradient(135deg, #ff9d2e, #ff5f2e);
}
.bg-pink {
	background: linear-gradient(135deg, #ff4b82, #e61e50);
}
.bg-purple {
	background: linear-gradient(135deg, #9d3eff, #6a11cb);
}
.bg-card {
	background: #ccdeff;
}

.tracking-card {
	padding: 10px 0;
}

.road-container {
	height: 40px;
	background: #f8fafc;
	border-radius: 12px;
	position: relative;
	margin-bottom: 20px;
	overflow: hidden;
	border: 1px dashed #e2e8f0;
}

.anim-car {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: var(--primary-color);
	animation: drive 8s linear infinite;
}

@keyframes drive {
	0% {
		left: -40px;
	}
	100% {
		left: 100%;
	}
}

.timeline-mini {
	border-left: 2px solid #e2e8f0;
	padding-left: 15px;
	margin-left: 5px;
}

.timeline-item-mini {
	margin-bottom: 15px;
	position: relative;
}

.timeline-item-mini::before {
	content: "";
	position: absolute;
	left: -21px;
	top: 5px;
	width: 10px;
	height: 10px;
	background: white;
	border: 2px solid var(--primary-color);
	border-radius: 50%;
}

.timeline-item-mini h5 {
	font-size: 0.8rem;
	color: var(--primary-color);
	margin-bottom: 2px;
}

.timeline-item-mini p {
	font-size: 0.75rem;
	color: #64748b;
	line-height: 1.4;
}

@media (max-width: 768px) {
	.stats-grid {
		grid-template-columns: 1fr;
	}
}

.tracking-info-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	margin-bottom: 2rem;
	padding: 1.5rem;
	background: #f8fafc;
	border-radius: 16px;
}

.info-item p:first-child {
	font-size: 0.75rem;
	color: #888;
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.info-item p:last-child {
	font-weight: 700;
	color: #333;
}

.timeline-v2 {
	margin-top: 2rem;
	position: relative;
}

.timeline-v2::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 10px;
	bottom: 10px;
	width: 2px;
	background: #e2e8f0;
}

.timeline-v2-item {
	position: relative;
	padding-left: 35px;
	margin-bottom: 2.5rem;
}

.timeline-v2-dot {
	position: absolute;
	left: 0;
	top: 5px;
	width: 16px;
	height: 16px;
	background: white;
	border: 3px solid #cbd5e1;
	border-radius: 50%;
	z-index: 1;
	transition: all 0.3s ease;
}

.timeline-v2-item.active .timeline-v2-dot {
	border-color: #10b981;
	background: #10b981;
	box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-v2-time {
	font-size: 0.8rem;
	color: #64748b;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.timeline-v2-content {
	font-size: 1rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 8px;
}

.status-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 8px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: capitalize;
}

.badge-success {
	background: #dcfce7;
	color: #15803d;
}
.badge-warning {
	background: #fef9c3;
	color: #a16207;
}
.badge-info {
	background: #e0f2fe;
	color: #0369a1;
}
.badge-gray {
	background: #f1f5f9;
	color: #475569;
}
