/**
 * Gestão Tempo – tema visual (navy + accent)
 * Alinhado ao design habitual dos painéis TS Informática
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@600;700&display=swap');

:root {
  --bg: #f4f5f8;
  --bg-page: #ffffff;
  --card: #ffffff;
  --text: #1e1e3a;
  --muted: #6b6f86;
  --accent: #3d5afe;
  --accent-hover: #2f48d8;
  --accent-light: rgba(61, 90, 254, 0.1);
  --accent-soft: rgba(61, 90, 254, 0.16);
  --accent-rgb: 61, 90, 254;
  --navy: #13134c;
  --navy-mid: #1a1a5c;
  --teal: #0d9488;
  --border: #e4e6ef;
  --success: #0d9488;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --shadow: 0 1px 3px rgba(19, 19, 76, 0.06);
  --shadow-md: 0 8px 28px rgba(19, 19, 76, 0.1);
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'DM Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

/* ——— Base ——— */
body {
  font-family: var(--font) !important;
  background: var(--bg) !important;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body.sidebar-mini .main-sidebar .sidebar-brand,
h1, h2, h3, h4, h5, h6,
.navbar-brand,
.login-brand-title,
.section .section-header h1 {
  font-family: var(--font-display) !important;
}

/* ——— Cores primárias (override Stisla #6777ef) ——— */
.bg-primary,
.btn-primary,
.btn-primary.disabled,
.badge-primary,
.card.card-primary,
.shadow-primary,
.page-item.active .page-link,
.nav-pills .nav-link.active,
.custom-control-input:checked ~ .custom-control-label::before,
.custom-radio .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.disabled:hover {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.35) !important;
}

.text-primary,
a:not(.btn):not(.dropdown-item):not(.nav-link) {
  color: var(--accent) !important;
}

a:not(.btn):not(.dropdown-item):hover {
  color: var(--accent-hover) !important;
}

.btn-outline-primary {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}
.btn-outline-primary:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

.btn-info {
  background: var(--info) !important;
  border-color: var(--info) !important;
}
.btn-success {
  background: var(--success) !important;
  border-color: var(--success) !important;
}
.btn-danger {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}
.btn-danger .fas,
.btn-danger .far,
.btn-action .fas,
.btn-action .far {
  color: #fff !important;
  margin-left: 0 !important;
}
.btn-action {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
}
.btn-warning {
  background: var(--warning) !important;
  border-color: var(--warning) !important;
  color: #fff !important;
}

.btn {
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
}
.btn:hover {
  transform: translateY(-1px);
}

.form-control:focus,
.custom-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15) !important;
}

