@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');

/**
 * Juroo - Lawyer Case Management SaaS Application
 * Modern Legal-Tech Theme
 * Palette: Deep Navy (#0f172a, #1e293b), Gold/Amber (#d97706, #f59e0b), Crisp Slate (#f8fafc)
 */

:root {
  --primary-navy: #0f172a;
  --secondary-navy: #1e293b;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --accent-gold: #d97706;
  --accent-gold-hover: #b45309;
  --accent-gold-light: #fef3c7;
  --bg-light: #f8fafc;
  --card-border: #e2e8f0;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --topbar-height: 64px;
  --sidebar-width: 260px;
}

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Typography & Links */
a {
  color: var(--secondary-navy);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--accent-gold);
}

.text-gold {
  color: var(--accent-gold) !important;
}
.bg-gold {
  background-color: var(--accent-gold) !important;
  color: #fff;
}
.border-gold {
  border-color: var(--accent-gold) !important;
}

/* Buttons */
.btn-navy {
  background-color: var(--secondary-navy);
  color: #ffffff;
  border: 1px solid var(--secondary-navy);
  font-weight: 500;
  transition: all 0.2s;
}
.btn-navy:hover, .btn-navy:focus {
  background-color: var(--primary-navy);
  border-color: var(--primary-navy);
  color: #ffffff;
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #ffffff;
  border: 1px solid var(--accent-gold);
  font-weight: 600;
  transition: all 0.2s;
}
.btn-gold:hover, .btn-gold:focus {
  background-color: var(--accent-gold-hover);
  border-color: var(--accent-gold-hover);
  color: #ffffff;
}

.btn-outline-gold {
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 600;
}
.btn-outline-gold:hover {
  background-color: var(--accent-gold);
  color: #ffffff;
}

/* Auth Layout */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-card-wide {
  max-width: 680px;
}

.auth-header {
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--card-border);
}

.auth-body {
  padding: 2rem;
}

.auth-brand {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
}
.auth-brand span {
  color: var(--accent-gold);
}

.auth-logo-img {
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: inline-block;
}

.sidebar-logo-img {
  height: 38px;
  width: auto;
  max-width: 175px;
  object-fit: contain;
  display: block;
}

/* App Shell Layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: transform 0.3s ease-in-out;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand span {
  color: var(--accent-gold);
}

.sidebar-org {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.15);
}
.sidebar-org-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-org-plan {
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0.75rem;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  /* Firefox thin scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
  scroll-behavior: smooth;
}

/* Custom Sleek Scrollbar for Sidebar Menu (Admin, Lawyer, Client Panels) */
.sidebar-menu::-webkit-scrollbar,
.app-sidebar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.sidebar-menu::-webkit-scrollbar-track,
.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb,
.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  transition: background 0.25s ease, width 0.2s ease;
}

.sidebar-menu:hover::-webkit-scrollbar-thumb,
.app-sidebar:hover::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
}

.sidebar-menu::-webkit-scrollbar-thumb:hover,
.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.75);
}

.sidebar-menu::-webkit-scrollbar-corner,
.app-sidebar::-webkit-scrollbar-corner {
  background: transparent;
}

.sidebar-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #475569;
  padding: 0.75rem 0.75rem 0.25rem;
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-link i {
  width: 24px;
  font-size: 1rem;
  margin-right: 0.75rem;
  color: #64748b;
  transition: color 0.2s ease;
}

.sidebar-link:hover {
  background-color: var(--sidebar-hover);
  color: #ffffff;
}
.sidebar-link:hover i {
  color: var(--accent-gold);
}

.sidebar-link.active {
  background-color: var(--accent-gold);
  color: #ffffff;
}
.sidebar-link.active i {
  color: #ffffff;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #64748b;
}

/* Main Container Area */
.app-main {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-light);
  width: calc(100% - var(--sidebar-width));
}

/* Topbar */
.app-topbar {
  height: var(--topbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
}

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

.topbar-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* User Avatar Dropdown */
.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--secondary-navy);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Content Area */
.app-content {
  padding: 1.75rem 1.5rem;
  flex-grow: 1;
}

/* Cards & Widgets */
.stat-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Progress Quota Bars */
.quota-progress {
  height: 8px;
  border-radius: 4px;
  background-color: #e2e8f0;
  overflow: hidden;
}
.quota-progress-bar {
  height: 100%;
  background-color: var(--accent-gold);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Modern Pricing Cards */
.pricing-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 2.25rem 1.75rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.pricing-card.featured {
  border: 2px solid var(--accent-gold);
  box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.15);
}
.pricing-card .badge-popular {
  position: absolute;
  top: 15px;
  right: -35px;
  transform: rotate(45deg);
  background: var(--accent-gold);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 35px;
  text-transform: uppercase;
}

/* Responsive Breakpoints */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
    width: 100%;
  }
}
