/* CSS Variables for consistent theming */
:root {
 --primary-color: #2563eb;
 --primary-dark: #1d4ed8;
 --secondary-color: #64748b;
 --light-bg: #f8fafc;
 --light-border: #e2e8f0;
 --text-dark: #1e293b;
 --text-light: #64748b;
 --white: #ffffff;
 --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
 --transition: all 0.3s ease;
 --sidebar-width: 280px;
 --sidebar-collapsed: 70px;
}

/* Reset and base styles */
* {
 margin: 0;
 padding: 0;
 box-sizing: border-box;
 font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
 background-color: var(--light-bg);
 color: var(--text-dark);
 min-height: 100vh;
 overflow-x: hidden;
}

.app-container {
 display: flex;
 flex-direction: column;
 min-height: 100vh;
 transition: var(--transition);
}

/* Header Styles */
.header {
 background-color: var(--white);
 box-shadow: var(--shadow);
 padding: 1rem 1.5rem;
 display: flex;
 align-items: center;
 justify-content: space-between;
 position: sticky;
 top: 0;
 z-index: 100;
 height: 70px;
 transition: var(--transition);
}

.header-left {
 display: flex;
 align-items: center;
 gap: 1rem;
 flex: 1;
}

.hamburger-btn {
 background: none;
 border: none;
 font-size: 1.5rem;
 color: var(--primary-color);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 width: 40px;
 height: 40px;
 border-radius: 8px;
 transition: var(--transition);
}

.hamburger-btn:hover {
 background-color: var(--light-bg);
}

.logo {
 display: flex;
 align-items: center;
 gap: 0.75rem;
 font-size: 1.5rem;
 font-weight: 700;
 color: var(--primary-color);
}

.logo-icon {
 color: var(--primary-color);
 font-size: 1.8rem;
}