/* ——— Navbar ——— */
.navbar-bg {
  background: linear-gradient(115deg, var(--navy) 0%, var(--navy-mid) 55%, #25258a 100%) !important;
  height: 70px !important;
}

.main-navbar {
  background: transparent !important;
}

.main-navbar .navbar-brand {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  letter-spacing: -0.02em;
  opacity: 1 !important;
}

.main-navbar .nav-link,
.main-navbar .nav-link-user,
.main-navbar .d-sm-none.d-lg-inline-block {
  color: rgba(255, 255, 255, 0.92) !important;
}

.main-navbar .nav-link:hover {
  color: #fff !important;
}

.main-navbar .dropdown-menu {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 0.4rem !important;
}

.main-navbar .dropdown-item {
  border-radius: 8px !important;
  font-weight: 500;
}

.main-navbar .dropdown-item:hover {
  background: var(--accent-light) !important;
  color: var(--accent) !important;
}

/* Sem sidebar — conteúdo a full width */
.main-content,
.main-footer {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.main-content {
  padding-top: 95px !important;
  min-height: calc(100vh - 100px);
}

.main-content > .section {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.main-footer {
  max-width: 1280px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

/* ——— Cards ——— */
.card {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  background: var(--card) !important;
  overflow: hidden;
}

.card .card-header {
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
  min-height: auto !important;
  padding: 1.15rem 1.35rem !important;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card .card-header h4 {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  font-size: 1.05rem !important;
  letter-spacing: -0.01em;
}

.card .card-header-action .btn {
  margin: 2px !important;
}

.card.card-primary {
  border-top: none !important;
}

.card.card-primary .card-header {
  background: transparent !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
}

.card.card-primary .card-header h4 {
  color: var(--text) !important;
}

/* Estatísticas */
.card.card-statistic-2 {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.card.card-statistic-2:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md) !important;
}

.card.card-statistic-2 .card-icon {
  width: 54px !important;
  height: 54px !important;
  margin: 18px 10px 18px 18px !important;
  border-radius: 14px !important;
  background: var(--accent) !important;
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35) !important;
  line-height: 54px !important;
}

.card.card-statistic-2 .card-icon .fas,
.card.card-statistic-2 .card-icon .far {
  font-size: 22px !important;
  line-height: 54px !important;
}

.card.card-statistic-2 .card-header h4 {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--muted) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: var(--font) !important;
}

.card.card-statistic-2 .card-body {
  font-family: var(--font-display) !important;
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  letter-spacing: -0.03em;
}

/* Badges */
.badge {
  border-radius: 8px !important;
  font-weight: 600 !important;
  padding: 0.4em 0.7em !important;
  letter-spacing: 0.01em;
}

.badge-warning {
  background: rgba(217, 119, 6, 0.14) !important;
  color: #b45309 !important;
}

.badge-success {
  background: rgba(13, 148, 136, 0.14) !important;
  color: #0f766e !important;
}

.badge-danger {
  background: rgba(220, 38, 38, 0.12) !important;
  color: #b91c1c !important;
}

.badge-info {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

/* Tabelas */
.table-invoice table,
.table {
  margin-bottom: 0 !important;
}

.table thead th,
.table tr:first-child th {
  background: #f8f9fc !important;
  color: var(--muted) !important;
  font-weight: 600 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: none !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 0.9rem 1rem !important;
}

.table td {
  padding: 0.95rem 1rem !important;
  vertical-align: middle !important;
  border-top: 1px solid var(--border) !important;
  color: var(--text);
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(19, 19, 76, 0.015) !important;
}

.table-invoice a {
  font-weight: 700;
  color: var(--accent) !important;
}

/* Footer */
.main-footer {
  background: transparent !important;
  border-top: 1px solid var(--border) !important;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem !important;
  color: var(--muted) !important;
  font-size: 0.9rem;
}

.main-footer .footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  float: none !important;
  width: 100%;
}

/* ——— Login ——— */
body.login-page {
  min-height: 100vh;
  margin: 0;
  background: var(--navy) !important;
  overflow-x: hidden;
}

body.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(61, 90, 254, 0.45), transparent 55%),
    radial-gradient(ellipse 55% 45% at 90% 85%, rgba(13, 148, 136, 0.28), transparent 50%),
    linear-gradient(165deg, #0f1040 0%, #13134c 42%, #1a1a5c 100%);
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-width: 1100px;
  margin: 0 auto;
  align-items: stretch;
  padding: 2rem;
  gap: 2rem;
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem;
  color: #fff;
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-visual .brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.login-visual .brand-mark span {
  color: #8b9cff;
}

.login-visual p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 28rem;
  line-height: 1.55;
  margin: 0;
}

.login-visual .login-logo-img {
  max-width: 220px;
  width: 100%;
  height: auto;
  margin-bottom: 1.75rem;
  filter: brightness(0) invert(1) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
  animation: scaleIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fadeInUp 0.7s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 2rem 1.85rem 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--navy);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.login-card .login-lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.login-card .form-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.login-card .form-control {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
  padding: 0.7rem 0.9rem !important;
  height: auto !important;
  font-size: 1rem !important;
  background: #fafbfe !important;
}

.login-card .btn-login {
  margin-top: 0.5rem;
  border-radius: 12px !important;
  padding: 0.85rem 1rem !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  background: var(--accent) !important;
  border: none !important;
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.35);
}

.login-card .btn-login:hover {
  background: var(--accent-hover) !important;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0 0.95rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-card .btn-tecnicos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 12px !important;
  padding: 0.85rem 1rem !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  background: var(--navy) !important;
  border: none !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(19, 19, 76, 0.22);
  transition: background 0.2s, transform 0.15s;
}

.login-card .btn-tecnicos:hover {
  background: var(--navy-mid) !important;
  color: #fff !important;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
}

.login-footer img {
  height: 26px;
  width: auto;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.15rem 2rem;
    align-content: center;
  }

  .login-visual {
    padding: 0.5rem 0.25rem 0;
    text-align: center;
    align-items: center;
  }

  .login-visual p {
    margin: 0 auto;
  }

  .login-visual .brand-mark {
    font-size: 1.85rem;
  }
}

