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

body {
	font-family: 'Poppins', sans-serif;
	line-height: 1.6;
	color: #333;
	background: linear-gradient(135deg, #ffeef8 0%, #f0f8ff 100%);
	min-height: 100vh;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header */
.header {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	padding: 1rem 0;
}

.header .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.nav-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.5rem;
	font-weight: 600;
	color: #ff6b9d;
}

.nav-icon {
	font-size: 2rem;
	color: #ff6b9d;
}

.nav {
	display: flex;
	gap: 2rem;
}

.nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #666;
	font-weight: 500;
	padding: 0.5rem 1rem;
	border-radius: 25px;
	transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
	background: linear-gradient(135deg, #ff6b9d, #ffa8cc);
	color: white;
	transform: translateY(-2px);
}

.mobile-menu-toggle {
	display: none;
	font-size: 1.5rem;
	color: #ff6b9d;
	cursor: pointer;
}

/* Main Content */
.main-content {
	margin-top: 100px;
	padding: 2rem 0;
}

/* Page Header */
.page-header {
	text-align: center;
	margin-bottom: 3rem;
}

.page-title {
	font-size: 2.5rem;
	color: #ff6b9d;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
}

.page-subtitle {
	font-size: 1.2rem;
	color: #666;
	max-width: 600px;
	margin: 0 auto;
}

/* Patient Info */
.patient-info {
	margin-bottom: 3rem;
}

.patient-card {
	background: rgba(255, 255, 255, 0.9);
	border-radius: 20px;
	padding: 2rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	border: 2px solid rgba(255, 107, 157, 0.1);
}

.patient-card h3 {
	color: #ff6b9d;
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.3rem;
}

.patient-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	font-weight: 500;
	color: #555;
	margin-bottom: 0.5rem;
}

