/* assets/css/style.css */

:root {
  --crm-primary: #0046b8;
  --crm-primary-dark: #00358a;
  --crm-accent: #ffb347;
  --crm-bg: #f5f6fb;
  --crm-card: #ffffff;
  --crm-sidebar-bg: #ffffff;
  --crm-border: #e3e6f0;
  --crm-text-muted: #6c757d;
  --crm-radius-lg: 18px;
  --crm-radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--crm-bg);
  color: #212529;
  margin: 0;
}

.app-wrapper {
  min-height: 100vh;
}

/* Sidebar */

.app-sidebar {
  width: 250px;
  background: var(--crm-sidebar-bg);
  border-right: 1px solid var(--crm-border);
  box-shadow: 0 0 25px rgba(15, 23, 42, 0.06);
}

.sidebar-header {
  border-bottom: 1px solid var(--crm-border);
}

.sidebar-logo img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

.sidebar-title {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.sidebar-subtitle {
  font-size: 0.8rem;
}

.sidebar-nav {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  margin-bottom: 0.25rem;
  border-radius: var(--crm-radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-link .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #dee2e6;
}

.sidebar-link:hover {
  background: #f1f3ff;
  color: var(--crm-primary-dark);
}

.sidebar-link.active {
  background: var(--crm-primary);
  color: #fff;
}

.sidebar-link.active .dot {
  background: #fff;
}

/* Topbar */

.app-topbar {
  background: #fdfdff;
  border-bottom: 1px solid var(--crm-border);
}

/* Contenu */

.app-content {
  background: linear-gradient(180deg, #f5f6ff 0%, #f9fafb 40%, #ffffff 100%);
}

/* Cards dashboard */

.crm-card {
  background: var(--crm-card);
  border-radius: var(--crm-radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.1rem;
}

.crm-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--crm-text-muted);
}

.crm-card-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.crm-pill {
  border-radius: var(--crm-radius-pill);
  padding: 0.1rem 0.55rem;
  font-size: 0.75rem;
}

/* Auth (login) */

.auth-page {
  min-height: 100vh;
  background: radial-gradient(
    circle at top left,
    #e0ebff,
    #f5f6fb 55%,
    #ffffff
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  max-width: 420px;
  width: 100%;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
  padding: 2rem 2.25rem;
}

.auth-logo {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  overflow: hidden;
  margin: 0 auto 1rem;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-title {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.auth-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--crm-text-muted);
}

/* Champ login */

.form-control-soft {
  background: #f4f6fb;
  border: 1px solid #e0e4f2;
  border-radius: 14px;
  padding: 0.6rem 0.85rem;
}

.form-control-soft:focus {
  background: #ffffff;
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 0.15rem rgba(0, 70, 184, 0.15);
}

.btn-primary-soft {
  background: var(--crm-primary);
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 600;
}

.btn-primary-soft:hover {
  background: var(--crm-primary-dark);
}

/* Message rôles */

.role-message-card {
  max-width: 620px;
  margin: 0 auto;
}

/* Responsive */

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    z-index: 1040;
    transition: transform 0.2s ease;
  }

  .app-sidebar.open {
    transform: translateX(0);
  }
}