/* ——— Modais custom ——— */
.modal-custom {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 16, 64, 0.45);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

.modal-content-custom {
  background: #fff;
  border-radius: 18px;
  padding: 2rem 1.5rem 1.5rem;
  box-shadow: 0 24px 60px rgba(19, 19, 76, 0.22);
  min-width: 320px;
  max-width: 90vw;
  position: relative;
  text-align: center;
  animation: scaleIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid var(--border);
}

.modal-content-custom.modal-empresa {
  width: min(960px, 94vw);
  max-width: 96vw;
  padding: 2.1rem 2.25rem 1.75rem;
  text-align: left;
}

.modal-content-custom.modal-empresa .modal-title-custom {
  text-align: left;
  margin-bottom: 0.35rem;
}

.modal-content-custom.modal-empresa .gt-form-actions .btn {
  min-width: 160px;
}

.empresa-logo-block {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.empresa-logo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.35rem;
}

.empresa-logo-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.empresa-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.empresa-logo-fields {
  flex: 1;
  min-width: 0;
}

.empresa-logo-fields input[type="file"] {
  margin-bottom: 0.45rem;
}

.empresa-logo-remove {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--danger);
  font-weight: 600;
  margin: 0 !important;
  cursor: pointer;
}

.empresa-logo-remove input {
  width: auto !important;
  margin: 0 !important;
}

.close-modal {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 26px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.close-modal:hover {
  color: var(--text);
}

.modal-title-custom {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.4rem 0 1.1rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  text-transform: none;
}

#formCriarOrdem label,
#formPerfil label,
#formNovoUser label,
#formEmpresa label {
  display: block;
  margin: 14px 0 4px;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

#formCriarOrdem input,
#formPerfil input,
#formNovoUser input[type="text"],
#formNovoUser input[type="password"],
#formEmpresa input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafbfe;
}

#formCriarOrdem input:focus,
#formPerfil input:focus,
#formNovoUser input:focus,
#formEmpresa input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

#formCriarOrdem > button[type="submit"],
#formPerfil button[type="submit"],
#formNovoUser button[type="submit"],
#formEmpresa button[type="submit"],
#btnCriarOrdem {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 12px;
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.28);
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}

#formCriarOrdem > button[type="submit"]:hover,
#formPerfil button[type="submit"]:hover,
#formNovoUser button[type="submit"]:hover,
#formEmpresa button[type="submit"]:hover,
#btnCriarOrdem:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

#formCriarOrdem .ordem-inline-actions .btn {
  width: auto;
  margin-top: 0;
  box-shadow: none;
  transform: none;
}

.user-list-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-list-item:last-child {
  border-bottom: none;
}

.editar-user {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

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

.tab-button {
  padding: 0.65rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-family: inherit;
}

.tab-button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

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

.profile-photo-wrapper {
  display: inline-block;
  position: relative;
}

#previewPhoto {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.upload-label {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(19, 19, 76, 0.15);
  transition: background 0.2s;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-label:hover {
  background: var(--accent-hover);
}

/* ——— Notificações ——— */
#notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.notification {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 10px;
  padding: 14px 18px;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  align-items: center;
  animation: slideIn 0.3s ease-out;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.notification.success {
  background: #ecfdf5;
  border-left: 4px solid var(--success);
}

.notification.error {
  background: #fef2f2;
  border-left: 4px solid var(--danger);
}

.notification.warning {
  background: #fffbeb;
  border-left: 4px solid var(--warning);
}

.notification.info {
  background: #ecfeff;
  border-left: 4px solid var(--info);
}

.notification-icon {
  margin-right: 12px;
  font-size: 20px;
}

.notification.success .notification-icon { color: var(--success); }
.notification.error .notification-icon { color: var(--danger); }
.notification.warning .notification-icon { color: var(--warning); }
.notification.info .notification-icon { color: var(--info); }

.notification-content { flex: 1; }

.notification-title {
  font-weight: 700;
  margin-bottom: 2px;
  font-size: 0.92rem;
  color: var(--text);
}

.notification-message {
  font-size: 0.86rem;
  color: var(--muted);
}

.notification-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  margin-left: 12px;
  color: var(--muted);
}