.form-group input {
	padding: 0.8rem;
	border: 2px solid #e0e0e0;
	border-radius: 10px;
	font-size: 1rem;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
	outline: none;
	border-color: #ff6b9d;
	box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

/* Odontogram Container */
.odontogram-container {
	background: rgba(255, 255, 255, 0.9);
	border-radius: 20px;
	padding: 2rem;
	margin-bottom: 3rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	border: 2px solid rgba(255, 107, 157, 0.1);
}

.odontogram-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.odontogram-header h2 {
	color: #ff6b9d;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.8rem;
}

.odontogram-controls {
	display: flex;
	gap: 1rem;
}

.btn-control {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0.8rem 1.5rem;
	border: none;
	border-radius: 25px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.9rem;
}

#clear-all {
	background: linear-gradient(135deg, #ffa8cc, #ff6b9d);
	color: white;
}

#save-odontogram {
	background: linear-gradient(135deg, #a8e6cf, #7fcdcd);
	color: white;
}

.btn-control:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Teeth Sections */
.teeth-section {
	margin-bottom: 3rem;
}

.section-title {
	color: #ff6b9d;
	font-size: 1.5rem;
	margin-bottom: 1.5rem;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.teeth-grid {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	align-items: center;
}

.jaw {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.jaw-label {
	font-weight: 600;
	color: #666;
	font-size: 1.1rem;
	padding: 0.5rem 1rem;
	background: rgba(255, 107, 157, 0.1);
	border-radius: 15px;
}

.teeth-row {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: center;
}

/* Tooth Styles */
.tooth {
	position: relative;
	width: 60px;
	height: 80px;
	background: #ffffff;
	border: 2px solid #e0e0e0;
	border-radius: 15px 15px 8px 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tooth.primary {
	width: 50px;
	height: 65px;
	border-radius: 12px 12px 6px 6px;
}

.tooth:hover {
	transform: translateY(-3px);
	box-shadow: 0 5px 20px rgba(255, 107, 157, 0.3);
	border-color: #ff6b9d;
}

.tooth.selected {
	border-color: #ff6b9d;
	background: rgba(255, 107, 157, 0.1);
	transform: translateY(-3px);
}

.tooth-number {
	font-size: 0.8rem;
	font-weight: 600;
	color: #666;
	margin-top: 2px;
	z-index: 2;
}

.tooth-surfaces {
	position: absolute;
	top: 15px;
	left: 50%;
	transform: translateX(-50%);
	width: 40px;
	height: 50px;
	display: grid;
	grid-template-areas: 
		"mesial occlusal distal"
		"buccal center lingual";
	grid-template-columns: 1fr 2fr 1fr;
	grid-template-rows: 1fr 2fr;
	gap: 1px;
}

.tooth.primary .tooth-surfaces {
	width: 32px;
	height: 40px;
}

.surface {
	border-radius: 2px;
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
}

.surface.mesial { grid-area: mesial; }
.surface.occlusal, .surface.incisal { grid-area: occlusal; }
.surface.distal { grid-area: distal; }
.surface.buccal { grid-area: buccal; }
.surface.lingual { grid-area: lingual; }

.surface:hover {
	background: rgba(255, 107, 157, 0.3);
}

/* Treatment Colors */
.surface.healthy { background: #a8e6cf; }
.surface.caries { background: #ff6b6b; }
.surface.restoration { background: #4ecdc4; }
.surface.crown { background: #ffd93d; }
.surface.extraction { background: #ff4757; }
.surface.missing { background: #747d8c; }
.surface.endodontics { background: #ff6348; }
.surface.sealant { background: #7bed9f; }

/* Legend */
.legend-container {
	background: rgba(255, 255, 255, 0.9);
	border-radius: 20px;
	padding: 2rem;
	margin-bottom: 3rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	border: 2px solid rgba(255, 107, 157, 0.1);
}

.legend-container h3 {
	color: #ff6b9d;
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.3rem;
}

.legend-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0.8rem;
	background: rgba(255, 255, 255, 0.8);
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	border: 2px solid transparent;
}

.legend-item:hover {
	background: rgba(255, 107, 157, 0.1);
	border-color: #ff6b9d;
}

.legend-item.active {
	background: rgba(255, 107, 157, 0.2);
	border-color: #ff6b9d;
}

.legend-color {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	border: 1px solid #ddd;
}

.legend-color.healthy { background: #a8e6cf; }
.legend-color.caries { background: #ff6b6b; }
.legend-color.restoration { background: #4ecdc4; }
.legend-color.crown { background: #ffd93d; }
.legend-color.extraction { background: #ff4757; }
.legend-color.missing { background: #747d8c; }
.legend-color.endodontics { background: #ff6348; }
.legend-color.sealant { background: #7bed9f; }

/* Notes Section */
.notes-section {
	background: rgba(255, 255, 255, 0.9);
	border-radius: 20px;
	padding: 2rem;
	margin-bottom: 3rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	border: 2px solid rgba(255, 107, 157, 0.1);
}

.notes-section h3 {
	color: #ff6b9d;
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.3rem;
}

#treatment-notes {
	width: 100%;
	min-height: 120px;
	padding: 1rem;
	border: 2px solid #e0e0e0;
	border-radius: 10px;
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	resize: vertical;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.8);
}

#treatment-notes:focus {
	outline: none;
	border-color: #ff6b9d;
	box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

/* Footer */
.footer {
	background: rgba(255, 255, 255, 0.9);
	text-align: center;
	padding: 2rem 0;
	color: #666;
	border-top: 1px solid rgba(255, 107, 157, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
	.nav {
		display: none;
	}
	
	.mobile-menu-toggle {
		display: block;
	}
	
	.page-title {
		font-size: 2rem;
		flex-direction: column;
		gap: 10px;
	}
	
	.page-subtitle {
		font-size: 1rem;
	}
	
	.patient-form {
		grid-template-columns: 1fr;
	}
	
	.odontogram-header {
		flex-direction: column;
		text-align: center;
	}
	
	.odontogram-controls {
		justify-content: center;
		flex-wrap: wrap;
	}
	
	.teeth-row {
		gap: 0.3rem;
	}
	
	.tooth {
		width: 45px;
		height: 60px;
	}
	
	.tooth.primary {
		width: 38px;
		height: 50px;
	}
	
	.tooth-surfaces {
		width: 30px;
		height: 38px;
	}
	
	.tooth.primary .tooth-surfaces {
		width: 25px;
		height: 30px;
	}
	
	.tooth-number {
		font-size: 0.7rem;
	}
	
	.legend-grid {
		grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
		gap: 0.8rem;
	}
	
	.legend-item {
		padding: 0.6rem;
		font-size: 0.9rem;
	}
	
	.container {
		padding: 0 15px;
	}
}

@media (max-width: 480px) {
	.main-content {
		margin-top: 80px;
		padding: 1rem 0;
	}
	
	.patient-card,
	.odontogram-container,
	.legend-container,
	.notes-section {
		padding: 1.5rem;
		margin-bottom: 2rem;
	}
	
	.teeth-row {
		gap: 0.2rem;
	}
	
	.tooth {
		width: 35px;
		height: 50px;
	}
	
	.tooth.primary {
		width: 30px;
		height: 40px;
	}
	
	.tooth-surfaces {
		width: 24px;
		height: 30px;
	}
	
	.tooth.primary .tooth-surfaces {
		width: 20px;
		height: 24px;
	}
	
	.tooth-number {
		font-size: 0.6rem;
	}
	
	.btn-control {
		padding: 0.6rem 1rem;
		font-size: 0.8rem;
	}
}

/* Animation for tooth selection */
@keyframes toothSelect {
	0% { transform: translateY(0) scale(1); }
	50% { transform: translateY(-5px) scale(1.05); }
	100% { transform: translateY(-3px) scale(1.02); }
}

.tooth.selecting {
	animation: toothSelect 0.3s ease-out;
}

/* Hover effects for better UX */
.surface::after {
	content: attr(data-surface);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 0.6rem;
	font-weight: bold;
	color: rgba(0, 0, 0, 0.6);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.tooth:hover .surface::after {
	opacity: 1;
}

/* Print styles */
@media print {
	.header,
	.odontogram-controls,
	.btn-control {
		display: none;
	}
	
	.main-content {
		margin-top: 0;
	}
	
	.patient-card,
	.odontogram-container,
	.legend-container,
	.notes-section {
		box-shadow: none;
		border: 1px solid #ddd;
		break-inside: avoid;
	}
}