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

:root {
  --primary-color: #4F46E5; /* Profession indigo */
  --primary-dark: #4338ca;
  --secondary-color: #64748b; /* Slate grey */
  --bg-color: #F3F4F6; /* Cool grey background */
  --card-bg: #ffffff;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --sidebar-width: 250px;
  --header-height: 64px;
  --transition-speed: 0.3s;
  --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --card-radius: 0.75rem;
  --logo-size: 38px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-size: 0.875rem; /* 14px base size for admin look */
  overflow-x: hidden;
  line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: white;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  transition: transform var(--transition-speed) ease;
}

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.75rem;
}

.logo-box {
    width: var(--logo-size);
    height: var(--logo-size);
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    white-space: normal;
    word-break: break-word; /* Allow multi-line if needed, but we expect only 2 words */
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.sidebar-brand:hover {
    color: var(--primary-dark);
}

.sidebar-content {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--secondary-color);
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: #f8fafc;
}

.nav-link.active {
  color: var(--primary-color);
  background-color: #f1f5f9;
  border-left-color: var(--primary-color);
}

.nav-link i {
  width: 1.5rem;
  font-size: 1.1em;
  text-align: center;
  margin-right: 0.75rem;
}

/* Submenu */
.submenu {
  background-color: #f8fafc;
  padding: 0.5rem 0;
}

.submenu-item {
  display: block;
  padding: 0.5rem 1.5rem 0.5rem 3.75rem;
  color: var(--secondary-color);
  font-size: 0.825rem;
  text-decoration: none;
  transition: color 0.2s;
}

.submenu-item:hover {
  color: var(--primary-color);
}

.submenu-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-group-label {
  padding: 1.5rem 1.5rem 0.5rem;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

/* Main Content */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-speed) ease;
}

/* Header */
.main-header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1010;
}

.header-search {
  max-width: 400px;
  width: 100%;
}

.header-search input {
    background-color: #f1f5f9;
    border: none;
    border-radius: 99px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: 100%;
}
.header-search input:focus {
    background-color: white;
    box-shadow: 0 0 0 2px var(--primary-color);
    outline: none;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.25rem;
  color: var(--secondary-color);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

/* Cards */
.soft-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.soft-card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

.card-header-clean {
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem 1.5rem;
    background: transparent;
}

/* Utilities */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.fw-semibold { font-weight: 600; }

.hover-lift {
    transition: transform 0.2s;
}
.hover-lift:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-wrapper {
    margin-left: 0;
  }
  
  .mobile-toggle {
    display: block;
    margin-right: 1rem;
  }
  
  .header-search {
      display: none; /* Hide on small screens for now, or make collapsible */
  }

  /* Overlay */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1015;
    display: none;
  }
  .sidebar-overlay.show {
    display: block;
  }
}

/* Login Page Enhancements */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

/* Enhancing inputs on glass card */
.glass-card .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.glass-card .form-control:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    border-color: var(--primary-color);
}

.login-brand-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}
