:root {
	--primary-color: #3b82f6;
	--primary-hover: #2563eb;
	--success: #10b981;
	--error: #ef4444;
	--warning: #f59e0b;

	--transition-speed: 0.3s;
	--container-width: 1200px;
	--header-height: 70px;
	--border-radius: 8px;

	--bg-main: #ffffff;
	--bg-surface: #f3f4f6;
	--bg-hover: #e5e7eb;
  
	--text-main: #111827;
	--text-muted: #4b5563;
	--text-inverse: #ffffff;
  
	--border-color: #e5e7eb;
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	--menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
	--bg-main: #121212;
	--bg-surface: #1e1e1e;
	--bg-hover: #2d2d2d;
  
	--text-main: #e2e8f0;
	--text-muted: #a2a8c0;
  
	--border-color: #333333;
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
	--menu-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
}

body {
	background-color: var(--bg-main);
	color: var(--text-main);
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;

	display: flex;
	flex-direction: column;
	min-height: 100vh;

	transition: background-color 0.4s ease, color 0.4s ease;
	overflow-x: hidden;
}

a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s;
}

ul {
	list-style: none;
}

label {
	color: var(--text-main)
}

h1, h2, h3, h4, h5 {
	color: var(--text-main);
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 1rem;
	animation: fadeIn 0.8s ease-out;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }

p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 70ch;
  animation: fadeIn 1s ease-out;
}

.main-header {
	background-color: var(--bg-surface);
	height: var(--header-height);
	padding: 0 2rem;
	border-bottom: 1px solid var(--border-color);
  
	display: flex;
	justify-content: space-between;
	align-items: center;
  
	position: relative;
	z-index: 1001;
	transition: background-color 0.4s ease;
}

.header-left, .header-right {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	height: 100%;
}

.logo-area img {
	height: 40px;
	width: auto;
	display: block;
}

.theme-toggle-btn {
	background: none;
	border: none;
	font-size: 1.2rem;
	color: var(--text-muted);
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.theme-toggle-btn:hover {
	color: var(--primary-color);
	background-color: var(--bg-hover);
	transform: rotate(15deg);
}

.user-area {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 6px 12px;
	border-radius: 30px;
	transition: background-color 0.2s;
}

.user-area:hover {
	background-color: var(--bg-hover);
}

.user-icon-circle {
	width: 32px;
	height: 32px;
	background-color: var(--bg-main);
	border: 1px solid var(--border-color);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary-color);
	font-weight: bold;
}

.user-name {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-main);
	text-transform: capitalize;
}

.subheader {
	background-color: var(--bg-main);
	height: 50px;
	border-bottom: 1px solid var(--border-color);
	padding: 0 2rem;
	display: flex;
	align-items: center;
	position: relative;
	box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-desktop {
	display: flex;
	gap: 2rem;
	height: 100%;
}

.nav-link-item {
	color: var(--text-muted);
	font-weight: 500;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	height: 100%;
	border-bottom: 2px solid transparent;
	transition: all 0.2s;
}

.nav-link-item:hover, .nav-link-item.active {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
}

.nav-mobile-btn {
	display: none;
	background: none;
	border: none;
	color: var(--text-main);
	font-size: 1.5rem;
	cursor: pointer;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0;
	text-align: left;
}

.nav-mobile-text { font-size: 1rem; font-weight: 600; }

.mobile-dropdown {
	display: none;
	position: absolute;
	top: 50px;
	left: 0;
	width: 100%;
	background-color: var(--bg-surface);
	border-bottom: 1px solid var(--border-color);
	flex-direction: column;
	z-index: 999;
	box-shadow: var(--menu-shadow);
}

.mobile-dropdown.show {
	display: flex;
	animation: slideDown 0.2s ease-out;
}

.mobile-link-item {
	padding: 1rem 2rem;
	color: var(--text-main);
	border-bottom: 1px solid var(--border-color);
	font-weight: 500;
}

.mobile-link-item:hover {
	background-color: var(--bg-hover);
	color: var(--primary-color);
}

main {
	flex: 1;
	width: 100%;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 2rem 1rem;
	animation: slideUp 0.6s ease-out;
}

section {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	padding: 2rem;
	margin-bottom: 2rem;
	box-shadow: var(--shadow);
	transition: transform 0.3s ease;
}

footer {
	padding: 2rem;
	background-color: var(--bg-surface);
	border-top: 1px solid var(--border-color);
	text-align: center;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.container {
	width: 100%;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 1rem;
}

.card {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.form-control, .form-input, .form-select {
	width: 100%;
	padding: 0.75rem;
	background-color: var(--bg-main);
	border: 1px solid var(--border-color);
	color: var(--text-main);
	border-radius: var(--border-radius);
	font-size: 1rem;
	transition: border-color 0.2s;
}

.form-control:focus {
	outline: none;
	border-color: var(--primary-color);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 1.2rem;
	border-radius: var(--border-radius);
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.2s;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-success { background-color: var(--success); color: white; }
.btn-danger { background-color: var(--error); color: white; }

.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }

.text-muted { color: --text-muted !important }

.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.rounded { border-radius: var(--border-radius); }

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes slideUp {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
	.nav-desktop { display: none; }
	.nav-mobile-btn { display: flex; }
	.main-header, .subheader { padding: 0 1rem; }
	.user-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
}
