/*!
Theme Name: Sting
Theme URI: https://www.notion.so/luuk-arends/Sting-v1-0-1-2ae58397e72b8002af4ac6f01e333a49?source=copy_link
Author: Luuk Arends
Author URI: https://luukarends.nl
Description: Sting is a lightweight, flexible WordPress theme that cuts through the noise. Custom-built for speed and adaptability, every line of code serves a purpose. Clean, precise, and ready to shape around your vision.
Version: 1.0.2
Tested up to: 8.3
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: sting
*/

/* Root */

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

:root {
  --dark: #111;
  --light: #efefef;
  --white: #ffffff;
  --accent: #e02f12;
  --text: #6b7280;
  --border: #e0e2e7;
  --success: #228b22;
  --warning: #ff8c00;
  --danger: #dc143c;
}

/* Fonts */

@font-face {
  font-family: "Geist";
  src: url("assets/theme/fonts/geist-v4-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("assets/theme/fonts/geist-v4-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("assets/theme/fonts/geist-v4-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Body */

body {
  font-family:
    "Geist",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
}

/* Anchor */

a {
  transition: all ease 0.6s;
  text-decoration: none;
}

/* Buttons */

.btn {
  cursor: pointer;
  padding: 0.75rem 1rem;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0.5rem;
  font-size: 0.925rem;
  text-decoration: none;
}

.btn .ti {
  margin-left: 0.5rem;
  font-size: 1.25rem;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
}

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

/* Layout */

.main {
  display: flex;
}

.content {
  width: 100%;
  padding: 3rem 6rem;
  background-color: var(--light);
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* Typography */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  color: var(--dark);
}

.descr {
  font-size: 1rem;
}

/* Text */

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

.text-muted {
  color: var(--text);
}

.text-secondary {
  color: #64748b;
}

/* Spacing */

.mb-5 {
  margin-bottom: 1.5rem;
}

/* Table */

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--light);
  background-color: var(--white);
  border-radius: 0.5rem;
}

.table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
  text-transform: uppercase;
  padding: 1rem;
  border-bottom: 1px solid var(--light);
}

.entry td {
  padding: 1rem;
  border-bottom: 1px solid var(--light);
  font-size: 0.925rem;
  vertical-align: middle;
}

.entry-customer,
.entry-assembler {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  row-gap: 0;
}

.entry-avatar,
.entry-assembler-avatar {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  min-width: 42px;
  background-color: var(--light);
  border-radius: 50%;
  justify-content: center;
  font-weight: 500;
  opacity: 0.5;
  font-size: 1rem;
}

.entry-customer-info {
  display: grid;
}

.entry-name,
.entry-package,
.entry-price,
.entry-last-maintenance-date,
.entry-next-maintenance-date,
.entry-time-date,
.entry-location-city,
.entry-type-name,
.entry-assembler-name,
.entry-since-date {
  display: block;
  font-weight: 500;
  color: var(--dark);
}

a.entry-name {
  color: var(--accent);
}

.entry-contact {
  font-size: 0.85rem;
}

.entry-package-unknown,
.entry-package.is-unknown {
  color: var(--text) !important;
  font-style: italic;
  font-weight: 400 !important;
}

.entry-price-muted {
  color: var(--text) !important;
  font-weight: 400 !important;
}

.entry-last-maintenance-sub,
.entry-next-maintenance-sub,
.entry-price-period,
.entry-since-sub {
  display: block;
  font-size: 0.8125rem;
  color: var(--text);
  margin-top: 0.15rem;
  font-weight: 400;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--white);
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  background-color: var(--white);
  border-radius: 50%;
  opacity: 0.85;
  flex-shrink: 0;
  margin-right: 0;
}

.status-paid {
  background-color: var(--success);
  color: var(--white);
}

.status-warning {
  background-color: var(--warning);
  color: var(--white);
}

.status-expired {
  background-color: var(--danger);
  color: var(--white);
}