/* ——— Animações ——— */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.anim-fade-in-up {
  animation: fadeInUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-delay-1 { animation-delay: 0.08s; }
.anim-delay-2 { animation-delay: 0.16s; }
.anim-delay-3 { animation-delay: 0.24s; }
.anim-delay-4 { animation-delay: 0.32s; }

/* Alertas login */
.login-card .alert {
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.9rem;
}

.simple-footer {
  display: none !important;
}

.tecnicos-ativos {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.45;
}

/* ——— Dashboard inteligente ——— */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}

.dash-header h1 {
  font-family: var(--font-display) !important;
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.dash-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  max-width: 42rem;
  line-height: 1.45;
}

.dash-header-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.dash-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.dash-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 1.05rem;
}

.dash-stat-icon.teal { background: rgba(13, 148, 136, 0.12); color: var(--teal); }
.dash-stat-icon.orange { background: rgba(217, 119, 6, 0.12); color: var(--warning); }
.dash-stat-icon.indigo { background: rgba(67, 56, 202, 0.12); color: #4338ca; }

.dash-stat-val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.dash-stat-lbl {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.15rem;
}

.dash-stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.dash-stat-trend.up { color: var(--success); }
.dash-stat-trend.neutral { color: var(--muted); }

.dash-grid-main {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: start;
}

.dash-card-full {
  width: 100%;
  margin-bottom: 1.25rem;
}

.dash-list-filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

@media (max-width: 767px) {
  .dash-list-filters { grid-template-columns: 1fr; }
}

.modal-custom .gt-form {
  text-align: left;
}

.modal-custom .modal-title-custom {
  text-align: left;
}

/* ——— Painel técnico (cards) ——— */
.body-tecnico {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(61, 90, 254, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(13, 148, 136, 0.1), transparent),
    var(--bg) !important;
  margin: 0;
}

.tec-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(115deg, var(--navy), #25258a);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(19, 19, 76, 0.25);
}

.tec-topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.tec-topbar-brand strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tec-topbar-brand span {
  font-size: 0.85rem;
  opacity: 0.8;
}

.tec-topbar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.tec-topbar-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.35);
}

.btn-tec-sair {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  background: #dc2626 !important;
  border: 2px solid #fff !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.15rem !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
  text-transform: uppercase;
}

.btn-tec-sair:hover {
  background: #b91c1c !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.55);
}

.btn-tec-sair i {
  font-size: 1.05rem;
}

.tec-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.85rem 1rem 1.5rem;
}

.tec-main-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.tec-main-head h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.1rem;
}

.tec-main-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.tec-search {
  min-width: min(100%, 260px);
  flex: 1;
  max-width: 320px;
}

.tec-meta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.7rem;
}

.tec-meta strong {
  color: var(--navy);
  font-family: var(--font-display);
}

.tec-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.7rem;
}

.tec-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.8rem 0.7rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

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

.tec-card-mine {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.14);
}

.tec-card-locked {
  opacity: 0.78;
}

.tec-card-locked .btn-tec-acao:disabled {
  cursor: not-allowed;
  opacity: 1;
  background: #94a3b8 !important;
  border-color: #94a3b8 !important;
}

.tec-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
}

