:root {
  --red: #c40000;
  --red-hover: #a00000;
  --red-light: #fff0f0;
  --red-on-dark: #ff8080;
  --dark: #0a0a0a;
  --dark-2: #151515;
  --dark-3: #1f1f1f;
  --light: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --ink: #1f1f1f;
  --muted: #595959;
  --on-dark: #e8e8e8;
  --on-dark-muted: #9a9a9a;
  --green: #2e7d32;
  --green-light: #e8f5e9;
  --blue: #1565c0;
  --blue-light: #e3f2fd;
  --orange: #ef6c00;
  --orange-light: #fff3e0;
  --border: rgba(0, 0, 0, 0.08);
  --border-dark: rgba(255, 255, 255, 0.1);
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--gray-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--red);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--red-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* ========== Login ========== */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .login-page {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.login-visual {
  background: var(--dark);
  color: var(--on-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(196, 0, 0, 0.22), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(196, 0, 0, 0.1), transparent 40%);
  pointer-events: none;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

.login-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 500px;
}

.login-visual .brand-logo {
  max-width: 460px;
  width: 100%;
  margin-bottom: 2.5rem;
  filter: brightness(0) invert(1);
}

@media (min-width: 900px) {
  .login-visual .brand-logo {
    max-width: 520px;
  }
}

.login-visual h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--light);
}

.login-visual p {
  font-size: 1.05rem;
  color: var(--on-dark-muted);
  margin: 0;
}

.login-form-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--gray-50);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.login-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.login-card .subtitle {
  color: var(--muted);
  margin: 0 0 1.8rem;
  font-size: 0.95rem;
}

/* ========== Forms ========== */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--gray-800);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="month"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--light);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(196, 0, 0, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-500);
}

select[multiple] {
  min-height: 150px;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--red);
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 1em;
  height: 1em;
  flex: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--red);
  color: var(--light);
  box-shadow: 0 2px 8px rgba(196, 0, 0, 0.25);
}

.btn--primary:hover {
  background: var(--red-hover);
  color: var(--light);
  box-shadow: 0 4px 12px rgba(196, 0, 0, 0.3);
}

.btn--secondary {
  background: var(--dark-2);
  color: var(--light);
}

.btn--secondary:hover {
  background: var(--dark);
  color: var(--light);
}

.btn--outline {
  background: var(--light);
  color: var(--gray-800);
  border: 1px solid var(--gray-300);
}

.btn--outline:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
  color: var(--ink);
}

.btn--danger {
  background: var(--light);
  color: #c62828;
  border: 1px solid rgba(198, 40, 40, 0.2);
}

.btn--danger:hover {
  background: #ffebee;
  color: #b71c1c;
}

.btn--success {
  background: var(--green);
  color: var(--light);
}

.btn--success:hover {
  background: #1b5e20;
}

.btn--sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
}

.btn--lg {
  padding: 1rem 1.8rem;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

/* ========== Alerts ========== */
.alert {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  border-left: 4px solid transparent;
}

.alert--success {
  background: var(--green-light);
  border-color: var(--green);
  color: #1b5e20;
}

.alert--error {
  background: var(--red-light);
  border-color: var(--red);
  color: #b71c1c;
}

.alert--info {
  background: var(--blue-light);
  border-color: var(--blue);
  color: #0d47a1;
}

.alert--warning {
  background: var(--orange-light);
  border-color: var(--orange);
  color: #e65100;
}

/* ========== Layout app ========== */
.app {
  display: flex;
  min-height: 100vh;
  background: var(--gray-50);
}

.sidebar {
  width: 270px;
  background: var(--dark);
  color: var(--on-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

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

@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: 0;
    transform: translateX(0);
    flex: none;
    align-self: flex-start;
  }
}

.sidebar-brand {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border-dark);
}

.sidebar-brand a {
  display: block;
}

.sidebar-brand img {
  max-width: 160px;
  filter: brightness(0) invert(1);
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.25rem 0.9rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav li + li {
  margin-top: 0.35rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  color: var(--on-dark-muted);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.sidebar-nav a svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  opacity: 0.85;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--light);
}

.sidebar-nav a.active {
  background: rgba(196, 0, 0, 0.18);
  color: var(--light);
  font-weight: 600;
}

.sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 3px;
  background: var(--red);
  border-radius: 0 2px 2px 0;
}

.sidebar-nav a.active svg {
  opacity: 1;
  color: var(--red-on-dark);
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 1.1rem 1.25rem;
  border-top: 1px solid var(--border-dark);
  font-size: 0.85rem;
  color: var(--on-dark-muted);
  background: var(--dark);
}

.sidebar-footer strong {
  color: var(--light);
  display: block;
  font-weight: 600;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}

@media (max-width: 1023px) {
  .main {
    margin-left: 0;
  }
}