.status-secondary {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.status-secondary .status-dot {
  background-color: #94a3b8;
  opacity: 1;
}

.entry td.entry-menu {
  position: relative;
  text-align: right;
  width: 54px;
}

.entry-menu-wrap {
  position: relative;
  display: inline-block;
}

.entry-menu-btn {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.entry-menu-btn:hover,
.entry-menu-wrap.is-open .entry-menu-btn {
  background-color: var(--light);
  color: var(--dark);
  border-color: var(--border);
}

.entry-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 175px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.12),
    0 8px 10px -6px rgba(0, 0, 0, 0.08);
  padding: 0.375rem;
  z-index: 50;
  text-align: left;
  animation: dropdownFade 0.15s ease;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.entry-menu-wrap.is-open .entry-dropdown {
  display: block;
}

.entry-menu-wrap.is-open {
  z-index: 25;
}

.entry:has(.entry-menu-wrap.is-open) {
  position: relative;
  z-index: 20;
}

.appointment-card:has(.entry-menu-wrap.is-open) {
  z-index: 30;
}

.entry-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--dark);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0.375rem;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.entry-dropdown-item .ti {
  font-size: 1.1rem;
  color: var(--text);
  margin-left: 0;
}

.entry-dropdown-item:hover {
  background-color: var(--light);
  color: var(--dark);
}

.entry-dropdown-item-danger {
  color: var(--danger);
}

.entry-dropdown-item-danger .ti {
  color: var(--danger);
}

.entry-dropdown-item-danger:hover {
  background-color: #fef2f2;
  color: var(--danger);
}

.entry-dropdown-item-success {
  color: var(--success);
}

.entry-dropdown-item-success .ti {
  color: var(--success);
}

.entry-dropdown-item-success:hover {
  background-color: #f0fdf4;
  color: var(--success);
}

.entry-next-maintenance {
  border-left: 1px solid var(--light);
}

/* Table Container & AJAX States */

.table-container {
  position: relative;
  width: 100%;
}

.table-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.table-container.is-loading .table-loader {
  opacity: 1;
  animation: tableLoaderAnim 1.2s infinite linear;
}

