/* BusTop 2.1.7 — production polish and unified creation experience */
:root{
  --bt-brand:#0b63ce;
  --bt-brand-strong:#084d9e;
  --bt-brand-soft:#edf5ff;
  --bt-navy:#0b1f36;
  --bt-copy:#506176;
  --bt-border:#d8e2ee;
  --bt-surface:#fff;
  --bt-canvas:#f5f8fc;
  --bt-radius:14px;
  --bt-radius-lg:20px;
}
[data-theme="dark"]{
  --bt-brand:#58a6ff;
  --bt-brand-strong:#2d7dd2;
  --bt-brand-soft:#122b47;
  --bt-navy:#f4f8fd;
  --bt-copy:#aabbd0;
  --bt-border:#293c52;
  --bt-surface:#101e2f;
  --bt-canvas:#091422;
}

/* A calmer, less template-like visual system */
body{font-feature-settings:"cv02","cv03","cv04","cv11";text-rendering:optimizeLegibility}
.card,.bt-panel,.job-card,.mk-card,.listing-card,.request-card{border-color:var(--bt-border)!important;box-shadow:0 1px 2px rgba(11,31,54,.035),0 10px 30px rgba(11,31,54,.045)!important}
.card:hover{box-shadow:0 1px 2px rgba(11,31,54,.04),0 14px 34px rgba(11,31,54,.065)}
.page-head h1,.bt-studio__title,.mk-h1{color:var(--bt-navy);letter-spacing:-.035em}
.page-head .muted,.bt-studio__lead{color:var(--bt-copy)}
.eyebrow,.bt-studio__eyebrow{color:var(--bt-brand);letter-spacing:.075em}
.btn:not(.ghost),.bt-publish{background:var(--bt-brand)!important;background-image:none!important;border:1px solid var(--bt-brand)!important;box-shadow:0 6px 16px rgba(11,99,206,.18)!important}
.btn:not(.ghost):hover,.bt-publish:hover{background:var(--bt-brand-strong)!important;border-color:var(--bt-brand-strong)!important;box-shadow:0 8px 20px rgba(11,99,206,.22)!important}
.btn.ghost{border-color:var(--bt-border)!important;background:var(--bt-surface)!important;color:var(--bt-navy)!important}
.btn.ghost:hover{border-color:var(--bt-brand)!important;color:var(--bt-brand)!important;background:var(--bt-brand-soft)!important}
input,select,textarea{border-color:var(--bt-border)!important;background:var(--bt-surface)!important;color:var(--bt-navy)!important}
input::placeholder,textarea::placeholder{color:#8a9bb0}

/* Unified single-file picker */
.bt-file-field{display:grid;gap:9px;min-width:0}
.bt-file-field__input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.bt-file-field__drop{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:13px;min-height:92px;padding:14px;border:1.5px dashed #a9bdd4;border-radius:15px;background:var(--bt-canvas);cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease}
.bt-file-field__drop:hover,.bt-file-field__drop.is-dragging{border-color:var(--bt-brand);background:var(--bt-brand-soft);box-shadow:0 8px 22px rgba(11,99,206,.09);transform:translateY(-1px)}
.bt-file-field__icon{width:48px;height:48px;border-radius:13px;display:grid;place-items:center;background:var(--bt-surface);border:1px solid var(--bt-border);color:var(--bt-brand)}
.bt-file-field__icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bt-file-field__copy{min-width:0}
.bt-file-field__copy strong{display:block;color:var(--bt-navy);font-size:14px;line-height:1.35}
.bt-file-field__copy>span{display:block;color:var(--bt-copy);font-size:12px;line-height:1.45;margin-top:3px}
.bt-file-field__copy small{display:block;color:#7c8da2;font-size:11px;margin-top:4px}
.bt-file-field__action{display:inline-flex;align-items:center;justify-content:center;min-width:64px;height:36px;padding:0 12px;border:1px solid var(--bt-border);border-radius:10px;background:var(--bt-surface);color:var(--bt-brand);font-size:12px;font-weight:750}
.bt-file-field__preview:empty{display:none}
.bt-file-preview-card{display:grid;grid-template-columns:56px minmax(0,1fr) 34px;align-items:center;gap:11px;padding:9px;border:1px solid var(--bt-border);border-radius:13px;background:var(--bt-surface)}
.bt-file-preview-card img,.bt-file-preview-card video{width:56px;height:48px;object-fit:cover;border-radius:9px;background:var(--bt-canvas)}
.bt-file-preview-card__doc{width:56px;height:48px;display:grid;place-items:center;border-radius:9px;background:var(--bt-brand-soft);color:var(--bt-brand)}
.bt-file-preview-card__doc svg{width:22px;height:22px}
.bt-file-preview-card__meta{min-width:0}
.bt-file-preview-card__meta strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--bt-navy);font-size:12px}
.bt-file-preview-card__meta small{display:block;color:var(--bt-copy);font-size:11px;margin-top:3px}
.bt-file-preview-card__remove{width:32px;height:32px;border:0;border-radius:9px;background:transparent;color:#b42318;display:grid;place-items:center;cursor:pointer}
.bt-file-preview-card__remove:hover{background:#fff0ef}
.bt-file-preview-card__remove svg{width:17px;height:17px}
.bt-file-field__status{min-height:0;color:var(--bt-copy);font-size:11px}
.bt-file-field.has-error .bt-file-field__drop{border-color:#dc2626;background:#fff4f4}
.bt-file-field.has-error .bt-file-field__status{color:#b42318}
.bt-file-field--compact .bt-file-field__drop{min-height:70px;padding:10px;grid-template-columns:38px minmax(0,1fr) auto}
.bt-file-field--compact .bt-file-field__icon{width:38px;height:38px;border-radius:10px}

/* Profile and document hub */
.profile-photo-section{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(240px,.9fr);gap:14px!important;align-items:start!important}
.prof-cover-preview,.bt-profile-cover{grid-column:1/-1;border-radius:18px!important;border:1px solid var(--bt-border);background:var(--bt-canvas)}
.bt-profile-media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;grid-column:1/-1}
.profile-photo-current{display:flex!important;align-items:center;justify-content:center;min-height:154px;border:1px solid var(--bt-border);border-radius:16px;background:var(--bt-canvas)}
.profile-photo-controls{padding:0!important;background:transparent!important;border:0!important}
.doc-upload-form{display:grid;gap:12px}
.doc-upload-form label{display:grid;gap:7px}

/* Fleet / operations upload surfaces */
.bt-upload-group{grid-column:1/-1;display:grid;gap:12px;padding:15px;border:1px solid var(--bt-border);border-radius:16px;background:var(--bt-canvas)}
.bt-upload-section-head{grid-column:1/-1;padding-top:6px}.bt-upload-section-head h3{margin:0;color:var(--bt-navy);font-size:17px}.bt-upload-section-head p{margin:5px 0 0}.bt-upload-group__head h3{margin:0;color:var(--bt-navy);font-size:15px}
.bt-upload-group__head p{margin:4px 0 0;color:var(--bt-copy);font-size:12px}
.bt-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}

/* DM attachment and composer */
.dm-attachment-preview[hidden]{display:none!important}
.dm-attachment-preview{display:grid;grid-template-columns:50px minmax(0,1fr) 34px;align-items:center;gap:10px;padding:8px 10px;margin:0 8px 8px;border:1px solid var(--bt-border);border-radius:12px;background:var(--bt-canvas)}
.dm-attachment-preview img{width:50px;height:42px;object-fit:cover;border-radius:9px}
.dm-attachment-preview strong{font-size:11px;color:var(--bt-navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dm-attachment-preview button{width:32px;height:32px;border:0;border-radius:9px;background:transparent;color:#b42318;cursor:pointer}
.dm-form-inner{border:1px solid var(--bt-border)!important;border-radius:17px!important;background:var(--bt-surface)!important;padding:7px!important;box-shadow:0 8px 22px rgba(11,31,54,.06)}
.dm-attach-btn{width:42px!important;height:42px!important;display:grid!important;place-items:center!important;border:0!important;border-radius:12px!important;background:var(--bt-brand-soft)!important;color:var(--bt-brand)!important;cursor:pointer}.dm-attach-btn svg,.dm-attachment-preview button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dm-send-btn{background:var(--bt-brand)!important}

/* Create menu: replace emoji-template feeling with disciplined icon tiles */
.create-modal{border-radius:24px!important;border:1px solid var(--bt-border)!important;background:var(--bt-surface)!important}
.create-modal-title{color:var(--bt-navy);font-weight:800!important;letter-spacing:-.02em}
.create-option-card{border:1px solid var(--bt-border)!important;border-radius:15px!important;background:var(--bt-surface)!important}
.create-option-card:hover{border-color:var(--bt-brand)!important;background:var(--bt-brand-soft)!important;transform:translateY(-2px)}
.create-option-icon{width:42px!important;height:42px!important;border-radius:12px!important;display:grid!important;place-items:center!important;background:var(--bt-brand-soft)!important;color:var(--bt-brand)!important;font-size:0!important}
.create-option-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.create-option-label{color:var(--bt-navy)!important;font-weight:750!important}
.create-option-desc{color:var(--bt-copy)!important}

/* Content and moderation language */
.bt-safe-note{border-color:var(--bt-border)!important;background:var(--bt-canvas)!important;color:var(--bt-copy)!important}
.bt-safe-note strong{color:var(--bt-navy)}
.bt-panel__badge,.bt-studio__trust{background:var(--bt-brand-soft)!important;border-color:#c9def6!important;color:var(--bt-brand-strong)!important}
.bt-studio__hero,.mk-head{background:var(--bt-surface)!important}
.bt-studio__hero:after,.mk-head:after{opacity:.35}
.bt-publish{font-size:14px!important;letter-spacing:.005em!important}

/* Accessible loading overlay for file-heavy forms */
.bt-upload-state{position:relative;overflow:hidden}
.bt-upload-state.is-visible:after{content:"";position:absolute;left:0;bottom:0;height:3px;width:45%;background:var(--bt-brand);animation:btUploadProgress 1.4s ease-in-out infinite}
@keyframes btUploadProgress{0%{transform:translateX(-110%)}100%{transform:translateX(270%)}}

@media(max-width:760px){
  .bt-file-field__drop{grid-template-columns:44px minmax(0,1fr);min-height:88px}
  .bt-file-field__action{grid-column:2;width:max-content;margin-top:4px}
  .profile-photo-section,.bt-profile-media-grid,.bt-upload-grid{grid-template-columns:1fr!important}
  .profile-photo-current{min-height:120px}
}
@media(prefers-reduced-motion:reduce){.bt-upload-state.is-visible:after{animation:none;width:100%}}
