@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Dental Color Palette */
  --primary-color: #038a8a; /* Medical Teal */
  --primary-light: #e0f2f1;
  --secondary-color: #26c6da; /* Cyan accent */
  --accent-color: #00acc1;
  --danger-color: #ff5252;
  
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #ffffff;
  
  --bg-color: #f1f5f9;
  --card-bg: rgba(255, 255, 255, 0.95);
  --border-color: #e2e8f0;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(3, 138, 138, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(3, 138, 138, 0.15);
  
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background: linear-gradient(135deg, #f1f5f9 0%, #e0f2f1 100%);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background-color: var(--text-light);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
}

.logo i {
  color: var(--secondary-color);
  font-size: 2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -5px;
  left: 0;
  background-color: var(--secondary-color);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-links a:hover:not(.btn)::after, .nav-links a.active:not(.btn)::after {
  width: 100%;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-color);
}

/* Buttons */
.btn {
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light) !important;
  box-shadow: 0 4px 15px rgba(3, 138, 138, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(3, 138, 138, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ff5252, #e53935);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 82, 82, 0.3);
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 3rem auto;
  padding: 0 20px;
  flex: 1;
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.hero-content h1 span {
  color: var(--primary-color);
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Cards & Forms */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Glassmorphic internal sections */
.glass-panel {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  background-color: #fafafa;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  background-color: var(--text-light);
  box-shadow: 0 0 0 4px rgba(38, 198, 218, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat, repeat;
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Dashboard Elements */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--text-light);
  padding: 2rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
  border-left: 6px solid var(--primary-color);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

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

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
}

.stat-card i {
  font-size: 3rem;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 1rem;
  border-radius: 12px;
  z-index: 1;
}

.stat-info {
    z-index: 1;
}

.stat-info h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.stat-info p {
    color: var(--text-muted);
    font-weight: 500;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--border-color);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--text-light);
}

th, td {
  padding: 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
  background-color: var(--primary-light);
}

.badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-pending {
  background-color: #fef3c7;
  color: #b45309;
}

.badge-completed {
  background-color: #d1fae5;
  color: #047857;
}

/* Gallery Layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
  background: var(--border-color);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 138, 138, 0.9) 0%, transparent 100%);
  padding: 1.5rem;
  opacity: 0;
  transition: all 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.preview-container {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.preview-container img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--primary-color);
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: none;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
  border-left: 4px solid transparent;
}
.alert-success { 
    background-color: #d1fae5; 
    color: #047857; 
    border-left-color: #10b981;
}
.alert-danger { 
    background-color: #fee2e2; 
    color: #b91c1c; 
    border-left-color: #ef4444;    
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .navbar { flex-direction: column; gap: 1rem; }
  .nav-links { flex-wrap: wrap; justify-content: center; }
  .hero-content h1 { font-size: 2.5rem; }
}

/* Loader */
.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid var(--text-light);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