.topbar {
  background: var(--light);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

@media (min-width: 768px) {
  .topbar-title {
    font-size: 1.25rem;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  background: var(--gray-100);
  transition: var(--transition);
}

.notification-bell:hover {
  background: var(--gray-200);
  color: var(--ink);
}

.notification-bell svg {
  width: 1.25rem;
  height: 1.25rem;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--red);
  color: var(--light);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--light);
}

.menu-toggle {
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.content {
  flex: 1;
  padding: 1.25rem;
  width: 100%;
  max-width: none;
  min-height: 0;
  background: var(--gray-50);
}

@media (min-width: 768px) {
  .content {
    padding: 1.75rem;
  }
}

@media (min-width: 1400px) {
  .content {
    padding: 2rem;
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header > div {
  min-width: 0;
}

@media (min-width: 768px) {
  .page-header {
    margin-bottom: 1.75rem;
  }
}

.page-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .page-header h2 {
    font-size: 1.6rem;
  }
}

.page-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

/* ========== Cards ========== */
.card {
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: var(--transition);
  width: 100%;
}

@media (min-width: 768px) {
  .card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .card-title {
    font-size: 1.15rem;
  }
}

.card-title svg {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--red);
}

.card-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

/* ========== Stats ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.stat-card {
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .stat-card {
    padding: 1.35rem;
    gap: 1rem;
  }
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--red-light);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

@media (min-width: 768px) {
  .stat-card__icon {
    width: 48px;
    height: 48px;
  }
}

.stat-card__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

@media (min-width: 768px) {
  .stat-card__icon svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}

.stat-card__content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .stat-card__content h3 {
    font-size: 1.85rem;
  }
}

.stat-card__content p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .stat-card__content p {
    font-size: 0.88rem;
  }
}

/* ========== Tables ========== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  width: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--light);
}

@media (min-width: 768px) {
  .table {
    font-size: 0.9rem;
  }
}

.table th,
.table td {
  padding: 0.85rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

@media (min-width: 768px) {
  .table th,
  .table td {
    padding: 0.95rem 1.1rem;
  }
}

.table th {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gray-50);
}

@media (min-width: 768px) {
  .table th {
    font-size: 0.75rem;
  }
}

.table tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.table tbody tr:hover {
  background: var(--gray-100);
}

.table td.actions {
  white-space: nowrap;
  display: flex;
  gap: 0.4rem;
}

/* ========== Dropdown de ações (menu ⋮) ========== */
.dropdown {
  display: inline-block;
}

.dropdown__menu {
  display: none;
  position: fixed;
  min-width: 190px;
  padding: 0.35rem;
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  z-index: 300;
}

.dropdown.is-open .dropdown__menu {
  display: block;
}

.dropdown__menu form {
  margin: 0;
}

.dropdown__menu a,
.dropdown__menu button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  background: none;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
}

.dropdown__menu a:hover,
.dropdown__menu button:hover {
  background: var(--gray-100);
}

.dropdown__menu svg {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.75;
}

.dropdown__menu .dropdown__item--danger {
  color: var(--red);
}

.dropdown__menu .dropdown__item--danger:hover {
  background: rgba(196, 0, 0, 0.08);
}

.dropdown__divider {
  height: 1px;
  margin: 0.3rem 0.5rem;
  background: var(--gray-200);
}

/* ========== Badges ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1;
}

.badge--success {
  background: var(--green-light);
  color: var(--green);
}

.badge--danger {
  background: #ffebee;
  color: #c62828;
}

.badge--warning {
  background: var(--orange-light);
  color: var(--orange);
}

.badge--info {
  background: var(--blue-light);
  color: var(--blue);
}

.badge--outline {
  background: transparent;
  border: 1px solid currentColor;
}

/* ========== Empty state ========== */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--muted);
}

.empty-state svg {
  width: 56px;
  height: 56px;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--ink);
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.empty-state p {
  margin: 0;
  font-size: 0.9rem;
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.pagination-bar__per-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.pagination-bar__per-page select {
  width: auto;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.7rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--light);
}

.pagination a:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.pagination .current {
  background: var(--red);
  border-color: var(--red);
  color: var(--light);
}

.pagination .ellipsis {
  border: none;
  min-width: auto;
  padding: 0 0.25rem;
  color: var(--muted);
}

/* ========== Report cards (client) ========== */
.report-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--light);
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

@media (min-width: 640px) {
  .report-card {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem;
  }
}

.report-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.report-card__info {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.report-card__info h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.report-card__meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.report-card__actions {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
}

@media (min-width: 640px) {
  .report-card__actions {
    align-items: flex-end;
    width: auto;
  }
}

.report-card__actions .btn {
  justify-content: center;
}

/* ========== Charts (CSS only) ========== */
.chart-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  min-height: 2rem;
}

@media (min-width: 768px) {
  .chart-bar {
    gap: 0.75rem;
    align-items: center;
  }
}

