* {
	box-sizing: border-box;
	font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial
}

:root {
	--bg: #f4f6fb;
	--card: #ffffff;
	--primary: #2b6ef6;
	--danger: #e04b4b;
	--muted: #6b7280;
	--success: #16a34a;
	--dark-bg: #0b0f14;        /* fundo geral */
  --dark-card: #11161d;     /* cards */
  --dark-panel: #161b22;   /* colunas/tabela */
  --dark-border: #222834;  /* bordas */
  --dark-text: #e5e7eb;    /* texto principal */
  --dark-muted: #9ca3af;  /* texto secundário */
  --dark-accent: #3b82f6; /* azul de ação */
  --dark-success: #22c55e;
}

body {
	margin: 0;
	background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
	color: #0f172a
}

.app-container {
	max-width: 1200px;
	margin: 40px auto;
	padding: 24px
}

/* HEADER */
.header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px
}

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

.header h1 {
	margin: 0;
	font-size: 1.6rem
}

.subtitle {
	margin: 0;
	color: var(--muted)
}

/* CARD */
.card {
	background: var(--card);
	border-radius: 16px;
	padding: 18px;
	box-shadow: 0 10px 25px rgba(0,0,0,.08);
	margin-bottom: 18px
}

.card .card-body {
	padding: 2rem
}

.form-card {
	height: calc(100vh - 180px);
	min-height: 75vh;
}

/* FLEX */
.form-card .card-body,
.form-card form,
.form-card .row.g-4 {
	height: 100%;
}

.col-tabela {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #f9fafb;
	border-radius: 14px;
	padding: 16px;
}

/* LABELS */
.card .form-label {
	margin-bottom: .35rem;
	font-weight: 600;
	color: #1f2933;
}

/* INPUTS */
.card .form-control,
.card .form-select {
	height: calc(1.5em + .75rem + 2px);
	padding: .375rem .75rem;
	min-width: 160px;
	border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
	box-shadow: 0 0 0 3px rgba(37,99,235,.2);
	border-color: var(--primary);
}

/* TAG INPUT */
.tag-input {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	width: 100%;
	gap: 6px;
	padding: 8px;
	border-radius: 10px;
	border: 1px solid #d1d5db;
	background: #f9fafb;
}

.tag-input-field {
	flex: 1 0 120px;
	min-width: 120px;
	border: none;
	outline: none;
	padding: 2px 4px;
	background: transparent;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: 96px;
	overflow-y: auto;
}



/* BUTTON */
#add-entry {
	height: 48px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 12px;
	background: linear-gradient(135deg,#16a34a,#22c55e);
	border: none;
	box-shadow: 0 6px 16px rgba(22,163,74,.3);
}

#add-entry:disabled {
	background: #94a3b8;
	box-shadow: none;
}

/* TABELA */
.table-wrapper {
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

.table-responsive {
	height: 100%;
	overflow-y: auto;
}

.table thead {
	background: #f1f5f9;
	font-weight: 600;
}

.table th,
.table td {
	text-align: right;
}

.table th:first-child,
.table td:first-child {
	text-align: left;
}

/* HEADER FIXO */
.table-wrapper thead th {
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 2;
}

/* TOTAIS */
.total-row {
	background: #ffffff;
	border-radius: 10px;
	padding: 10px 14px;
	box-shadow: 0 3px 10px rgba(0,0,0,.05);
	font-size: 15px;
	margin-top: 10px;
	display: flex;
	justify-content: space-between;
}

#total-value-atendimentos {
	color: var(--success);
	font-weight: 700;
}

#total-value-registro {
	color: #334155;
	font-weight: 700;
}

/* ERROR */
.error {
	color: #b91c1c;
	font-size: 0.85rem;
	margin-top: 6px
}

/* FOOTER */
.footer {
	text-align: center;
	color: var(--muted);
	font-size: 0.9rem;
	margin-top: 6px
}

/* RESPONSIVO */
@media (max-width:720px) {
	.app-container {
		padding: 12px
	}

	.header {
		flex-direction: column;
		gap: 6px
	}
}

/* @media (prefers-color-scheme: dark) {

  body {
    background: radial-gradient(circle at top, #0f172a, var(--dark-bg));
    color: var(--dark-text);
  }

  .card,
  .col-tabela {
    background: var(--dark-card);
    box-shadow: 0 12px 28px rgba(0,0,0,.7);
  }

  .col-tabela {
    background: var(--dark-panel);
  }

  .form-control,
  .form-select,
  .tag-input {
    background: var(--dark-bg);
    border-color: var(--dark-border);
    color: var(--dark-text);
  }

  .form-label {
    color: var(--dark-text);
  }

  .subtitle,
  .footer {
    color: var(--dark-muted);
  }

  .table thead {
    background: var(--dark-panel);
    color: var(--dark-muted);
  }

  .table td,
  .table th {
    border-color: var(--dark-border);
  }

  .total-row {
    background: var(--dark-card);
    border-color: var(--dark-border);
    color: var(--dark-text);
  }

  #total-value-atendimentos {
    color: var(--dark-success);
  }

  #add-entry {
    background: linear-gradient(135deg, var(--dark-accent), #1d4ed8);
  }
} */


.card,
.form-control,
.form-select,
#add-entry,
.tags li {
  transition: all .25s ease;
}

.card:hover {
  transform: translateY(-2px);
}

#add-entry:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.02);
}

/* .tags li:hover {
  transform: scale(1.05);
} */

@media (max-width: 768px) {

  .form-card {
    height: auto;
  }

  .col-tabela {
    margin-top: 16px;
  }

  .table-wrapper {
    max-height: 300px;
  }

  .total-row {
    font-size: 14px;
  }
}

.list-card {
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

/* Header */
.list-card .list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
}

.list-card h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Status */
.list-card .status span {
  font-size: 0.85rem;
  color: var(--muted);
}

#day-status {
  background: linear-gradient(135deg, #64748b, #334155);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
}

/* Tabela */
.list-card table {
  border-collapse: separate;
  border-spacing: 0 6px;
}

.list-card thead th {
  background: #f1f5f9;
  border: none;
  font-weight: 600;
  font-size: .8rem;
  color: #475569;
}

.list-card tbody tr {
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}

/* .list-card tbody tr:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
} */

.list-card td {
  border: none;
  font-size: .85rem;
  color: #0f172a;
}

/* Total */
.list-card .total-row {
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,.05);
}

/* Botão fechar caixa */
#close-day-btn {
  border-radius: 999px;
  font-weight: 600;
  padding: 6px 14px;
}

/* Alinha total à direita */
.list-card .total-row {
  justify-content: flex-end !important;
  gap: 16px;
}

.list-card .total-row > div {
  margin-right: auto;
  font-weight: 600;
}

#total-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success);
}

#entries-table thead th {
  background: #f1f5f9;
  border: none;
  font-weight: 600;
  font-size: .8rem;
  color: #475569;
  text-transform: capitalize;
  font-weight: 700;
}