.page-title {
 font-size: 1.25rem;
 font-weight: 600;
 color: var(--text-dark);
 margin-left: 1rem;
 transition: var(--transition);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.header-right {
 display: flex;
 align-items: center;
 gap: 1.5rem;
 position: relative;
}

.notification-btn {
 position: relative;
 background: none;
 border: none;
 font-size: 1.25rem;
 color: var(--secondary-color);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 width: 40px;
 height: 40px;
 border-radius: 8px;
 transition: var(--transition);
}

.notification-btn:hover {
 background-color: var(--light-bg);
 color: var(--primary-color);
}

.notification-badge {
 position: absolute;
 top: 5px;
 right: 5px;
 background-color: #ef4444;
 color: white;
 font-size: 0.7rem;
 width: 18px;
 height: 18px;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
}

.user-profile {
 display: flex;
 align-items: center;
 gap: 0.75rem;
 cursor: pointer;
 padding: 0.25rem 0.5rem;
 border-radius: 8px;
 transition: var(--transition);
 position: relative;
}

.user-profile:hover {
 background-color: var(--light-bg);
}

.user-avatar {
 width: 40px;
 height: 40px;
 border-radius: 50%;
 background-color: var(--primary-color);
 display: flex;
 align-items: center;
 justify-content: center;
 color: white;
 font-weight: 600;
 font-size: 1rem;
}

.user-picture {
 width: 42px;
 height: 42px;
 border-radius: 50%;
}

.user-info {
 display: flex;
 flex-direction: column;
}

.user-name {
 font-weight: 600;
 font-size: 0.95rem;
 color: var(--text-dark);
}

.user-specialty {
 font-size: 0.8rem;
 color: var(--text-light);
}

/* Sidebar Styles */
.sidebar-overlay {
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background-color: rgba(0, 0, 0, 0.5);
 z-index: 199;
 opacity: 0;
 visibility: hidden;
 transition: var(--transition);
}

.sidebar-overlay.active {
 opacity: 1;
 visibility: visible;
}

.sidebar {
 background-color: var(--white);
 box-shadow: var(--shadow);
 position: fixed;
 top: 0;
 left: 0;
 height: 100%;
 width: var(--sidebar-width);
 z-index: 200;
 transform: translateX(-100%);
 transition: var(--transition);
 display: flex;
 flex-direction: column;
 overflow-y: auto;
}

.sidebar.active {
 transform: translateX(0);
}

.sidebar-header {
 padding: 1.5rem;
 border-bottom: 1px solid var(--light-border);
 display: flex;
 flex-direction: column;
 align-items: center;
 text-align: center;
 gap: 1rem;
}

.sidebar-user-avatar {
 width: 80px;
 height: 80px;
 border-radius: 50%;
 background-color: var(--primary-color);
 display: flex;
 align-items: center;
 justify-content: center;
 color: white;
 font-weight: 600;
 font-size: 1.8rem;
 margin-bottom: 0.5rem;
}

.sidebar-user-picture {
 width: 82px;
 height: 82px;
 border-radius: 50%;
}

.sidebar-user-info h3 {
 font-size: 1.3rem;
 margin-bottom: 0.25rem;
 color: var(--text-dark);
}

.sidebar-user-info p {
 color: var(--primary-color);
 font-weight: 500;
 font-size: 0.9rem;
}

.sidebar-nav {
 padding: 1.5rem 0;
 flex-grow: 1;
}

.nav-list {
 list-style: none;
}

.nav-item {
 margin-bottom: 0.25rem;
}

.nav-link {
 display: flex;
 align-items: center;
 gap: 1rem;
 padding: 1rem 1.5rem;
 text-decoration: none;
 color: var(--text-dark);
 transition: var(--transition);
 border-left: 4px solid transparent;
}

.nav-link:hover {
 background-color: var(--light-bg);
 border-left-color: var(--primary-color);
}

.nav-link.active {
 background-color: rgba(37, 99, 235, 0.1);
 border-left-color: var(--primary-color);
 color: var(--primary-color);
}

.nav-icon {
 font-size: 1.2rem;
 width: 24px;
 text-align: center;
 color: var(--secondary-color);
}

.nav-link.active .nav-icon {
 color: var(--primary-color);
}

.nav-text {
 font-weight: 500;
 font-size: 1rem;
}

.sidebar-footer {
 padding: 1.5rem;
 border-top: 1px solid var(--light-border);
}

.logout-btn {
 display: flex;
 align-items: center;
 gap: 1rem;
 padding: 1rem 1.5rem;
 background-color: transparent;
 border: none;
 width: 100%;
 text-align: left;
 color: #ef4444;
 font-weight: 500;
 font-size: 1rem;
 cursor: pointer;
 border-radius: 8px;
 transition: var(--transition);
 text-decoration: none;
}

.logout-btn:hover {
 background-color: rgba(239, 68, 68, 0.1);
}

/* Main content placeholder */
.main-content {
 flex-grow: 1;
 padding: 2rem 1.5rem;
 transition: var(--transition);
 width: 100%;
}

.content-placeholder {
 background-color: var(--white);
 border-radius: 12px;
 padding: 2rem;
 box-shadow: var(--shadow);
 text-align: center;
 height: 100%;
 min-height: calc(100vh - 140px);
 display: flex;
 flex-direction: column;
 justify-content: center;
 align-items: center;
}

.placeholder-icon {
 font-size: 3rem;
 color: var(--primary-color);
 margin-bottom: 1.5rem;
}

.placeholder-title {
 font-size: 1.8rem;
 margin-bottom: 1rem;
 color: var(--text-dark);
}

.placeholder-text {
 color: var(--text-light);
 max-width: 600px;
 margin: 0 auto 2rem;
 line-height: 1.6;
}

/* NEW: Dropdown Styles */
.dropdown {
 position: absolute;
 top: calc(100% + 5px);
 right: 0;
 background-color: var(--white);
 border-radius: 8px;
 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
 min-width: 200px;
 z-index: 1000;
 opacity: 0;
 visibility: hidden;
 transform: translateY(-10px);
 transition: var(--transition);
 border: 1px solid var(--light-border);
}

.dropdown.active {
 opacity: 1;
 visibility: visible;
 transform: translateY(0);
}

.profile-dropdown {
 min-width: 180px;
}

.notification-dropdown {
 min-width: 320px;
 max-width: 90vw;
}

.dropdown-header {
 padding: 1rem;
 border-bottom: 1px solid var(--light-border);
 font-weight: 600;
 color: var(--text-dark);
 display: flex;
 justify-content: space-between;
 align-items: center;
}

.dropdown-header h3 {
 font-size: 1rem;
 margin: 0;
}

.dropdown-content {
 max-height: 300px;
 overflow-y: auto;
}

.dropdown-item {
 display: flex;
 align-items: center;
 padding: 0.875rem 1rem;
 text-decoration: none;
 color: var(--text-dark);
 transition: var(--transition);
 border-bottom: 1px solid var(--light-border);
 cursor: pointer;
}

.dropdown-item:last-child {
 border-bottom: none;
}

.dropdown-item:hover {
 background-color: var(--light-bg);
}

.dropdown-item i {
 margin-right: 0.75rem;
 color: var(--secondary-color);
 width: 20px;
 text-align: center;
}

.notification-item {
 padding: 0.875rem 1rem;
 border-bottom: 1px solid var(--light-border);
 transition: var(--transition);
}

.notification-item:last-child {
 border-bottom: none;
}

.notification-item:hover {
 background-color: var(--light-bg);
}

.notification-title {
 font-weight: 600;
 color: var(--text-dark);
 margin-bottom: 0.25rem;
 font-size: 0.9rem;
}

.notification-time {
 font-size: 0.75rem;
 color: var(--text-light);
}

.notification-unread {
 background-color: rgba(37, 99, 235, 0.05);
 border-left: 3px solid var(--primary-color);
}

.dropdown-divider {
 display: none;
 height: 1px;
 background-color: var(--light-border);
 margin: 0.25rem 0;
}

/* Auth Pages */
.auth-container {
 min-height: 100vh;
 display: flex;
 align-items: center;
 justify-content: center;
 background-color: var(--light-bg);
 padding: 1rem;
}

.auth-card {
 background-color: var(--white);
 border-radius: 12px;
 box-shadow: var(--shadow);
 width: 100%;
 max-width: 420px;
 padding: 2.5rem;
}

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

.auth-logo {
 font-size: 2.5rem;
 color: var(--primary-color);
 margin-bottom: 0.5rem;
}

.auth-header h1 {
 font-size: 1.6rem;
 margin-bottom: 0.25rem;
}

.auth-header p {
 color: var(--text-light);
 font-size: 0.9rem;
}

.auth-form {
 display: flex;
 flex-direction: column;
 gap: 1rem;
}

.auth-form input {
 padding: 0.75rem 0.85rem;
 border-radius: 8px;
 border: 1px solid var(--light-border);
 font-size: 0.95rem;
 width: 100%;
}

.auth-form input:focus {
 outline: none;
 border-color: var(--primary-color);
}

.auth-form button {
 background-color: var(--primary-color);
 color: white;
 border: none;
 padding: 0.75rem;
 border-radius: 8px;
 font-weight: 600;
 cursor: pointer;
 transition: var(--transition);
 width: 100%;
}

.auth-form button:hover {
 background-color: var(--primary-dark);
}

.auth-error {
 color: #ef4444;
 font-size: 0.85rem;
 text-align: center;
 margin-top: 0.5rem;
}

.auth-footer {
 margin-top: 1.5rem;
 text-align: center;
 font-size: 0.85rem;
}

.auth-footer a {
 color: var(--primary-color);
 text-decoration: none;
 font-weight: 500;
}


/* Responsive Design */
/* Tablet styles */
@media (min-width: 768px) {
 .header {
  padding: 1rem 2rem;
 }

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

 .sidebar {
  width: 320px;
 }

 .main-content {
  padding: 2rem;
 }

 .notification-dropdown {
  min-width: 350px;
 }
}

/* Desktop styles - FIXED */
@media (min-width: 1024px) {
 .app-container {
  flex-direction: row;
  min-height: 100vh;
 }

 .hamburger-btn {
  display: none;
 }

 .sidebar-overlay {
  display: none;
 }

 .sidebar {
  position: relative;
  transform: translateX(0);
  height: 100vh;
  z-index: 1;
  width: 280px;
  flex-shrink: 0;
 }

 .main-content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
  width: calc(100% - 280px);
 }

 .header {
  position: sticky;
  top: 0;
  left: 280px;
  width: calc(100% - 1px);
  z-index: 90;
 }

 .main-content {
  padding: 2rem 2.5rem;
  flex: 1;
 }

 .page-title {
  margin-left: 2rem;
 }

 .logo-text {
  display: inline;
 }

 .user-info {
  display: flex;
 }

 .notification-dropdown {
  min-width: 380px;
 }
}

/* Wide desktop - FIXED */
@media (min-width: 1280px) {
 .sidebar {
  width: 300px;
 }

 .main-content-container {
  width: calc(100% - 300px);
 }

 .header {
  left: 300px;
  width: calc(100% - 1px);
  padding: 1rem 3rem;
 }

 .main-content {
  padding: 2rem 3.5rem;
 }

 .notification-dropdown {
  min-width: 400px;
 }
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
 .user-info {
  display: none;
 }

 .page-title {
  font-size: 1.1rem;
  margin-left: 0.5rem;
  max-width: 150px;
 }

 .logo-text {
  display: none;
 }

 .notification-dropdown {
  right: -10px;
  min-width: 280px;
 }

 .profile-dropdown {
  right: -5px;
 }
}

/* Animation for sidebar */
@keyframes slideIn {
 from {
  transform: translateX(-100%);
 }

 to {
  transform: translateX(0);
 }
}