:root {
  /* Industrial Refined Variables */
  --system-bg: #F7F8FA;
  --surface-bg: #FFFFFF;
  --sidebar-bg: #FFFFFF;
  --primary: #1E4BFF;
  --primary-hover: #1032CC;
  --primary-light: rgba(30, 75, 255, 0.08);
  --system-blue: #1E4BFF;
  --success: #28A745;
  --danger: #DC3545;
  --danger-light: rgba(220, 53, 69, 0.1);
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-tertiary: #9CA3AF;
  --separator: #E5E7EB;
  --input-bg: #F9FAFB;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-card: 12px;
  --radius-input: 8px;
  --radius-pill: 9999px;
  --radius-badge: 6px;
  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-float: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Brago Brand Variables (Blob Specification) */
  --brago-blue: #1E4BFF;
  --brago-orange: #E8450A;
  --brago-bg-light: #F7F8FA;
  --brago-blob-bg: #E1E7FF;
}

/* COMODATO LOGIN STYLE */
.login-page {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background-color: #FFFFFF;
  display: flex;
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.login-left-image-area {
  position: relative;
  width: 65%;
  height: 100vh;
  z-index: 1;
}

.login-main-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 85, 0, 0.15) 0%, rgba(255, 85, 0, 0.05) 100%);
  z-index: 2;
}

.login-text-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: #FFFFFF;
  z-index: 10;
}

.login-text-content h1 {
  font-size: 84px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0;
  color: #FFFFFF !important;
}

.login-text-content p {
  font-size: 84px;
  font-weight: 300;
  font-style: italic;
  margin-top: -10px;
  opacity: 0.9;
}

/* The Orange/White Swoosh */
.login-swoosh {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  pointer-events: none;
  z-index: 5;
}

.swoosh-path-mobile,
.swoosh-line-mobile {
  display: none;
}

.swoosh-path-desktop,
.swoosh-line-desktop {
  display: block;
}

.login-swoosh svg {
  width: 100%;
  height: 100%;
}

/* Right Panel (Card Area) */
.login-right-area {
  width: 35%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.brago-login-card {
  background: #0033A0;
  /* Brago Deep Blue */
  width: 90%;
  max-width: 350px;
  padding: 48px 32px;
  border-radius: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-logo-img {
  width: 170px;
  margin-bottom: 40px;
  filter: brightness(0) invert(1);
}

.comodato-form {
  width: 100%;
}

.comodato-label {
  display: block;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
  margin-left: 4px;
  opacity: 0.9;
}

.comodato-input-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.comodato-input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: none;
  background: #FFFFFF;
  padding: 0 18px;
  font-size: 14px;
  color: #333;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.comodato-password-toggle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.comodato-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 40px;
}

.comodato-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
  font-size: 13px;
  cursor: pointer;
}

