.notice.compact { margin: 0; }
.profile-picker { display: flex; gap: 12px; align-items: end; }
.profile-picker label { flex: 1; }
.saved-profile-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.saved-profile-list > div {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 7px 6px 12px;
  background: #f8fafc;
}
.saved-profile-list form { margin: 0; }
.profile-access-list { display: grid; gap: 16px; }
.profile-access-card { padding: 24px; }
.profile-access-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.profile-access-heading h2 { margin: 4px 0 6px; }
.profile-access-heading p { margin: 0; color: var(--muted, #64748b); }
.profile-access-form { margin-top: 20px; }
.profile-access-form fieldset { border: 1px solid var(--line, #dbe3ec); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.profile-access-form legend { padding: 0 8px; font-weight: 700; }
.driver-access-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.driver-access-options label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line, #dbe3ec); border-radius: 10px; padding: 12px; cursor: pointer; }
.driver-access-options input { margin-top: 3px; }
.driver-access-options span { display: grid; gap: 3px; }
.driver-access-options small { color: var(--muted, #64748b); }
.profile-manager-item { padding: 22px 25px; border-bottom: 1px solid var(--border); }
.profile-manager-item:last-child { border-bottom: 0; }
.profile-manager-summary { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; }
.profile-manager-summary h2 { margin: 4px 0; }
.profile-manager-summary p { color: var(--muted); margin: 0 0 4px; }
.profile-manager-summary small { overflow-wrap: anywhere; }
.profile-manager-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.profile-manager-actions form { margin: 0; }
.profile-permissions { border-top: 1px solid var(--border); margin-top: 17px; padding-top: 14px; }
.profile-permissions summary { cursor: pointer; font-size: .875rem; font-weight: 700; color: var(--blue); }
.profile-permissions .help { margin: 12px 0 0; }
.profile-permissions .profile-access-form { margin-top: 15px; }
@media (max-width: 760px) {
  .profile-manager-item { padding: 20px; }
  .profile-manager-summary { flex-direction: column; gap: 15px; }
  .profile-manager-actions { width: 100%; }
  .profile-manager-actions .button { min-width: 90px; }
}
.saved-profile-list .button { min-height: 33px; padding: 4px 9px; font-size: .75rem; }
.share-panel { border-color: #cddedc; box-shadow: 0 9px 28px #143d4710; }
.share-heading { display: flex; gap: 17px; align-items: center; padding: 24px 28px; background: linear-gradient(112deg, #eef8f5 0%, #f6fafc 68%, #eaf1fb 100%); border-bottom: 1px solid #dce9e7; }
.share-heading .eyebrow { color: #036663; font-size: .7rem; }
.share-heading h2 { margin: 3px 0 2px; font-size: 1.35rem; line-height: 1.25; }
.share-heading p { margin: 0; font-size: .875rem; color: #536879; }
.share-mark { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: #036663; font-size: 1.6rem; box-shadow: 0 5px 14px #03666332; }
.share-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(175px, .76fr); gap: 22px; align-items: start; padding: 24px 28px 18px; }
.share-fields { min-width: 0; }
.share-fields label { margin: 0 0 5px; font-size: .82rem; }
.share-fields input { margin: 0 0 17px; }
.share-fields input:last-child { margin-bottom: 0; }
.share-optional { font-weight: 400; color: #667c8b; }
#share-link { width: 100%; font-size: .8rem; color: #34576b; background: #f5f9fa; text-overflow: ellipsis; }
.share-actions { display: grid; gap: 8px; }
.share-actions .button { width: 100%; justify-content: space-between; text-align: left; }
.share-actions [hidden] { display: none !important; }
.share-actions .share-whatsapp { color: #fff; background: #087847; border-color: #087847; box-shadow: 0 4px 10px #08784720; }
.share-actions .share-whatsapp:hover { color: #fff; background: #07663d; }
.share-actions .share-sms { border-color: #bed6e9; color: #175585; background: #eff7fd; }
.share-actions .share-sms:hover { background: #e0f0fb; }
.share-actions .share-copy { color: #036663; }
.share-actions .button:focus-visible, .share-fields input:focus-visible { outline: 3px solid #036663; outline-offset: 2px; }
.share-feedback { margin: 0 28px 14px; padding: 11px 13px; border-radius: 7px; font-size: .82rem; background: #e8f6f0; color: #185e46; }
.share-feedback:empty { display: none; }
.share-note { margin: 0; padding: 12px 28px 15px; border-top: 1px solid #e4ecee; background: #fafcfc; font-size: .77rem; line-height: 1.55; color: #5a6e7a; }
@media (max-width: 540px) {
  .share-heading { padding: 20px; }
  .share-content { grid-template-columns: 1fr; gap: 10px; padding: 21px 20px 18px; }
  .share-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-actions .button { min-height: 48px; padding: 8px 11px; font-size: .82rem; }
  .share-note { padding: 13px 20px; }
  .share-feedback { margin: 0 20px 14px; }
}
@media (max-width: 365px) { .share-actions { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .profile-picker { align-items: stretch; flex-direction: column; }
  .profile-picker .button { width: 100%; }
}

/* Clearer, calmer visual hierarchy for the existing navy and blue brand. */
:root { --radius: 16px; }
body { background: #f2f5f9; }
.panel, .stats > a, .legal-strip { border: 1px solid rgba(24,44,66,.075); box-shadow: 0 8px 24px rgba(20,43,67,.045); }
.panel { border-radius: 16px; }
.button { min-height: 42px; border-radius: 10px; font-weight: 650; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(20,43,67,.12); }
.button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(23,99,189,.28); outline-offset: 2px; }
.page-heading { margin-bottom: 22px; }
.page-heading h1 { letter-spacing: -.035em; }
.stats > a { border-radius: 15px; transition: transform .15s ease, box-shadow .15s ease; }
.stats > a:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,43,67,.09); }
input, select, textarea { border-radius: 9px; }
.driver-nav { color: #fff !important; background: rgba(255,255,255,.11); border-radius: 9px; font-weight: 650; }
.driver-welcome { display: flex; align-items: center; gap: 18px; margin: 8px 0 22px; }
.driver-welcome h1 { margin: 2px 0 4px; letter-spacing: -.035em; }
.driver-welcome p { margin: 0; color: var(--muted); }
.driver-mark { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 54px; border-radius: 16px; color: white; font-size: 25px; font-weight: 800; background: linear-gradient(145deg,#1763bd,#142b43); box-shadow: 0 8px 18px rgba(23,99,189,.2); }
.driver-form { max-width: 850px; margin: 0 auto; }
.driver-step { padding: 24px; margin-bottom: 16px; }
.step-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.step-heading > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #1763bd; font-weight: 750; background: #eaf2fc; }
.step-heading h2 { margin: 0; font-size: 19px; }
.step-heading p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.driver-label { display: block; margin-bottom: 7px; font-weight: 650; }
.driver-step select { width: 100%; min-height: 50px; font-size: 16px; }
.driver-main-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.driver-main-fields .field > input { width: 100%; min-height: 52px; }
.weight-field input { font-size: 22px; font-weight: 700; }
.driver-prefill { margin-top: 18px; padding: 15px 17px; border: 1px solid #e2e9f1; border-radius: 12px; background: linear-gradient(120deg,#f8fbff,#f4f7fa); }
.driver-prefill p { margin: 4px 0; font-size: 17px; font-weight: 700; }
.driver-prefill small { color: var(--muted); }
.route-chip { color: #1763bd; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.driver-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 0 24px; }
.driver-submit { min-width: 170px; min-height: 48px; }
.member { align-items: flex-start; flex-wrap: wrap; }
.driver-permissions-form { flex: 1 1 100%; max-width: none; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 17px; }
.driver-permissions-form fieldset, .driver-extra-fields { border: 1px solid var(--border); border-radius: 7px; padding: 14px 16px; }
.driver-permissions-form legend, .driver-extra-fields legend { padding: 0 7px; color: #526e8c; font-size: .875rem; font-weight: 700; }
.permission-option { display: flex; align-items: flex-start; gap: 10px; margin: 9px 0; font-weight: 500; }
.permission-option input { flex: 0 0 20px; margin: 0; }
.driver-extra-fields { margin-top: 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 650px) {
  .driver-step { padding: 19px 16px; }
  .driver-main-fields { grid-template-columns: 1fr; gap: 14px; }
  .driver-actions { display: grid; grid-template-columns: 1fr; }
  .driver-actions .button { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }

/* Company preferences, reusable contacts and delivery controls. */
.company-logo-preview{display:block;max-width:280px;max-height:110px;object-fit:contain;object-position:left;margin:12px 0 22px;padding:12px;background:#f4f7fa;border:1px solid #dce5ef;border-radius:12px}
.contact-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px 0;border-bottom:1px solid #dce5ef}
.contact-row h3{margin:8px 0}.contact-row p{overflow-wrap:anywhere}.contact-row:last-child{border-bottom:0}
.detail-side .panel{margin-bottom:22px}
#id_messaging_channels label{display:flex;align-items:center;gap:10px;margin:12px 0}
#id_messaging_channels input{width:auto}.stack input[type=checkbox]{width:auto;min-height:0}
.empty-state{padding:40px 0;color:#4f6880}.stack details summary{cursor:pointer}
@media(max-width:700px){.contact-row{align-items:stretch;flex-direction:column}.contact-row .button-row{width:100%}.profile-picker{flex-wrap:wrap}}

.step-heading>span{flex-shrink:0;align-self:flex-start}

/* Clear company blocks and a focused driver workspace. */
.grouped-fields h2{margin:0 0 22px}.grouped-fields summary{cursor:pointer;font-weight:700}
.grouped-fields>summary{font-size:1.15rem}.grouped-fields[open]>summary{margin-bottom:22px}
.optional-fields{border-top:1px solid var(--border);margin-top:22px;padding-top:16px}
.optional-fields summary{color:#155bb2}.optional-fields .form-grid{margin-top:16px}
.grouped-fields textarea{min-height:80px;resize:vertical}
.driver-layout .shell{margin-left:0}.driver-layout .topbar{display:none}
.driver-layout main{max-width:900px;margin:0 auto;padding:26px 20px;min-height:65vh}
.driver-layout footer{text-align:center;font-size:11px}
.driver-header{padding:18px 24px;background:#152d44;color:white;display:flex;align-items:center;justify-content:space-between}
.driver-header .brand{margin:0;padding:0}.driver-header a{color:inherit}
.driver-account{position:relative}.driver-account summary{cursor:pointer;padding:10px;font-size:14px}
.driver-account>div{position:absolute;right:0;z-index:5;width:260px;border:1px solid #dce3eb;border-radius:10px;padding:20px;background:white;color:#152d44;box-shadow:0 10px 30px #152d4420;overflow-wrap:anywhere}
.driver-account .logout{color:#152d44}.driver-account a{display:block;margin:12px 0}
.driver-completion{max-width:560px;margin:20px auto}.driver-result{text-align:center;padding:32px}
.driver-result h1{font-size:30px}.driver-result-mark{width:60px;height:60px;display:grid;place-items:center;border-radius:50%;margin:0 auto 18px;background:#e6f4ed;color:#176442;font-size:32px}
.driver-primary{min-height:58px;font-size:18px;margin:18px 0 5px}.driver-home{display:inline-block;margin-top:20px;font-weight:600}
.driver-start{text-align:left;margin-top:24px}.driver-send{margin:22px 0}.driver-send>summary{cursor:pointer;font-weight:600;margin-bottom:16px}
.driver-document{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px;margin-bottom:14px;text-decoration:none;color:inherit}
.driver-document p{color:var(--muted);margin:6px 0}.driver-document>span{white-space:nowrap;color:#155bb2;font-weight:600}
@media(max-width:600px){.driver-header{padding:12px 16px}.driver-layout main{padding:18px 14px}.driver-result{padding:26px 20px}.driver-document{padding:18px;align-items:flex-start}.driver-document>span{font-size:13px}.driver-home-list .page-heading>.button{width:100%}}

/* Section sources, structured places and a single service column, 1.5.7. */
.section-source{border:1px solid var(--border);border-radius:9px;padding:12px 16px;margin:0 0 20px;background:#f7fafc}
.section-source>summary,.legacy-location>summary,.service-records>summary{cursor:pointer;color:#155bb2;font-weight:600}
.source-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px;margin-top:16px}
.source-controls label{margin:0}.source-controls input,.source-controls select{margin:6px 0 0}
.phone-control{display:flex;gap:8px;align-items:center}.phone-control .phone-prefix{flex:0 0 80px}
.phone-control .phone-number{flex:1;min-width:0}.phone-control input{width:100%;margin:0}
.location-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:18px}
.location-block{min-width:0;border:1px solid var(--border);border-radius:10px;padding:18px;background:white}
.location-block h3{margin:0 0 16px}.location-block .form-grid{gap:14px}
.legacy-location{margin-top:18px}.legacy-location>summary{font-size:.8rem}.legacy-location textarea{min-height:70px}
.service-detail{display:grid;gap:22px;grid-template-columns:minmax(0,1fr)}
.service-records .panel{box-shadow:none;margin:20px 0 0}.service-records[open]>summary{margin-bottom:16px}
.send-body{padding:24px 28px}.send-body>label{margin-bottom:20px}.send-body input,.send-body select{margin-top:6px}
.send-buttons{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.send-link{margin:18px 0}
.recipient-identity{padding:12px 16px;background:#f0f6fb;border-radius:8px;overflow-wrap:anywhere}
#share-document .share-feedback{padding:0;margin:14px 0}.shipment-route{flex:1;min-width:0}.route-places{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.shipment-summary .route-place-text{white-space:pre-line;color:var(--ink);font-weight:500;line-height:1.6;margin:8px 0 16px}
@media(max-width:1100px){.source-controls{grid-template-columns:minmax(0,1fr)}.location-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.route-places{grid-template-columns:minmax(0,1fr);gap:8px}.send-body{padding:20px 16px}.send-buttons .button{flex:1 1 140px}.location-block{padding:16px}.phone-control .phone-prefix{flex-basis:70px}}

/* Equipo y accesos: one compact row per account and actions inside its details. */
.team-page { max-width: 1160px; margin: 0 auto; }
.team-page .page-heading { margin-bottom: 24px; }
.team-page .message { margin-bottom: 18px; }
.team-section-title { margin-bottom: 16px; }
.team-section-title h2 { margin-bottom: 2px; }
.team-section-title p { color: var(--muted); margin: 0; font-size: .9rem; }
.team-create { margin-bottom: 30px; }
.team-create-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.team-create-option { overflow: hidden; margin-bottom: 0; }
.team-create-option > summary { display: flex; align-items: center; min-height: 84px; padding: 18px 22px; cursor: pointer; list-style: none; }
.team-create-option > summary::-webkit-details-marker, .team-member > summary::-webkit-details-marker { display: none; }
.team-create-option > summary::after { content: '＋'; color: var(--blue); font-size: 1.3rem; margin-left: auto; padding-left: 12px; }
.team-create-option[open] > summary::after { content: '−'; }
.team-create-option > summary strong { display: block; font-size: 1rem; }
.team-create-option > summary small { margin-top: 3px; }
.team-create-option > summary:hover, .team-member-summary:hover { background: #f6f9fc; }
.team-create-body { padding: 18px 22px 24px; border-top: 1px solid var(--border); }
.team-create-body .help { margin: 16px 0 0; }
.team-members-panel { padding: 24px 28px 6px; }
.team-members-panel > .team-section-title { margin-bottom: 18px; }
.team-member { border-top: 1px solid var(--border); }
.team-member-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; padding: 14px 8px; cursor: pointer; list-style: none; }
.team-person { display: grid; min-width: 0; gap: 2px; }
.team-person strong { font-size: 1rem; overflow-wrap: anywhere; }
.team-person small { overflow-wrap: anywhere; }
.team-member-meta { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-shrink: 0; }
.team-role, .team-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.team-role { color: #365371; background: #eef3f8; }
.team-status { color: #176442; background: #e7f5ee; }
.team-status-inactive { color: #73572d; background: #f8f0e3; }
.team-expand { color: var(--blue); font-size: 1.1rem; transition: transform .15s ease; }
.team-member[open] .team-expand { transform: rotate(180deg); }
.team-member-body { padding: 3px 8px 22px; max-width: 780px; }
.team-member-body > .help { margin: 0; }
.team-member-options { display: grid; gap: 9px; }
.team-option { border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.team-option > summary { padding: 13px 16px; color: var(--blue); font-weight: 650; cursor: pointer; }
.team-option > summary:hover { background: #f1f7fd; }
.team-option-body { padding: 0 16px 16px; }
.team-option-body .help { margin: 2px 0 12px; }
.team-page .driver-permissions-form { margin: 0 12px 12px; max-width: none; }
.team-access-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.team-access-actions h3 { margin: 0 0 12px; }
.team-action-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px 22px; }
.team-action-row form { margin: 0; }
.team-action-row .help { margin: 0; }
.team-delete > summary { color: #a03540; cursor: pointer; padding: 9px 0; font-weight: 600; }
.team-delete-body { width: min(100%, 460px); padding: 12px 16px 16px; border: 1px solid #ecd4d7; background: #fffafa; border-radius: 10px; }
.team-delete-body .help { margin-bottom: 12px; }
.team-delete-body input { width: 100%; }
.team-empty { padding: 18px 8px; }
.team-page summary:focus-visible { outline: 3px solid rgba(23,99,189,.28); outline-offset: -3px; border-radius: 8px; }
@media (max-width: 700px) {
  .team-create-grid { grid-template-columns: 1fr; }
  .team-members-panel { padding: 20px 16px 4px; }
  .team-member-summary { align-items: flex-start; flex-direction: column; gap: 10px; }
  .team-member-meta { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .team-expand { margin-left: auto; }
  .team-member-body { padding: 4px 0 20px; }
  .team-page .driver-permissions-form { margin: 0 8px 8px; }
}