.table-container.is-loading .table {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

@keyframes tableLoaderAnim {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.table-loading-cell,
.no-results-cell {
  text-align: center;
  padding: 3rem 1.5rem !important;
  color: var(--text);
  font-size: 0.95rem;
}

.table-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Table Footer & Pagination */

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.table-info {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.page-btn {
  cursor: pointer;
  padding: 0.45rem 0.75rem;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-family: "Geist", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  cursor: default;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 0.25rem;
  color: var(--text);
  font-size: 0.875rem;
}

/* Nav */

.nav {
  min-width: 250px;
  background-color: var(--dark);
  min-height: 100vh;
  padding: 3rem 1.5rem;
}

.nav-brand {
  padding: 0.75rem;
  background-color: var(--white);
  border-radius: 0.5rem;
  margin-bottom: 3rem;
}

.logo {
  width: 150px;
  display: block;
}

.nav-title {
  font-size: 0.925rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

.nav-items {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.nav-link {
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  color: var(--white);
  border-radius: 0.5rem;
}

.nav-link:hover {
  color: var(--dark);
  background-color: var(--light);
}

.nav-link.active {
  background-color: var(--accent);
}

.nav-link .ti {
  margin-right: 0.5rem;
}

/* Stats */

.stats-item {
  display: grid;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background-color: var(--white);
  border-radius: 0.5rem;
}

.stats-title {
  font-size: 1rem;
}

.stats-value {
  font-weight: 600;
}

/* Sections */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background-color: var(--white);
  padding: 1rem;
  border-radius: 0.5rem;
}

.search {
  font-family: "Geist";
  padding: 0.5rem 1rem;
  background-color: var(--light);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  min-width: 320px;
  margin-right: auto;
}

.filter {
  font-family: "Geist";
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--light);
}

.filter-reset {
  cursor: pointer;
  color: var(--accent);
  border: 0;
  background-color: transparent;
}

.toolbar .btn-primary {
  margin-left: auto;
}

/* Chart */

.chart-line {
  width: 100%;
  height: 120px;
}

.chart-line-path {
  fill: none;
  stroke: #e0432b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-donut {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    #7c3aed 0 calc(var(--basis) * 1%),
    #e0432b calc(var(--basis) * 1%) calc((var(--basis) + var(--comfort)) * 1%),
    #1a9d5c calc((var(--basis) + var(--comfort)) * 1%) 100%
  );
}

.chart-donut-center {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.chart-legend {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  font-size: 12px;
}

.chart-legend-item {
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}

.chart-legend-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-legend-basis::before {
  background: #7c3aed;
}

.chart-legend-comfort::before {
  background: #e0432b;
}

.chart-legend-premium::before {
  background: #1a9d5c;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 140px;
}

.chart-bar {
  flex: 1;
  height: var(--value);
  background: #e0432b;
  border-radius: 6px 6px 0 0;
  position: relative;
}

.chart-bar-label {
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: #6b7280;
}

/* Profile */

.profile {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f0e6ff;
  color: #7c3aed;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.profile-name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.profile-contact {
  font-size: 1rem;
  color: var(--text);
}

.profile-since {
  font-size: 0.925rem;
  color: var(--success);
}

.profile-header-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-label {
  font-size: 0.925rem;
  color: var(--text);
}

.summary-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
}

.summary-sub {
  font-size: 0.925rem;
}

.summary-packages-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.summary-package-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.summary-package-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.summary-package-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.summary-package-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
}

.summary-package-price {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.summary-sub-renewal {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.8125rem;
  margin-top: 0.2rem;
}

.summary-sub-renewal i {
  color: var(--accent);
  font-size: 0.95rem;
}

.appointment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.appointment-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.appointment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.appointment-card-upcoming {
  border-color: var(--warning);
  background: var(--white);
}

.appointment-card .btn {
  align-self: end;
  margin-top: 1rem;
}

.appointment-label {
  font-size: 0.925rem;
  color: var(--text);
}

.appointment-date {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
}

.appointment-sub {
  font-size: 12px;
  color: #9aa0a8;
  margin-bottom: 8px;
}

.appointment-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.appointment-item + .appointment-item {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.appointment-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f0f1f3;
  gap: 0.75rem;
}

.appointment-assembler {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
}

.appointment-assembler .entry-assembler-avatar {
  margin-top: 2px;
  flex-shrink: 0;
}

.appointment-assembler-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.appointment-assembler-name {
  color: var(--dark);
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.3;
}

.appointment-notes {
  font-size: 0.785rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.35;
  word-break: break-word;
}

.appointment-meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.appointment-meta-right .entry-menu-btn {
  width: 28px;
  height: 28px;
  font-size: 1.15rem;
}

.appointment-type {
  font-size: 12px;
  color: #6b7280;
}

.notes-log {
  background: #fff;
  border: 1px solid #e8e9ec;
  border-radius: 12px;
  padding: 20px 24px;
}

.notes-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.notes-log-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.note {
  display: flex;
  gap: 12px;
}

.note-body {
  flex: 1;
  border-bottom: 1px solid #f0f1f3;
  padding-bottom: 18px;
}

.note:last-child .note-body {
  border-bottom: none;
  padding-bottom: 0;
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.note-author {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.note-author-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 9999px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.note-author-admin {
  background-color: #fee2e2;
  color: #b91c1c;
}

.note-author-monteur {
  background-color: #e0e7ff;
  color: #3730a3;
}

.note-author-klant {
  background-color: #f3f4f6;
  color: #4b5563;
}

.btn-note-delete {
  background: transparent;
  border: none;
  color: #9aa0a8;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  margin-left: auto;
  transition: color 0.15s ease;
}

.btn-note-delete:hover {
  color: var(--danger);
}

.note-empty {
  padding: 0.35rem 0;
  list-style: none;
  font-size: 13px;
  color: #9aa0a8;
  line-height: 1.5;
}

.note-empty .text-muted {
  font-size: 13px;
  color: #9aa0a8;
}

.note-date {
  font-size: 12px;
  color: #9aa0a8;
}

.note-text {
  margin: 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.note-system-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0f1f3;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.note-system .note-text {
  color: #6b7280;
  font-style: italic;
}

/* Client Portal View (standalone client layout without sidebar) */

.main-client-portal {
  display: block;
  min-height: 100vh;
  background-color: var(--light);
}

.client-portal-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.client-portal-brand .logo {
  width: 150px;
  height: auto;
  display: block;
}

.client-portal-user {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.client-greeting {
  font-size: 0.925rem;
  color: var(--dark);
}

.client-portal-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}

@media (max-width: 768px) {
  .client-portal-header {
    padding: 1rem 1.5rem;
  }

  .client-portal-content {
    padding: 1.5rem 1rem 3rem;
  }

  .client-greeting {
    display: none;
  }
}

/* Auth */

.main-auth {
  min-height: 100vh;
  background-color: var(--light);
}

.login-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 2rem;
}

.login-card h2 {
  font-size: 1.25rem;
}

.login-brand {
  width: fit-content;
  margin-bottom: 2rem;
  padding: 0.5rem;
}

.login-brand .logo {
  width: 140px;
}

.login-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: authAlertFade 0.2s ease;
}

@keyframes authAlertFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.login-alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.profile-alert,
.profile > .login-alert {
  margin-bottom: 0;
}

.login-form {
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field-label {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--dark);
}

.field-input {
  font-family: "Geist";
  padding: 0.5rem 1rem;
  background-color: var(--light);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  width: 100%;
}

.field-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.field-forgot {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-auth-submit {
  position: relative;
  transition: all ease 0.2s;
}

.btn-auth-submit:disabled,
.btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.btn-spinner {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spinAuthBtn 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spinAuthBtn {
  to {
    transform: rotate(360deg);
  }
}

.login-footer {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  text-align: center;
}

.login-footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Modal */

body.modal-is-open {
  overflow: hidden;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(17, 17, 17, 0.5);
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  z-index: 100;
  overflow-y: auto;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 420px;
  background-color: var(--white);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: auto;
  position: relative;
}

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

.modal-title {
  font-size: 1.125rem;
}

.modal-close {
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text);
  background-color: transparent;
  border: 0;
}

.modal-body {
  display: grid;
  gap: 1.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

textarea.field-input {
  resize: vertical;
}

.modal-profile-edit {
  max-width: 480px;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  gap: 0.5rem;
}

.modal-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all ease 0.2s;
  margin-bottom: -1px;
}

.modal-tab:hover {
  color: var(--dark);
}

.modal-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.is-active {
  display: block;
}

.field-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .field-row-grid {
    grid-template-columns: 1fr;
  }
}

/* Chart card */

.chart-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.chart-card-wide {
  width: 100%;
}

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

.chart-card-title {
  font-weight: 600;
  color: var(--dark);
}

.chart-card-subtitle {
  font-size: 0.85rem;
}

.chart-canvas-wrap {
  position: relative;
  height: 260px;
}

.chart-canvas-wrap-small {
  height: 220px;
}

/* Delete Client Modal */

.modal-delete-client {
  max-width: 390px;
  padding: 1.25rem 1.5rem;
}

.modal-delete-client .modal-header {
  margin-bottom: 1rem;
}

.modal-delete-client .modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
}

.modal-delete-client .delete-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fee2e2;
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
  flex-shrink: 0;
}

.modal-delete-client .delete-confirm-text {
  font-size: 0.95rem;
  color: var(--dark);
  margin: 0;
  line-height: 1.45;
  text-align: center;
}

.modal-delete-client .delete-confirm-sub {
  font-size: 0.825rem;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

.modal-delete-client .auth-alert-container {
  width: 100%;
}

.modal-delete-client .auth-alert-container:not(:empty) {
  margin-top: 0.5rem;
}

.modal-delete-client .modal-footer {
  margin-top: 1.25rem;
  gap: 0.75rem;
}

.modal-delete-client .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-danger {
  background-color: var(--danger);
  color: var(--white);
}

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

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

/* Create Client Modal */

.modal-create-client {
  max-width: 540px;
}

.modal-create-client .modal-body {
  gap: 1rem;
}

.client-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background-color: var(--light);
  padding: 0.35rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.client-type-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all ease 0.2s;
  user-select: none;
}

.client-type-option input {
  display: none;
}

.client-type-option:hover {
  color: var(--dark);
}

.client-type-option.is-active {
  background-color: var(--white);
  color: var(--dark);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.field-help {
  font-size: 0.8rem;
  color: var(--text);
  margin-top: -0.25rem;
}

.field-label .required {
  color: var(--danger);
}

/* Order Creation Modal & Geschiedenis Table Styles */

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 0.375rem;
}

.btn-sm .ti {
  font-size: 1rem;
  margin-left: 0.35rem;
}

.btn-pay-now {
  background-color: var(--accent);
  color: var(--white);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.btn-pay-now:hover {
  background-color: var(--dark);
  color: var(--white);
}

.modal-create-order {
  max-width: 500px;
}

.modal-create-order .modal-body {
  gap: 1rem;
}

.entry-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text);
  font-size: 0.925rem;
}