.comodato-forgot {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.comodato-btn {
  width: 100%;
  height: 52px;
  background: #FF5500;
  border: none;
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 10px 20px rgba(255, 85, 0, 0.3);
}

.comodato-btn:hover {
  background: #FF6611;
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(255, 85, 0, 0.4);
}

.comodato-btn:active {
  transform: translateY(0);
}

.comodato-btn-pwa {
  margin-top: 16px;
  width: 100%;
  height: 52px;
  background: #FFFFFF !important;
  border: 2px solid var(--primary) !important;
  border-radius: 12px;
  color: var(--primary) !important;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.comodato-btn-pwa:hover {
  background: var(--primary-light) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}


.comodato-footer {
  position: absolute;
  bottom: 24px;
  right: 48px;
  font-size: 13px;
  color: #999;
}

/* Responsive */
@media (max-width: 992px) {
  .login-page {
    flex-direction: column;
    overflow-y: auto;
    background: #FFFFFF;
    display: block;
    /* Ensure it stacks */
  }

  .login-left-image-area {
    width: 100%;
    height: 50vh;
    min-height: 400px;
    position: relative;
  }

  .login-image-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
  }

  .login-text-content {
    left: 32px;
    top: 35%;
    transform: translateY(-50%);
    width: 80%;
  }

  .login-text-content h1,
  .login-text-content p {
    font-size: 42px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  }

  .swoosh-path-desktop,
  .swoosh-line-desktop {
    display: none;
  }

  .swoosh-path-mobile,
  .swoosh-line-mobile {
    display: block;
  }

  .login-swoosh {
    position: absolute;
    top: 25vh;
    left: 0;
    height: 35vh;
    width: 100%;
    z-index: 2;
    right: auto;
    transform: none;
  }

  .login-right-area {
    width: 100%;
    padding: 0 24px 60px 24px;
    margin-top: -120px;
    /* Stronger overlap as in reference */
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .brago-login-card {
    width: 100%;
    max-width: 480px;
    padding: 48px 32px;
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }

  .card-logo-img {
    width: 200px;
    margin-bottom: 40px;
  }

  .comodato-footer {
    position: relative;
    margin-top: 40px;
    width: 100%;
    text-align: center;
    color: #999;
    padding: 0 20px;
    right: auto;
    bottom: auto;
  }
}

@media (max-width: 480px) {
  .login-text-content {
    left: 20px;
  }

  .login-text-content h1,
  .login-text-content p {
    font-size: 34px;
  }

  .login-left-image-area {
    height: 45vh;
  }

  .login-right-area {
    margin-top: -100px;
    padding: 0 16px 40px 16px;
  }
}

.error-message-comodato {
  background: rgba(255, 0, 0, 0.1);
  color: #FFCCCC;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

.error-message-comodato.active {
  display: block;
}

.comodato-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

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

/* Refined Inputs for Blob Layout */
.blob-input-group {
  margin-bottom: 20px;
}

.blob-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.blob-input-wrapper {
  position: relative;
}

.blob-input {
  width: 100%;
  background: #F0F4FF;
  border: 2px solid transparent;
  border-radius: var(--radius-input);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  outline: none;
}

.blob-input:focus {
  border-color: var(--brago-blue);
  background: white;
  box-shadow: 0 0 0 4px rgba(21, 96, 189, 0.1);
}

.blob-password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  cursor: pointer;
  background: none;
  border: none;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background-color: #FFFFFF;
  border-radius: var(--radius-card);
  padding: 48px;
  box-shadow: var(--shadow-float);
  color: var(--text-primary);
  border: none;
}

.login-form-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #1C1C1E;
}

/* Floating Label Support */
.floating-group {
  position: relative;
  margin-bottom: 24px;
}

.floating-input {
  width: 100%;
  background: #F8F9FA;
  border: 1px solid #E9ECEF;
  border-radius: 10px;
  padding: 18px 16px 6px 16px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.floating-label {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 15px;
  color: #999;
  pointer-events: none;
  transition: all 0.2s ease;
}

.floating-input:focus~.floating-label,
.floating-input:not(:placeholder-shown)~.floating-label {
  top: 6px;
  font-size: 11px;
  color: var(--brago-orange);
  font-weight: 600;
}

.floating-input:focus {
  border-color: var(--brago-orange);
  background: #FFF;
  box-shadow: 0 0 0 4px rgba(232, 93, 4, 0.1);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  margin-bottom: 32px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.brago-checkbox {
  accent-color: var(--brago-orange);
  width: 16px;
  height: 16px;
}

.forgot-link {
  color: var(--brago-orange);
  font-size: 14px;
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover {
  text-decoration: underline;
}

.divider-text {
  text-align: center;
  font-size: 13px;
  color: #ADB5BD;
  margin: 32px 0;
  position: relative;
}

.divider-text::before,
.divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 25%;
  height: 1px;
  background: #E9ECEF;
}

.divider-text::before {
  left: 0;
}

.divider-text::after {
  right: 0;
}

.login-container-blob .btn-primary,
.login-card .btn-primary {
  background-color: var(--brago-blue) !important;
  color: #FFFFFF !important;
  border: none !important;
  width: 100% !important;
  border-radius: var(--radius-input) !important;
  padding: 16px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(21, 96, 189, 0.2) !important;
}

.login-container-blob .btn-primary:hover,
.login-card .btn-primary:hover {
  background-color: var(--brago-orange) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(232, 69, 10, 0.3) !important;
}

@media (max-width: 1000px) {
  .login-left-blob {
    display: none;
  }

  .login-container-blob {
    max-width: 500px;
    height: auto;
  }

  .login-right-blob {
    flex: 1;
    padding: 40px;
  }
}

.sidebar-logo-img {
  height: 32px;
  width: auto;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--system-bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.4;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

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

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

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

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

.border-danger {
  border-color: var(--danger) !important;
}

.btn-outline.text-danger:hover {
  background-color: var(--danger);
  color: white !important;
}

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

.text-blue {
  color: var(--system-blue);
}

.label-uppercase {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.app-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar-header {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
}

.sidebar-header .logo-icon {
  font-size: 24px;
  color: var(--primary);
}

.sidebar-header .logo-text {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.5px;
}

.sidebar-header .logo-text span {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 600;
  padding: 16px 24px 8px 24px;
}

.nav-section-divider {
  height: 1px;
  background-color: var(--separator);
  margin: 12px 24px;
  opacity: 0.5;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 12px;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
}

.nav-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
}

.nav-item:active {
  transform: scale(0.96);
}

.nav-item.active {
  background-color: rgba(30, 75, 255, 0.04);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

.nav-item i {
  font-size: 18px;
}

.nav-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--separator);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.user-info-text {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.user-role {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background-color: transparent;
}

.header-left h2 {
  font-size: 28px;
  margin: 0;
}

.header-left {
  display: flex;
  align-items: center;
}

.toggle-sidebar {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 16px;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px 32px 32px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.card {
  background-color: var(--surface-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-subtle);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--separator);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-control {
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--separator);
  border-radius: var(--radius-input);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background-color: var(--surface-bg);
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-tertiary);
  font-size: 18px;
}

.input-icon-wrapper .input-control {
  padding-left: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-input);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.96);
}

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

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

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-secondary {
  background-color: var(--input-bg);
  border: 1px solid var(--separator);
  color: var(--text-primary);
}

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

.btn-pill {
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 13px;
}

.btn-icon {
  padding: 8px;
  border-radius: 8px;
  background: none;
  color: var(--text-secondary);
  border: none;
}

.btn-icon:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

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

.badge-success {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success);
}

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

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

.badge-secondary {
  background-color: #F3F4F6;
  color: var(--text-secondary);
  border: 1px solid var(--separator);
}

.segmented-control {
  display: inline-flex;
  background-color: #FA8C6A;
  border-radius: 999px;
  padding: 0;
  margin-bottom: 24px;
  position: relative;
  height: 38px;
  min-width: 240px;
  user-select: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
  overflow: hidden;
}

.segmented-control:active {
  transform: scale(0.96);
}

.segmented-slider {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #E8450A;
  border-radius: 999px;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.segmented-item {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  z-index: 2;
  transition: opacity 0.3s ease;
  opacity: 0.75;
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  font-family: 'Inter', sans-serif;
  padding: 0 12px;
}

.segmented-item.active {
  opacity: 1;
}

/* Ripple Effect */
.ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
  z-index: 3;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  border-bottom: 1px solid var(--separator);
}

td {
  padding: 18px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--separator);
  vertical-align: middle;
  color: var(--text-secondary);
  font-weight: 400;
}

td strong,
td .text-primary {
  color: var(--text-primary);
  font-weight: 500;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: #F9FAFB;
}

tr.gestor-row:hover td {
  background-color: #F0F4FF;
}

tr .row-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}

tr:hover .row-actions {
  opacity: 1;
}

.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 24px;
}

.tab-item {
  padding: 12px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.tab-item:hover {
  color: var(--text-primary);
}

.tab-item.active {
  color: var(--text-primary);
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px 2px 0 0;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
  background: var(--system-bg);
  background-image: radial-gradient(circle at top right, rgba(255, 149, 0, 0.05), transparent 40%), radial-gradient(circle at bottom left, rgba(0, 122, 255, 0.05), transparent 40%);
}

.login-card {
  width: 380px;
  background-color: var(--surface-bg);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow-float);
  border: 0.5px solid rgba(255, 255, 255, 0.8);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-icon {
  width: 80px;
  height: 80px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  color: white;
  font-size: 40px;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--input-bg);
  border-radius: 10px;
  padding: 0 12px;
  height: 44px;
  width: 100%;
  margin-bottom: 16px;
}

.search-bar i {
  color: var(--text-tertiary);
  font-size: 20px;
  margin-right: 8px;
}

.search-bar input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
}

