*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: 'Roboto', sans-serif;
	background-color: #F0EDE9;
	color: #1f2937;
	margin: 0;
	padding: 0;
}

.container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 1rem;
}

header {
	background: transparent;
	color: #1f2937;
	margin-bottom: 2rem;
	/* Removed shadow for cleaner look on same background */
}

.header-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 5px 20px;
}

.header-content {
	display: flex;
	align-items: center;
	justify-content: start;
	gap: 1.5rem;
}

.header-icon {
	width: 90px;
	height: 90px;
	object-fit: cover;
	border-radius: 1rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(0, 0, 0, 0.05);
}

.header-text h1 {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
	line-height: 1.2;
}

.brand-name {
	font-size: 0.875rem;
	/* text-transform: uppercase; */
	letter-spacing: 0.05em;
	color: #6b7280;
	font-weight: 600;
}

.page-title {
	font-size: 1.7rem;
	font-weight: 800;
	color: #111827;
	letter-spacing: -0.025em;
}

.header-text p {
	color: #4b5563;
	margin-top: 0.75rem;
	margin-bottom: 0;
	font-size: 1.125rem;
	font-weight: 400;
}

.header-link {
	color: #4f46e5;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s;
}

.header-link:hover {
	color: #4338ca;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;
}

@media (max-width: 640px) {
	.header-content {
		flex-direction: column;
		text-align: center;
		gap: 1rem;
	}

	.header-text h1 {
		align-items: center;
	}

	.page-title {
		font-size: 1.5rem;
	}
}

main {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

@media (min-width: 1024px) {
	main {
		grid-template-columns: 1fr 2fr;
	}
}

.form-section {
	background-color: #ffffff;
	padding: 1rem 1.5rem;
	border-radius: 1rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	min-width: 200px;
}

h2 {
	font-size: 1.2rem;
	font-weight: 600;
	margin-top: 0.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 0.75rem;
}

.input-groups {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.input-group {
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	padding: 0;
	/* Padding moved to content */
	margin: 0;
	background-color: #f9fafb;
	overflow: hidden;
	/* Ensure content doesn't spill out */
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group:hover {
	border-color: #d1d5db;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.input-group summary {
	padding: 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #4b5563;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background-color: #f3f4f6;
	/* Slightly darker header */
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	list-style: none;
	transition: background-color 0.1s ease;
}

.input-group summary:hover {
	background-color: #e5e7eb;
}

.input-group[open] summary {
	border-bottom-width: 1px;
}

.input-group:not([open]) summary {
	border-bottom-width: 0;
}

.input-group .space-y-4 {
	padding: 1rem;
}

/* Remove default marker */
.input-group summary::-webkit-details-marker {
	display: none;
}

.space-y-4>div:not(:last-child) {
	margin-bottom: 1rem;
}

label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: #374151;
}

input[type="number"] {
	margin-top: 0.25rem;
	display: block;
	width: 100%;
	background-color: #f9fafb;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	padding: 0.5rem;
}

input[type="number"]:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.chart-section {
	background-color: #ffffff;
	padding: 1.5rem;
	border-radius: 1rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	display: flex;
	flex-direction: column;
	min-height: 400px;
	align-self: start;
}

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

@media (min-width: 768px) {
	.summary-cards {
		grid-template-columns: repeat(4, 1fr);
	}
}

.card {
	background-color: #f3f4f6;
	padding: 1rem;
	border-radius: 0.5rem;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.card:hover {
	/* transform: translateY(-2px); */
	/* box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); */
	/* background-color: #e5e7eb; */
}

.card h3 {
	font-size: 0.875rem;
	color: #6b7280;
	margin: 0 0 0.5rem 0;
	font-weight: 500;
	min-height: 2rem;
}

.card p {
	font-size: 1.5rem;
	font-weight: 700;
	color: #111827;
	margin: 0;
}

.chart-container {
	position: relative;
	width: 100%;
	height: 500px;
}

.table-container {
	width: 100%;
	flex-shrink: 0;
}

details {
	background-color: #f9fafb;
	border-radius: 0.5rem;
	border: 1px solid #e5e7eb;
	overflow: hidden;
}

summary {
	padding: 1rem;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background-color 0.1s ease;
}

summary:hover {
	background-color: #e5e7eb;
}

summary::-webkit-details-marker {
	display: none;
}

.details-arrow {
	width: 1.25rem;
	height: 1.25rem;
	transition: transform 0.2s;
}

details[open] .details-arrow {
	transform: rotate(180deg);
}

.table-wrapper {
	padding: 0.5rem;
	max-height: 24rem;
	overflow-y: auto;
	overflow-x: auto;
}

@media (min-width: 768px) {
	.table-wrapper {
		padding: 1rem;
	}
}

table {
	min-width: 100%;
	border-collapse: collapse;
}

thead {
	background-color: #f3f4f6;
	position: sticky;
	top: 0;
}

th {
	padding: 0.75rem 1rem;
	text-align: left;
	font-size: 0.75rem;
	font-weight: 500;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

tbody {
	background-color: #ffffff;
	border-bottom: 1px solid #e5e7eb;
}

td {
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
}

td.font-medium {
	font-weight: 500;
	color: #111827;
}

td.text-gray-500 {
	color: #6b7280;
}

.text-green-600 {
	color: #059669 !important;
}

.text-red-600 {
	color: #dc2626 !important;
}

.text-yellow-600 {
	color: #d97706 !important;
}

tr:hover {
	background-color: #f9fafb;
}

footer {
	text-align: center;
	margin-top: 2rem;
	font-size: 0.875rem;
	color: #6b7280;
}

/* Custom scrollbar */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #555;
}

#randomizeBtn {
	width: 100%;
	padding: 0.75rem;
	background-color: #4f46e5;
	color: white;
	border: none;
	border-radius: 0.5rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

#randomizeBtn:hover {
	background-color: #6356e9;
	/* transform: translateY(-1px); */
	/* box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4); */
}

#randomizeBtn:active {
	transform: translateY(0);
}