.tec-card-id {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

.tec-card-estado {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
}

.tec-card-estado.live {
  background: rgba(13, 148, 136, 0.14);
  color: var(--teal);
}

.tec-card-estado.curso {
  background: rgba(61, 90, 254, 0.12);
  color: var(--accent);
}

.tec-card-estado.parada {
  background: rgba(217, 119, 6, 0.14);
  color: var(--warning);
}

.tec-card-matricula {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.tec-card-cliente {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tec-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.tec-card-meta i {
  width: 0.9rem;
  color: var(--accent);
}

.tec-card-tempo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.15rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.tec-card-tempo .label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.tec-card-tempo .badge-tempo {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.28rem 0.5rem;
  border-radius: 8px;
}

.tec-card-actions {
  margin-top: 0.2rem;
}

.btn-tec-acao {
  width: 100%;
  font-weight: 700 !important;
  padding: 0.55rem 0.5rem !important;
  border-radius: 9px !important;
  font-size: 0.84rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tec-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.75rem 1rem;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.tec-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.tec-footer img {
  height: 22px;
}

.tec-topbar {
  padding: 0.7rem 1rem;
}

.tec-topbar-brand strong {
  font-size: 0.95rem;
}

.tec-topbar-user img {
  width: 34px;
  height: 34px;
}

@media (min-width: 1400px) {
  .tec-cards {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.65rem;
  }
}

@media (max-width: 575px) {
  .tec-cards { grid-template-columns: 1fr; }
  .tec-card-matricula { font-size: 1.15rem; }
  .tec-topbar { padding: 0.75rem 0.9rem; }
}

/* ——— Técnicos ——— */
.tec-list-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tec-list-user img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.tec-photo-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.tec-photo-preview img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
}

#tabelaTecnicos tr.row-inativo td {
  opacity: 0.72;
}

.btn-outline-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ——— Detalhe de ordem (relatórios) ——— */
.ordem-detalhe-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ordem-info-list {
  display: grid;
  gap: 0.75rem;
}

.ordem-info-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.ordem-info-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ordem-info-list span {
  color: var(--muted);
  font-size: 0.9rem;
}

.ordem-info-list strong {
  color: var(--navy);
  text-align: right;
}

.ordem-tempo-total {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent) !important;
}

.relatorio-row-click {
  cursor: pointer;
  transition: background 0.15s ease;
}

.relatorio-row-click:hover {
  background: rgba(var(--accent-rgb), 0.06) !important;
}

@media (max-width: 767px) {
  .ordem-detalhe-grid { grid-template-columns: 1fr; }
}

/* ——— Relatórios ——— */
.relatorios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.relatorio-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  min-height: 220px;
}

.relatorio-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.relatorio-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.relatorio-icon.teal { background: rgba(13, 148, 136, 0.12); color: var(--teal); }
.relatorio-icon.orange { background: rgba(217, 119, 6, 0.12); color: var(--warning); }

.relatorio-card h2 {
  font-family: var(--font-display) !important;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

.relatorio-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0 0 1.25rem;
  flex: 1;
}

.relatorio-cta {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

.relatorio-filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

.relatorio-filters-simple {
  grid-template-columns: 1fr;
  max-width: 480px;
}

.relatorio-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.relatorio-meta strong {
  color: var(--navy);
  font-family: var(--font-display);
}

@media (max-width: 991px) {
  .relatorios-grid { grid-template-columns: 1fr; }
  .relatorio-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575px) {
  .relatorio-filters { grid-template-columns: 1fr; }
}

.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dash-card-head h2 {
  font-family: var(--font-display) !important;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.dash-pill {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.dash-empty {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.5rem 0 0.25rem;
}

.dash-live-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-live-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #f8f9fc;
  border: 1px solid var(--border);
}

.dash-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

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

.dash-live-info strong {
  font-size: 0.92rem;
  color: var(--navy);
}

.dash-live-info span {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-live-time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--success);
  flex-shrink: 0;
  background: rgba(13, 148, 136, 0.12);
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
}

.dash-resumo {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-resumo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.dash-resumo-row:last-child { border-bottom: none; }

.dash-resumo-row strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.dash-hint {
  margin: 1rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.dash-hint i { color: var(--accent); margin-right: 0.35rem; }

.dash-table-tools {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dash-table-tools #filtroOrdens {
  width: 240px;
  max-width: 100%;
  border-radius: 10px !important;
  border: 1px solid var(--border) !important;
  height: calc(1.5em + 0.5rem + 2px);
  padding-left: 2rem !important;
}

.ajax-search-wrap {
  position: relative;
}

.ajax-search-wrap > i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  z-index: 2;
}

.ajax-search-wrap .form-control {
  padding-left: 2.25rem !important;
  border-radius: 10px !important;
}

.ajax-search-wrap.ajax-search-sm > i {
  left: 0.7rem;
  font-size: 0.8rem;
}

.select2-container--default .select2-selection--single {
  height: 42px !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 6px 8px;
  background: #fafbfe !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 28px !important;
  color: var(--text) !important;
  padding-left: 4px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
}

.select2-dropdown {
  border-color: var(--border) !important;
  border-radius: 10px !important;
  overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--accent) !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

#modalCriarOrdem .select2-container {
  text-align: left;
  margin-bottom: 0.25rem;
  width: 100% !important;
}

/* Listas Select2 acima do overlay do modal */
#modalCriarOrdem .select2-container--open,
#modalCriarOrdem .select2-dropdown,
body > .select2-container--open {
  z-index: 10060 !important;
}

#modalCriarOrdem.modal-custom,
#modalCriarOrdem .modal-content-custom,
#modalCriarOrdem .ordem-field-block {
  overflow: visible !important;
}