.kpi-band {
  display: flex;
  background-color: var(--surface-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  margin-bottom: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.kpi-band-item {
  flex: 1;
  min-width: 0;
  padding: 24px;
  border-right: 1px solid var(--separator);
  position: relative;
}

.kpi-band-item:last-child {
  border-right: none;
}

.kpi-band-item.blue {
  box-shadow: inset 3px 0 0 var(--system-blue);
}

.kpi-band-item.green {
  box-shadow: inset 3px 0 0 var(--success);
}

.kpi-band-item.red {
  box-shadow: inset 3px 0 0 var(--danger);
}

/* Kanban e Matriz (Cronograma) */
.week-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-top: 16px;
}

.day-col {
  flex: 1;
  min-width: 200px;
  background-color: var(--surface-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
}

.today-col {
  border: 2px solid var(--primary);
  background-color: #F8FAFC;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.day-date-info {
  display: flex;
  flex-direction: column;
}

.day-name {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.day-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.day-progress {
  width: 100%;
  height: 4px;
  background-color: var(--separator);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.day-progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 2px;
}

/* Matrix Table Styles */
.matrix-container {
  overflow-x: auto;
  background-color: var(--surface-bg);
  border-radius: var(--radius-card);
  border: 1px solid #EDEDEB;
  box-shadow: var(--shadow-subtle);
  margin-top: 16px;
  padding-bottom: 8px;
}

.matrix-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  border-bottom: 1px solid #EDEDEB;
  border-right: 1px solid #EDEDEB;
  padding: 12px;
  vertical-align: middle;
}

.matrix-table th:last-child,
.matrix-table td:last-child {
  border-right: none;
}

.matrix-table th {
  background-color: #FBFBFA;
  padding: 16px 20px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 20;
}

.matrix-table th .day-header-content {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.matrix-table th .day-name {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  text-transform: capitalize;
}

.matrix-table th .day-num {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.matrix-table th.is-today {
  border-bottom: 2px solid var(--primary);
}

.matrix-table th.is-today .day-name,
.matrix-table th.is-today .day-num {
  color: var(--primary);
}

.matrix-sticky-col {
  position: sticky;
  left: 0;
  background-color: var(--surface-bg);
  z-index: 25;
  width: 220px;
  border-right: 1px solid #EDEDEB !important;
}

.matrix-table th.matrix-sticky-col {
  background-color: #FBFBFA;
  z-index: 30;
  color: #888;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.matrix-cell {
  min-height: 100px;
  background-color: transparent;
  transition: background-color 0.2s;
}

.matrix-cell:hover {
  background-color: rgba(0, 0, 0, 0.01);
}

.matrix-cell.drag-over {
  background-color: rgba(30, 75, 255, 0.05);
}

/* Task Cards */
.task-card {
  background-color: var(--system-bg);
  border: 1px solid var(--separator);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

.task-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-cod {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.task-local {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Compact Task Cards for Matrix */
.matrix-task-card {
  background-color: #ffffff;
  border: 1px solid var(--separator);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-left: 3px solid var(--system-blue);
}

.matrix-task-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.matrix-task-card.concluida {
  border-left-color: var(--success);
}

.matrix-task-card.em_andamento {
  border-left-color: var(--primary);
}

.matrix-task-client {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.matrix-task-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-tertiary);
}

.matrix-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 8px auto 0 auto;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: var(--brago-orange);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(232, 69, 10, 0.2);
}

.matrix-add-btn:hover {
  background-color: #cc3b08;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(232, 69, 10, 0.3);
  color: white;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.kpi-icon {
  font-size: 20px;
  color: var(--text-tertiary);
}

.kpi-title {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Visão Mensal — Card Redesign Exact */
.month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .month-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .month-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

.month-card {
  background-color: #005A9C;
  border: none;
  border-radius: 32px;
  padding: 24px 28px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 90, 156, 0.2);
}

.month-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 90, 156, 0.3);
}

.month-card-blob {
  position: absolute;
  bottom: -45px;
  right: -30px;
  width: 160px;
  height: 160px;
  background-color: #E8450A;
  border: 14px solid #F96F43;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.25s ease;
  z-index: 1;
}

.month-card:hover .month-card-blob {
  transform: scale(1.05);
}

.month-abbr {
  font-weight: 800;
  font-size: 48px;
  color: #ffffff;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
  z-index: 2;
  font-family: 'Inter', sans-serif;
  position: relative;
}

.month-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  z-index: 2;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.2px;
  position: relative;
}

/* Progress Bar on Month Cards */
.month-progress-wrapper {
  width: 60%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
  margin-top: 16px;
  position: relative;
}

.month-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.month-meta-label {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  font-family: 'Inter', sans-serif;
}

.month-meta-text {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}

.month-progress-container {
  width: 100%;
  height: 10px;
  background-color: #9E9E9E;
  border-radius: 5px;
  overflow: hidden;
}

.month-progress-bar {
  height: 100%;
  background-color: #00FF55;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  background-color: var(--surface-bg);
  border-radius: var(--radius-card);
  padding: 24px;
  position: relative;
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-subtle);
}

.kpi-card::before {
  display: none;
}

.kpi-card.blue .kpi-icon {
  color: var(--system-blue);
}

.kpi-card.green .kpi-icon {
  color: var(--success);
}

/* Progress */
.progress-container {
  width: 100%;
  height: 4px;
  background-color: var(--separator);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-bar-inline-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar-inline {
  width: 80px;
  height: 6px;
  background-color: var(--separator);
  border-radius: 3px;
  overflow: hidden;
}

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background-color: var(--surface-bg);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border-left: 4px solid var(--primary);
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

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

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

.justify-end {
  justify-content: flex-end;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.w-full {
  width: 100%;
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    height: 100%;
  }

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

  .toggle-sidebar {
    display: block;
  }

  .top-header {
    padding: 0 16px;
  }

  .page-content {
    padding: 0 16px 16px 16px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    width: 90%;
    padding: 24px;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.modal-content {
  background-color: var(--surface-bg);
  border-radius: var(--radius-card);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-float);
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 0.5px solid var(--separator);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 0.5px solid var(--separator);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Agenda Modal Redesign */
.agenda-modal {
  max-width: 720px !important;
  max-height: 80vh !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  padding: 0;
}

.agenda-modal .modal-header {
  background-color: #F8F8F6;
  border-bottom: 1px solid #E8E8E4;
  padding: 20px 24px;
  border-radius: 12px 12px 0 0;
}

.agenda-modal .modal-title {
  font-weight: 600;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
}

.agenda-modal .modal-close {
  transition: all 0.2s ease;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agenda-modal .modal-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.agenda-modal .modal-body {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.agenda-table-wrapper {
  overflow: auto;
  max-height: calc(80vh - 140px);
}

.agenda-table-wrapper::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.agenda-table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.agenda-table-wrapper::-webkit-scrollbar-thumb {
  background: #C4C4BC;
  border-radius: 4px;
}

/* Agenda Table */
.agenda-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'Inter', sans-serif;
}

.agenda-table th {
  background-color: #1B3A5C;
  color: #FFFFFF;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 12px 8px;
  min-width: 80px;
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: center;
  border-bottom: 1px solid #1B3A5C;
}

.agenda-table th.col-padeiro {
  width: 180px;
  min-width: 180px;
  position: sticky;
  left: 0;
  z-index: 11;
  text-align: left;
  padding-left: 16px;
}

.agenda-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #E8E8E4;
  text-align: center;
  font-size: 12px;
}

.agenda-table tr:nth-child(even) td {
  background-color: #F5F5F3;
}

.agenda-table tr:nth-child(odd) td {
  background-color: #FFFFFF;
}

.agenda-table td.col-padeiro {
  position: sticky;
  left: 0;
  background-color: #FAFAFA !important;
  font-size: 13px;
  font-weight: 500;
  color: #2C2C2A;
  text-align: left;
  padding-left: 16px;
  border-right: 1px solid #E8E8E4;
  z-index: 5;
}

.agenda-modal .modal-footer {
  justify-content: flex-end;
  border-top: none;
  background-color: #FFFFFF;
  padding: 16px 24px;
}

.agenda-btn-close {
  border: 1.5px solid #1B3A5C;
  color: #1B3A5C;
  background-color: transparent;
  border-radius: 8px;
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.agenda-btn-close:hover {
  background-color: #1B3A5C;
  color: #FFFFFF;
}

/* Cronograma Specifics */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.week-nav h3 {
  font-size: 18px;
  font-weight: 600;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  align-items: start;
}

.day-col {
  min-width: 0;
  background-color: #F9FAFB;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--separator);
}

.day-col.today-col {
  background-color: rgba(30, 75, 255, 0.02);
  border-color: rgba(30, 75, 255, 0.2);
}

.day-header {
  padding-bottom: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-date-info {
  display: flex;
  flex-direction: column;
}

.day-name {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.day-number {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.day-col.today-col .day-number {
  color: var(--primary);
}

.day-progress {
  width: 100%;
  height: 4px;
  background-color: var(--separator);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.day-progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.task-card {
  background-color: var(--surface-bg);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 8px;
  border: 1px solid var(--separator);
  cursor: pointer;
  transition: all 0.2s ease;
}

.task-card:hover {
  border-color: var(--text-tertiary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.task-time {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  font-weight: 500;
}

.task-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-cod {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-tertiary);
}

.task-local {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.badge-outline {
  background: transparent;
  border: 1px solid currentColor;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

/* Status Dot */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.pending {
  background-color: #F59E0B;
}

.status-dot.completed {
  background-color: var(--success);
}

.status-dot.canceled {
  background-color: var(--danger);
}

/* Big note badge */
.big-score {
  text-align: center;
  margin: 20px 0;
}

.score-badge {
  display: inline-block;
  font-size: 40px;
  font-weight: 700;
  color: var(--success);
  padding: 8px 24px;
  border-radius: 16px;
  background-color: rgba(52, 199, 89, 0.1);
}

.stars-display {
  color: #FFD60A;
  font-size: 24px;
  margin-top: 8px;
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

.matrix-task-card {
  position: relative;
}

.matrix-reorder-btns {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.matrix-task-card:hover .matrix-reorder-btns {
  opacity: 1;
}

.reorder-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid var(--separator);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.reorder-btn:hover {
  background: #FDF2EF;
  color: #E8450A;
  border-color: #E8450A;
}

.drag-target-top {
  border-top: 4px solid #E8450A !important;
  transition: border 0.1s ease;
}

/* Move/Duplicate Modern Modal */
.md-modal-container {
  width: 420px !important;
  border-radius: 16px !important;
  background: #FFFFFF !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18) !important;
  padding: 28px !important;
  border: none !important;
}

.md-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
}

.md-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1A1A1A;
  margin: 0;
}

.md-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.md-modal-close:hover {
  background: #F0F0EE;
}

.md-modal-divider {
  height: 1px;
  background: #EEEDE8;
  margin: 0 -28px 20px -28px;
}

.md-info-card {
  background: #F8F7F4;
  border: 1px solid #E8E6E0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.md-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #E8E6E0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.md-info-content {
  flex: 1;
}

.md-info-client {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 4px;
}

.md-info-route {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.md-info-route b {
  color: #333;
  font-weight: 500;
}

.md-info-date-badge {
  display: inline-flex;
  align-items: center;
  background: #FFF0EB;
  color: #D94F1E;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
}

.md-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.md-action-card {
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  border: 1.5px solid #E0DEDB;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
}

.md-action-card:hover {
  border-color: #AAAAAA;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.md-action-card.selected {
  background: #FFF3EE;
  border: 2px solid #D94F1E;
}

.md-action-card:active {
  transform: scale(0.98);
}

.md-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.md-action-card.mover .md-action-icon {
  background: #EBF0FF;
  color: #4A6FFF;
}

.md-action-card.duplicar .md-action-icon {
  background: #FFE8DC;
  color: #D94F1E;
}

.md-action-name {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
}

.md-action-desc {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  text-align: center;
  font-weight: 400;
  line-height: 1.3;
}

.md-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #EEEDE8;
  margin: 0 -4px;
}

.md-btn-cancel {
  background: transparent;
  border: 1px solid #DDDBD6;
  color: #555;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.md-btn-cancel:hover {
  background: #F5F4F0;
}

.md-btn-confirm {
  background: #D94F1E;
  border: none;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.md-btn-confirm:hover {
  background: #B84018;
}

/* Floating Pill Header Styles (Used as Branch Separators) */
.baker-pill-container {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

.baker-pill {
  background: #0068B3;
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 16px 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  width: 100%;
  box-sizing: border-box;
  height: 45px;
}

.branch-pill {
  background: #0068B3;
  color: #FFFFFF;
  padding: 4px 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  z-index: 10;
  width: fit-content;
  margin-bottom: -1px;
  height: 26px;
  box-sizing: border-box;
}

.days-pill-container {
  background: #F27A54;
  border-radius: 0 16px 16px 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(242, 122, 84, 0.1);
  box-sizing: border-box;
  height: 45px;
  align-items: center;
}

.day-pill-item {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  border-radius: 14px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  height: 39px;
  box-sizing: border-box;
}

.day-pill-item.active {
  background: #E8450A;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.day-pill-item span {
  font-size: 13px;
  font-weight: 700;
}

/* Matrix Table Adjustments */
.matrix-branch-header {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.matrix-table thead {
  display: none;
}

.matrix-table th {
  background-color: #FBFBFA;
  padding: 12px 20px;
  color: #999;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-bottom: 1px solid #EDEDEB;
}

/* ============================================================
   MATRIX GRID AGENDA (DESIGN REPLICA)
   ============================================================ */
#page-container {
  padding: 24px;
  background-color: #f1f5f9;
  min-height: 100vh;
}

.filial-pill {
  background: #0066cc;
  color: #fff;
  padding: 8px 32px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 2px solid #0056b3;
}

.matrix-wrapper {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  margin-bottom: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.matrix-grid {
  display: grid;
  grid-template-columns: 200px repeat(6, 1fr);
  width: 100%;
}

.matrix-header-cell {
  padding: 12px;
  text-align: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.matrix-header-padeiros {
  background-color: #0066cc;
}

.matrix-header-day {
  background-color: #f07d58;
  /* Lighter orange from image */
}

.matrix-header-day.is-today {
  background-color: #e05c2a;
  /* Stronger orange for today */
}

.matrix-padeiro-cell {
  background-color: #f8fafc;
  padding: 20px 15px;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.matrix-padeiro-name {
  color: #1e293b;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.matrix-padeiro-cod {
  color: #64748b;
  font-size: 10px;
  margin-top: 4px;
  font-weight: 600;
}

.matrix-day-cell {
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  position: relative;
}

.matrix-cell-content {
  flex: 1;
}

.matrix-card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.matrix-card.card-border-amber {
  border-left: 4px solid #f59e0b;
}

.matrix-card.card-border-blue {
  border-left: 4px solid #1e4bff;
}

.matrix-card.card-border-success {
  border-left: 4px solid #10b981;
}

.matrix-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.matrix-status-badge.badge-amber {
  background-color: #fef3c7;
  color: #92400e;
}

.matrix-status-badge.badge-blue {
  background-color: #dbeafe;
  color: #1e40af;
}

.matrix-status-badge.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.matrix-card-status-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 16px;
}

.matrix-card-status-icon.status-pendente {
  color: #f59e0b;
  opacity: 0.3;
}

.matrix-card-status-icon.status-em_andamento {
  color: #1e4bff;
}

.matrix-card-status-icon.status-concluida {
  color: #10b981;
}

.matrix-add-btn {
  background: #e05c2a;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 0;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(224, 92, 42, 0.3);
}

.matrix-add-btn:hover {
  transform: scale(1.1);
  background: #d04a1b;
  box-shadow: 0 6px 12px rgba(224, 92, 42, 0.4);
}

/* Responsividade Básica */
@media (max-width: 1024px) {
  .matrix-grid {
    grid-template-columns: 150px repeat(6, 150px);
    overflow-x: auto;
  }

  .matrix-wrapper {
    overflow-x: auto;
  }
}

/* ============================================================
   ACTIVITY REGISTRATION FLOW (NEW DESIGN)
   ============================================================ */
.activity-flow-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
}

.activity-header-icon {
  background: #eef2ff;
  color: #2563eb;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

/* Stepper Moderno */
.activity-stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 50px;
  position: relative;
  padding: 0 10px;
}

.activity-stepper::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #64748b;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.step-item.active .step-circle {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.step-item.active .step-label {
  color: #2563eb;
}

.step-item.completed .step-circle {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.step-item.completed .step-label {
  color: #10b981;
}

/* Card do Formulário */
.activity-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.5);
  margin-bottom: 30px;
}

.activity-step-title {
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  margin-bottom: 8px;
}

.activity-step-subtitle {
  font-size: 14px;
  color: #64748b;
  text-align: center;
  margin-bottom: 32px;
}

/* Campos customizados */
.activity-select-wrapper {
  position: relative;
  margin-bottom: 30px;
}

.activity-select-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  z-index: 5;
}

.activity-select {
  width: 100%;
  height: 56px;
  padding: 0 16px 0 48px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: 16px;
  color: #1e293b;
  background: #f8fafc;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s;
}

.activity-select:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* Botão Gradiente */
.btn-activity-primary {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: #fff;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-activity-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-activity-primary:active {
  transform: translateY(0);
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .activity-stepper::before {
    display: none;
  }

  .step-label {
    display: none;
  }

  .activity-card {
    padding: 24px;
  }
}

/* Grid de Fotos */
#foto-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  #foto-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.photo-add-slot {
  aspect-ratio: 1;
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}

.photo-add-slot:hover {
  background: #f1f5f9;
  border-color: #2563eb;
  color: #2563eb;
}

.photo-add-slot i {
  width: 24px;
  height: 24px;
}

.photo-add-slot span {
  font-size: 11px;
  font-weight: 600;
}

.photo-preview-slot {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.photo-preview-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.remove-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform 0.2s;
}

.remove-photo:hover {
  transform: scale(1.15);
  background: #ef4444;
}

.remove-photo i {
  width: 14px;
  height: 14px;
}

/* ============================================================
   RASTREAMENTO (REAL-TIME TRACKING)
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.status-badge.connected {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-badge.disconnected {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.5;
  }
}

.map-card {
  background: var(--surface-bg);
  border-radius: 16px;
  padding: 8px;
  border: 1px solid var(--separator);
  margin-bottom: 24px;
}

.track-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.track-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--surface-bg);
  border: 1px solid var(--separator);
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.track-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.track-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.map-popup {
  padding: 4px;
  font-family: 'Inter', sans-serif;
}

.map-popup strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--primary);
}

.map-popup span {
  font-size: 12px;
  color: var(--text-secondary);
}

.matrix-task-card.em_andamento {
  border-left: 4px solid #1e4bff;
}

.matrix-task-card.concluida {
  border-left: 4px solid #10b981;
}

.matrix-task-card.pendente {
  border-left: 4px solid #f59e0b;
}

/* Estilos para botões de reordenação e exclusão no card da matriz */
.matrix-reorder-btns {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.matrix-task-card:hover .matrix-reorder-btns {
  opacity: 1;
}

.reorder-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--separator);
  border-radius: 4px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.reorder-btn:hover {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.reorder-btn.delete-btn {
  margin-top: 2px;
}

.reorder-btn.delete-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background-color: #fff;
}

.reorder-btn i {
  width: 12px;
  height: 12px;
}

/* ============================================================
   PADEIRO DASHBOARD — PREMIUM REDESIGN
   ============================================================ */

/* Dashboard Container */
.pd-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  animation: pdFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pdFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

/* ---- Hero Section ---- */
.pd-hero {
  position: relative;
  border-radius: 20px;
  padding: 36px 40px;
  margin-bottom: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #1E4BFF 100%);
  box-shadow: 0 8px 32px rgba(30, 75, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pd-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(30, 75, 255, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(232, 69, 10, 0.15) 0%, transparent 40%);
  animation: pdHeroPulse 8s ease-in-out infinite alternate;
}

@keyframes pdHeroPulse {
  0% {
    opacity: 0.8;
  }

  100% {
    opacity: 1;
  }
}

.pd-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pd-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pd-avatar-ring {
  position: relative;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8450A, #FFD60A, #1E4BFF);
  animation: pdRingRotate 6s linear infinite;
}

@keyframes pdRingRotate {
  from {
    filter: hue-rotate(0deg);
  }

  to {
    filter: hue-rotate(360deg);
  }
}

.pd-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.pd-greeting {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  margin-bottom: 2px;
}

.pd-hero-name {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pd-hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pd-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pd-hero-badge-code {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

.pd-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.pd-date-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.pd-cta-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #E8450A 0%, #FF6B35 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(232, 69, 10, 0.35), 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.pd-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pd-cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(232, 69, 10, 0.45), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pd-cta-btn:hover::before {
  opacity: 1;
}

.pd-cta-btn:active {
  transform: translateY(0) scale(0.98);
}

.pd-cta-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- KPI Cards Row ---- */
.pd-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.pd-kpi-card {
  position: relative;
  background: var(--surface-bg);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--separator);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pdKpiIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pdKpiIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

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

.pd-kpi-card:nth-child(1) {
  animation-delay: 0.1s;
}

.pd-kpi-card:nth-child(2) {
  animation-delay: 0.2s;
}

.pd-kpi-card:nth-child(3) {
  animation-delay: 0.3s;
}

.pd-kpi-card:nth-child(4) {
  animation-delay: 0.4s;
}

.pd-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.pd-kpi-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.08;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pd-kpi-card:hover .pd-kpi-glow {
  opacity: 0.15;
  transform: scale(1.3);
}

.pd-kpi-blue .pd-kpi-glow {
  background: #1E4BFF;
}

.pd-kpi-green .pd-kpi-glow {
  background: #10b981;
}

.pd-kpi-amber .pd-kpi-glow {
  background: #f59e0b;
}

.pd-kpi-purple .pd-kpi-glow {
  background: #8b5cf6;
}

.pd-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.pd-kpi-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.pd-kpi-card:hover .pd-kpi-icon-wrap {
  transform: scale(1.1) rotate(-5deg);
}

.pd-icon-blue {
  background: rgba(30, 75, 255, 0.1);
  color: #1E4BFF;
}

.pd-icon-green {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.pd-icon-amber {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.pd-icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.pd-kpi-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.pd-trend-up {
  color: #10b981;
}

.pd-kpi-value {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.pd-kpi-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-left: 2px;
}

.pd-kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ---- Main Grid (Progress + Perf) ---- */
.pd-main-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-bottom: 28px;
}

/* ---- Progress Card ---- */
.pd-progress-card,
.pd-perf-card,
.pd-activities-card {
  background: var(--surface-bg);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--separator);
  transition: all 0.3s ease;
  animation: pdCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.3s;
  overflow: hidden;
  /* Prevent horizontal overflow from negative margins */
}

@keyframes pdCardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.pd-perf-card {
  animation-delay: 0.4s;
}

.pd-activities-card {
  animation-delay: 0.5s;
}

.pd-progress-card:hover,
.pd-perf-card:hover,
.pd-activities-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.pd-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.pd-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pd-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.pd-card-badge {
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(30, 75, 255, 0.06);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

/* Progress Body */
.pd-progress-body {
  display: flex;
  align-items: center;
  gap: 32px;
}

.pd-progress-ring-container {
  position: relative;
  flex-shrink: 0;
}

.pd-progress-ring {
  transform: rotate(-90deg);
}

.pd-ring-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 8;
}

.pd-ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pd-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pd-ring-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
}

.pd-ring-label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.pd-progress-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pd-detail-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.pd-detail-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.pd-detail-divider {
  height: 1px;
  background: var(--separator);
}

.pd-progress-bar-section {
  margin-top: 4px;
}

.pd-bar-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.pd-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.pd-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: pdShimmer 2s infinite;
}

@keyframes pdShimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Empty Meta State */
.pd-empty-meta {
  text-align: center;
  padding: 32px 20px;
}

.pd-empty-meta .pd-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--text-tertiary);
}

.pd-empty-meta p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pd-empty-meta span {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---- Performance Card ---- */
.pd-perf-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-perf-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: default;
}

.pd-perf-item:hover {
  background: #f8fafc;
}

.pd-perf-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pd-perf-blue {
  background: rgba(30, 75, 255, 0.08);
  color: #1E4BFF;
}

.pd-perf-green {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}

.pd-perf-amber {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
}

.pd-perf-purple {
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
}

.pd-perf-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.pd-perf-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.pd-perf-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

/* ---- Activities Card ---- */
.pd-activity-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 20px;
}

.pd-table-wrapper {
  overflow-x: auto;
  margin: 0 -28px -28px;
  padding: 0 28px 28px;
}

.pd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pd-table thead th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--separator);
  text-align: left;
  white-space: nowrap;
}

.pd-table-row {
  transition: all 0.2s ease;
}

.pd-table-row:hover td {
  background: rgba(30, 75, 255, 0.02);
}

.pd-table-row td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  transition: background 0.2s ease;
}

.pd-table-row:last-child td {
  border-bottom: none;
}

/* Date cell */
.pd-date-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 44px;
  padding: 6px 0;
  border-radius: 10px;
  background: #f8fafc;
}

.pd-date-day {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.pd-date-month {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Client cell */
.pd-client-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pd-client-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1E4BFF, #4a6fff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.pd-client-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* KG Badge */
.pd-kg-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(30, 75, 255, 0.06);
  color: #1E4BFF;
  font-size: 13px;
  font-weight: 700;
}

.pd-no-rating {
  color: var(--text-tertiary);
  font-size: 14px;
}

/* Status badges */
.pd-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pd-status-done {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}

.pd-status-progress {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
}

/* Empty Activities */
.pd-empty-activities {
  text-align: center;
  padding: 40px 20px;
}

.pd-empty-activities .pd-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--text-tertiary);
}

.pd-empty-activities p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pd-empty-activities span {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .pd-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .pd-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .pd-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .pd-hero-right {
    align-items: flex-start;
    width: 100%;
  }

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

@media (max-width: 640px) {
  .pd-hero {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .pd-hero-name {
    font-size: 22px;
  }

  .pd-kpi-row {
    grid-template-columns: 1fr;
  }

  .pd-kpi-value {
    font-size: 28px;
  }

  .pd-progress-body {
    flex-direction: column;
    text-align: center;
  }

  .pd-progress-details {
    width: 100%;
  }

  .pd-progress-card,
  .pd-perf-card,
  .pd-activities-card {
    padding: 20px;
    border-radius: 14px;
  }

  .pd-table-wrapper {
    margin: 0 -20px -20px;
    padding: 0 20px 20px;
  }
}

/* ============================================================
   RESPONSIVIDADE (TABLET: 431px a 1024px)
   ============================================================ */
.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 431px) and (max-width: 1024px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    height: 100%;
    z-index: 1001;
  }

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

  .toggle-sidebar {
    display: block;
  }

  .top-header {
    padding: 0 16px;
  }

  .page-content {
    padding: 0 16px 16px 16px;
  }

  .kpi-grid,
  .pd-kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .month-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .pd-main-grid {
    grid-template-columns: 1fr;
  }

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

  .matrix-wrapper,
  .matrix-container,
  .agenda-table-wrapper,
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .matrix-grid {
    min-width: 900px;
  }

  .pd-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .pd-hero-right {
    align-items: flex-start;
    width: 100%;
    margin-top: 16px;
  }
}

/* ============================================================
   RESPONSIVIDADE (MOBILE / iPHONE 14 PRO MAX: max 430px)
   ============================================================ */
@media (max-width: 430px) {

  /* Apple HIG Tokens */
  :root {
    --apple-blue: #1C7EF2;
    --apple-green: #34C759;
    --apple-orange: #FF9500;
    --apple-red: #FF3B30;
    --apple-gray: #8E8E93;
    --apple-bg: #F2F2F7;
    --apple-surface: #FFFFFF;
    --apple-separator: #E5E5EA;
    --apple-label: #000000;
    --radius-card: 16px;
    --radius-pill: 999px;
    --radius-icon: 12px;
    --radius-segment: 10px;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-button: 0 4px 14px rgba(28, 126, 242, 0.3);
  }

  .mobile-only {
    display: block !important;
  }

  .desktop-only {
    display: none !important;
  }

  /* Apple Segmented Control */
  .apple-segmented-control {
    background: #E5E5EA;
    border-radius: 10px;
    padding: 2px;
    display: flex;
    height: 36px;
    margin: 0 16px 20px 16px;
    position: relative;
  }

  .apple-segmented-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: #8E8E93;
    z-index: 2;
    transition: color 0.2s ease;
    cursor: pointer;
  }

  .apple-segmented-item.active {
    color: #000000;
  }

  .apple-segmented-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    height: 32px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
    z-index: 1;
  }

  /* Metric Cards */
  .apple-metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 20px;
  }

  .apple-metric-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
  }

  .apple-metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .apple-metric-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .apple-metric-icon-box.blue {
    background: rgba(28, 126, 242, 0.1);
    color: #1C7EF2;
  }

  .apple-metric-icon-box.green {
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
  }

  .apple-metric-icon-box.orange {
    background: rgba(255, 149, 0, 0.1);
    color: #FF9500;
  }

  .apple-metric-trend {
    color: #8E8E93;
    font-size: 18px;
  }

  .apple-metric-label {
    color: #8E8E93;
    font-size: 13px;
    font-weight: 400;
  }

  .apple-metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 4px 0;
  }

  /* Section Header */
  .apple-section-header {
    padding: 0 16px;
    margin-bottom: 20px;
  }

  .apple-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .apple-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
  }

  .apple-month-pill {
    background: #E5E5EA;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: #000000;
  }

  .apple-button-row {
    display: flex;
    gap: 8px;
  }

  .apple-btn {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
  }

  .apple-btn-primary {
    background: #1C7EF2;
    color: #FFFFFF;
  }

  .apple-btn-secondary {
    background: transparent;
    border: 1px solid #E5E5EA;
    color: #8E8E93;
  }

  /* Padeiro Cards */
  .apple-padeiros-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
  }

  .apple-padeiro-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  }

  .apple-padeiro-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .apple-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #FFFFFF;
  }

  .apple-padeiro-name {
    font-size: 15px;
    font-weight: 700;
    color: #000000;
  }

  .apple-meta-info {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
  }

  .apple-info-item {
    display: flex;
    flex-direction: column;
  }

  .apple-info-label {
    font-size: 12px;
    color: #8E8E93;
  }

  .apple-info-value {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
  }

  .apple-progress-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .apple-progress-container {
    flex: 1;
    height: 6px;
    background: #E5E5EA;
    border-radius: 999px;
    overflow: hidden;
  }

  .apple-progress-fill {
    height: 100%;
    background: #1C7EF2;
    border-radius: 999px;
    transition: width 0.3s ease;
  }

  .apple-progress-percent {
    font-size: 13px;
    font-weight: 700;
    color: #000000;
    min-width: 35px;
    text-align: right;
  }

  .apple-status-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
  }

  .apple-status-badge.pending {
    background: rgba(255, 149, 0, 0.1);
    color: #FF9500;
  }

  .apple-status-badge.success {
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
  }

  .apple-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: -30px;
  }

  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    height: 100%;
    z-index: 1001;
  }

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

  .toggle-sidebar {
    display: block;
  }

  .top-header {
    padding: 0 12px;
  }

  .page-content {
    padding: 0 12px 12px 12px;
  }

  /* Ajuste KPIs */
  .kpi-grid,
  .pd-kpi-row {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .kpi-band {
    flex-direction: column;
    overflow: visible;
  }

  .kpi-band-item {
    border-right: none !important;
    border-bottom: 1px solid var(--separator);
    width: 100%;
    padding: 16px;
  }

  .kpi-band-item:last-child {
    border-bottom: none;
  }

  .month-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pd-main-grid {
    grid-template-columns: 1fr;
  }

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

  /* Cronograma e Tabelas */
  .matrix-wrapper,
  .matrix-container,
  .agenda-table-wrapper,
  .table-responsive {
    overflow-x: auto !important;
    display: block;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .matrix-grid {
    min-width: 800px;
    grid-template-columns: 120px repeat(6, 120px) !important;
  }

  .matrix-padeiro-cell {
    padding: 10px;
  }

  .matrix-padeiro-name {
    font-size: 11px;
  }

  .login-card {
    width: calc(100% - 32px) !important;
    margin: 0 16px !important;
    padding: 24px !important;
    box-sizing: border-box;
  }

  .login-container-blob {
    max-width: 100%;
    margin: 16px;
    height: auto;
    min-height: 500px;
  }

  .login-right-blob {
    padding: 24px;
  }

  .pd-hero {
    padding: 20px 16px;
  }

  .pd-hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pd-hero-right {
    align-items: flex-start;
    width: 100%;
  }

  .pd-hero-name {
    font-size: 18px;
  }

  .pd-kpi-card {
    padding: 14px;
  }

  .pd-kpi-value {
    font-size: 24px;
  }

  .pd-progress-body {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .pd-progress-details {
    width: 100%;
  }

  .pd-progress-card,
  .pd-perf-card,
  .pd-activities-card {
    padding: 16px;
  }

  .pd-table-wrapper {
    margin: 0 -16px -16px;
    padding: 0 16px 16px;
  }

  .btn,
  .input-control,
  .pd-cta-btn,
  .matrix-add-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .segmented-control {
    width: 100%;
    min-width: auto;
  }

  .baker-pill {
    font-size: 9px;
    padding: 8px;
  }

  .day-pill-item {
    font-size: 10px;
  }

  .day-pill-item span {
    font-size: 10px;
  }
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

/* ============================================================
   iOS HIG MOBILE HEADER — GLOBAL COMPONENT
   Apple-style glassmorphism nav bar + search + large title
   Only applies to mobile viewports (≤430px)
   ============================================================ */

/* Hide iOS header on desktop */
.ios-header {
  display: none;
}

.ios-drawer-overlay {
  display: none;
}

@media (max-width: 430px) {

  /* Hide desktop header on mobile */
  .ios-desktop-header {
    display: none !important;
  }

  /* Show iOS header */
  .ios-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0px);
  }

  /* ---- LINE 1: NAV BAR (Glassmorphism) ---- */
  .ios-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: relative;
    z-index: 10;
  }

  /* Nav buttons — 44×44 touch targets */
  .ios-nav-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #1D1D1F;
    padding: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    border-radius: 50%;
    transition: background-color 0.15s ease;
  }

  .ios-nav-btn:active {
    background-color: rgba(0, 0, 0, 0.06);
  }

  /* Center: Logo + Nav Title (animated) */
  .ios-navbar-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  .ios-logo-text {
    font-size: 17px;
    font-weight: 700;
    color: #1D1D1F;
    letter-spacing: -0.3px;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .ios-nav-title {
    font-size: 17px;
    font-weight: 600;
    color: #1D1D1F;
    letter-spacing: -0.2px;
    position: absolute;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .ios-nav-title.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .ios-nav-title.visible~.ios-logo-text {
    opacity: 0;
    transform: translateY(-8px);
  }

  /* Right action buttons */
  .ios-navbar-right {
    display: flex;
    align-items: center;
    gap: 0;
  }

  /* Notification badge */
  .ios-notif-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 16px;
    height: 16px;
    background: #FF3B30;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    line-height: 1;
  }

  /* Avatar circle */
  .ios-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E4BFF, #4a6fff);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
  }

  /* ---- LINE 2: SEARCH BAR ---- */
  .ios-search-row {
    padding: 0 16px 8px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }

  .ios-search-bar {
    display: flex;
    align-items: center;
    height: 36px;
    background: rgba(120, 120, 128, 0.12);
    border-radius: 10px;
    padding: 0 12px;
    gap: 6px;
  }

  .ios-search-bar i {
    color: #8E8E93;
    flex-shrink: 0;
  }

  .ios-search-bar input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 15px;
    color: #1D1D1F;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
  }

  .ios-search-bar input::placeholder {
    color: #8E8E93;
    font-size: 15px;
  }

  /* ---- LINE 3: LARGE TITLE ---- */
  .ios-large-title-row {
    padding: 8px 16px 4px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease;
    max-height: 60px;
    overflow: hidden;
  }

  .ios-large-title-row.collapsed {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .ios-large-title {
    font-size: 28px;
    font-weight: 700;
    color: #1D1D1F;
    letter-spacing: -0.3px;
    margin: 0;
    line-height: 1.15;
  }

  /* ---- SEPARATOR (on scroll) ---- */
  .ios-header-separator {
    height: 0.5px;
    background: rgba(0, 0, 0, 0);
    transition: background-color 0.2s ease;
  }

  .ios-header-separator.visible {
    background: rgba(0, 0, 0, 0.15);
  }

  /* ---- DRAWER OVERLAY ---- */
  .ios-drawer-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    pointer-events: none;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .ios-drawer-overlay.active {
    background: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
  }

  /* Sidebar drawer animation */
  .sidebar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none;
  }

  .sidebar.mobile-open {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  /* Adjust page-content to scroll under sticky header */
  .main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .page-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Override toggle-sidebar display since iOS header has its own menu btn */
  .toggle-sidebar {
    display: none !important;
  }
}

/* Tablet breakpoint — also show iOS header */
@media (min-width: 431px) and (max-width: 768px) {
  .ios-desktop-header .toggle-sidebar {
    display: block;
  }
}