/* ==========================================================================
   Full-Width Pakketten Section & Duo Profile Summary
   ========================================================================== */

.profile-packages-section {
  width: 100%;
}

.summary-card-fullwidth {
  width: 100%;
}

.summary-packages-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.profile-packages-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-package-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem;
  background: #fbfbfc;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.profile-package-row:hover {
  border-color: #cbd5e1;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.profile-package-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
}

.profile-package-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.profile-package-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-package-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
}

.profile-package-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.profile-package-sub-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  background-color: #f1f5f9;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
}

/* Balanced appointments strip */
.profile-package-appointments-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.pkg-appointment-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  min-width: 0;
}

.pkg-appointment-pill > i {
  font-size: 1.1rem;
  color: #64748b;
  flex-shrink: 0;
}

.pkg-appointment-upcoming.is-scheduled {
  background: #fff8f6;
  border-color: #fed7aa;
}

.pkg-appointment-upcoming.is-scheduled > i {
  color: var(--accent);
}

.pkg-appointment-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.pkg-appointment-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
  line-height: 1.1;
}

.pkg-appointment-text {
  font-size: 0.825rem;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pkg-appointment-text strong {
  font-weight: 600;
}

.pkg-appointment-relative {
  font-size: 0.775rem;
  color: #64748b;
  margin-left: 0.2rem;
}

.pkg-appointment-relative.highlight {
  color: var(--accent);
  font-weight: 500;
}

.pkg-appointment-pill .btn-reschedule-link {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.pkg-appointment-pill .btn-reschedule-link:hover {
  color: var(--dark);
}

/* Bottom meta: Monteur & Laatste betaling */
.profile-package-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #64748b;
  padding-top: 0.1rem;
}

.profile-package-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-package-meta-item i {
  color: var(--text);
  font-size: 0.95rem;
}

.profile-package-side {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.profile-package-side .status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.profile-package-side .status .status-dot {
  width: 5px;
  height: 5px;
  margin: 0;
}

.profile-package-empty {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0;
}

.profile-summary-duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.btn-pay-package {
  background-color: var(--accent);
  color: var(--white);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  transition: background-color 0.15s ease;
}

.btn-pay-package:hover {
  background-color: var(--dark);
  color: var(--white);
}

@media (max-width: 768px) {
  .profile-package-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .profile-package-side {
    width: 100%;
    justify-content: space-between;
  }

  .profile-package-appointments-strip {
    grid-template-columns: 1fr;
  }

  .profile-summary-duo {
    grid-template-columns: 1fr;
  }
}

/* Google Calendar Sync UI */

.agenda-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.gcal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 9999px;
  text-decoration: none;
  line-height: 1;
  transition: all 0.15s ease;
}

.gcal-status-connected {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.gcal-status-connected .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.gcal-status-disconnected {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  cursor: pointer;
}

.gcal-status-disconnected:hover {
  background-color: #fef3c7;
  color: #78350f;
}

.modal-gcal-result {
  max-width: 620px;
}

.gcal-items-list::-webkit-scrollbar {
  width: 6px;
}

.gcal-items-list::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

/* ==========================================================================
   Mollie Synchronization & Admin UI
   ========================================================================== */
.sting-mollie-wrap {
  max-width: 1400px;
  width: calc(100% - 20px);
  margin: 20px auto 40px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: #1e293b;
  box-sizing: border-box;
}

.sting-mollie-wrap * {
  box-sizing: border-box;
}

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

.sting-mollie-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sting-mollie-icon-badge {
  width: 48px;
  height: 48px;
  background: #e02f12;
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(224, 47, 18, 0.22);
  padding: 0;
  margin: 0;
}

.sting-mollie-icon-badge svg {
  width: 24px;
  height: 24px;
  display: block;
  stroke: #ffffff;
  fill: none;
  margin: 0;
  padding: 0;
}

.sting-mollie-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.sting-mollie-subtitle {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

.sting-mollie-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.sting-mollie-status-pill.is-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.sting-mollie-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.sting-mollie-status-pill.is-error .sting-mollie-status-dot {
  background: #ef4444;
}

.sting-mollie-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.sting-mollie-col-12 { grid-column: span 12; }
.sting-mollie-col-8  { grid-column: span 8; }
.sting-mollie-col-4  { grid-column: span 4; }

@media (max-width: 1024px) {
  .sting-mollie-col-8, .sting-mollie-col-4 { grid-column: span 12; }
}

.sting-mollie-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.sting-mollie-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.sting-mollie-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.3;
}

.sting-mollie-card-title svg {
  width: 20px;
  height: 20px;
  color: #e02f12;
  flex-shrink: 0;
  display: block;
  margin: 0;
  padding: 0;
}

.sting-mollie-input-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.sting-mollie-input {
  flex: 1;
  min-width: 260px;
  padding: 0.6rem 0.85rem !important;
  font-size: 0.95rem !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
}

.sting-mollie-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.55rem 1.15rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  line-height: 1.35 !important;
  min-height: 38px !important;
  height: auto !important;
  border: 1px solid transparent !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

.sting-mollie-btn svg {
  display: block !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}

.sting-mollie-btn span {
  display: inline-block !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.sting-mollie-btn-primary {
  background: #e02f12 !important;
  border-color: #e02f12 !important;
  color: #ffffff !important;
}

.sting-mollie-btn-primary:hover {
  background: #c2270e !important;
}

.sting-mollie-btn-success {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

.sting-mollie-btn-success:hover {
  background: #047857 !important;
}

.sting-mollie-btn-secondary {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

.sting-mollie-btn-secondary:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.sting-mollie-result-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.25rem;
  display: none;
}

.sting-mollie-progress-wrap {
  background: #e2e8f0;
  border-radius: 9999px;
  height: 14px;
  overflow: hidden;
  margin: 1rem 0;
}

.sting-mollie-progress-bar {
  background: #10b981;
  height: 100%;
  width: 0%;
  transition: width 0.25s ease;
}

.sting-mollie-log {
  background: #0f172a;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  padding: 1rem;
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  line-height: 1.5;
  white-space: pre-wrap;
}

.sting-mollie-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.sting-mollie-badge-paid {
  background: #dcfce7;
  color: #15803d;
}

.sting-mollie-badge-directdebit {
  background: #e0f2fe;
  color: #0369a1;
}

.sting-mollie-code-block {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.85rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}

.sting-mollie-wrap .dashicons,
.sting-mollie-wrap .dashicons-before:before {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
}