@media (max-width: 991px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-main { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-table-tools #filtroOrdens { width: 100%; }
}

/* ——— Navbar menus ——— */
.navbar-main-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 1rem;
}

.navbar-main-menu .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  padding: 0.45rem 0.75rem !important;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.navbar-main-menu .nav-link i {
  font-size: 0.85rem;
  opacity: 0.9;
}

.navbar-main-menu .nav-link:hover,
.navbar-main-menu .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.navbar-main-menu .dropdown-menu-nav {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 16, 64, 0.22);
  padding: 0.4rem;
  margin-top: 0.35rem;
  min-width: 220px;
}

.navbar-main-menu .dropdown-menu-nav .dropdown-item {
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-main-menu .dropdown-menu-nav .dropdown-item i {
  width: 1.1rem;
  text-align: center;
  color: #0f1040;
  opacity: 0.75;
}

.navbar-main-menu .dropdown-menu-nav .dropdown-item:hover,
.navbar-main-menu .dropdown-menu-nav .dropdown-item.active {
  background: rgba(15, 16, 64, 0.08);
  color: #0f1040;
}

.main-navbar .navbar-toggler {
  margin-left: auto;
  margin-right: 0.5rem;
}

@media (max-width: 991px) {
  .navbar-main-menu {
    flex-direction: column;
    align-items: stretch;
    margin: 0.75rem 0;
    width: 100%;
  }
  .main-navbar .navbar-collapse {
    background: rgba(15, 16, 64, 0.96);
    border-radius: 12px;
    padding: 0.75rem;
    margin-top: 0.5rem;
  }
  .navbar-main-menu .dropdown-menu-nav {
    position: static !important;
    float: none;
    width: 100%;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.25rem 0 0.5rem;
  }
  .navbar-main-menu .dropdown-menu-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
  }
  .navbar-main-menu .dropdown-menu-nav .dropdown-item i,
  .navbar-main-menu .dropdown-menu-nav .dropdown-item:hover,
  .navbar-main-menu .dropdown-menu-nav .dropdown-item.active {
    color: #fff;
  }
  .navbar-main-menu .dropdown-menu-nav .dropdown-item:hover,
  .navbar-main-menu .dropdown-menu-nav .dropdown-item.active {
    background: rgba(255, 255, 255, 0.12);
  }
}

/* ——— Formulários gestão ——— */
.gt-form label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  text-align: left;
}

.gt-form input,
.gt-form select,
.gt-form textarea,
#formCriarOrdem select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.25rem;
  font-family: inherit;
  background: #fafbfe;
  color: var(--text);
}

.gt-form input:focus,
.gt-form select:focus,
.gt-form textarea:focus,
#formCriarOrdem select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.gt-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.gt-form-row-3 {
  grid-template-columns: 1fr 1fr 1.2fr;
}

.gt-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.modal-help {
  text-align: left;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.15rem 0 0.65rem;
}

.modal-help a {
  font-weight: 600;
  color: var(--accent) !important;
}

.modal-content-custom.modal-criar-ordem {
  max-width: 520px;
  width: 94vw;
  text-align: left;
  overflow: visible;
}

.modal-content-custom.modal-criar-ordem .modal-title-custom {
  text-align: left;
}

.ordem-field-block {
  margin-bottom: 1rem;
}

.ordem-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ordem-field-head label {
  margin: 0;
  font-weight: 600;
}

.btn-link-ordem {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.15rem 0.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-link-ordem:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-link-ordem:not(:disabled):hover {
  text-decoration: underline;
}

.ordem-inline-panel {
  margin-top: 0.65rem;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  background: rgba(15, 16, 64, 0.04);
  border: 1px solid rgba(15, 16, 64, 0.08);
}

.ordem-inline-title {
  font-weight: 700;
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
  color: #0f1040;
}

.ordem-inline-panel label {
  display: block;
  margin: 0.55rem 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.ordem-inline-panel input {
  width: 100%;
}

.ordem-inline-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.ordem-inline-erro {
  margin: 0.55rem 0 0;
  color: #c0392b;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 575px) {
  .gt-form-row,
  .gt-form-row-3 { grid-template-columns: 1fr; }

  .modal-content-custom.modal-empresa {
    width: 94vw;
    padding: 1.5rem 1.15rem 1.25rem;
  }
}