.chart-bar__label {
  width: 120px;
  font-size: 0.78rem;
  color: var(--gray-700);
  line-height: 1.35;
  flex: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-top: 0.15rem;
}

@media (min-width: 768px) {
  .chart-bar__label {
    width: 180px;
    font-size: 0.85rem;
    padding-top: 0;
  }
}

.chart-bar__track {
  flex: 1;
  height: 10px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.35rem;
}

@media (min-width: 768px) {
  .chart-bar__track {
    height: 12px;
    margin-top: 0;
  }
}

.chart-bar__fill {
  height: 100%;
  background: var(--red);
  border-radius: 999px;
  min-width: 4px;
}

.chart-bar__value {
  width: 32px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-800);
  flex: none;
}

@media (min-width: 768px) {
  .chart-bar__value {
    width: 40px;
    font-size: 0.85rem;
  }
}

/* ========== Dashboard sections ========== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .dashboard-grid--split {
    grid-template-columns: 2fr 1fr;
  }
}

.dashboard-grid .card--wide {
  grid-column: 1 / -1;
}

.dashboard-grid > .card {
  margin-bottom: 0;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--ink);
  transition: var(--transition);
}

@media (min-width: 768px) {
  .quick-action {
    gap: 1rem;
    padding: 1.15rem;
  }
}

.quick-action:hover {
  border-color: var(--red);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.quick-action__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--red-light);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

@media (min-width: 768px) {
  .quick-action__icon {
    width: 44px;
    height: 44px;
  }
}

.quick-action__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (min-width: 768px) {
  .quick-action__icon svg {
    width: 1.35rem;
    height: 1.35rem;
  }
}

.quick-action__text strong {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .quick-action__text strong {
    font-size: 0.95rem;
  }
}

.quick-action__text span {
  font-size: 0.78rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .quick-action__text span {
    font-size: 0.82rem;
  }
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal--confirm {
  max-width: 380px;
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
}

.modal--confirm .modal__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: var(--red-light);
  color: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal--confirm .modal__icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
  flex-shrink: 0;
}

.modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.modal--confirm .modal__body {
  padding: 0 0.25rem 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.modal--confirm .modal__footer {
  padding: 0;
  border-top: none;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal--confirm .modal__footer .btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  min-width: 110px;
}

.modal--confirm .modal__footer .btn--danger {
  background: var(--red);
  color: var(--light);
  border-color: var(--red);
}

.modal--confirm .modal__footer .btn--danger:hover {
  background: var(--red-hover);
  color: var(--light);
  border-color: var(--red-hover);
}

.modal__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.modal__header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal__body {
  padding: 1.25rem 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.modal__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal__footer .btn {
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
}

/* ========== Utilities ========== */
.text-muted {
  color: var(--muted);
}

.text-small {
  font-size: 0.85rem;
}

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

@media (max-width: 767px) {
  .form-group.flex.gap-1,
  .form-group.flex.gap-2 {
    flex-direction: column;
    align-items: stretch;
  }

  .form-group.flex.gap-1 .btn,
  .form-group.flex.gap-2 .btn {
    width: 100%;
  }
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.w-full {
  width: 100%;
}

/* ========== Filter grids (admin/cliente) ========== */
@media (min-width: 640px) {
  .filters-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1024px) {
  .filters-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .filters-grid__range {
    grid-column: span 2;
  }
}

/* Date range group inside filter grids (de/até) */
.filters-grid__range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filters-grid__range input {
  flex: 1;
  min-width: 0;
}

.filters-grid__range span {
  flex-shrink: 0;
}

.is-hidden {
  display: none !important;
}

/* ========== Modal overlay for mobile sidebar ========== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .sidebar-overlay {
    display: none;
  }
}

/* ========== File list ========== */
.file-list {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.file-list__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.9rem;
}

.file-list__item:last-child {
  border-bottom: none;
}

.file-list__item a:not(.btn) {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--red);
}

/* ========== Notifications ========== */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--light);
  transition: var(--transition);
}

@media (min-width: 768px) {
  .notification-item {
    padding: 1.15rem;
    gap: 1rem;
  }
}

.notification-item--unread {
  background: var(--red-light);
  border-color: rgba(196, 0, 0, 0.15);
}

.notification-item__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.notification-item--unread .notification-item__icon {
  background: rgba(196, 0, 0, 0.12);
  color: var(--red);
}

.notification-item__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.notification-item__content {
  flex: 1;
  min-width: 0;
}

.notification-item__content h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.notification-item__content p {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.notification-item__date {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.notification-item__actions {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

@media (max-width: 640px) {
  .notification-item {
    flex-wrap: wrap;
  }

  .notification-item__actions {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
  }
}

/* ========== Auth pages shared ========== */
.login-page .alert {
  margin-bottom: 1.25rem;
}
