/* Tokens do template Gymove aplicados sobre o Bootstrap 5.3 */
:root {
  --bs-primary: #1E3FB4; --bs-primary-rgb: 30, 63, 180;
  --bs-secondary: #A02CFA; --bs-secondary-rgb: 160, 44, 250;
  --bs-success: #2BC155; --bs-success-rgb: 43, 193, 85;
  --bs-info: #1EA7C5; --bs-info-rgb: 30, 167, 197;
  --bs-warning: #FFBC11; --bs-warning-rgb: 255, 188, 17;
  --bs-danger: #F94687; --bs-danger-rgb: 249, 70, 135;
  --bs-body-font-family: 'Poppins', system-ui, sans-serif;
  --bs-body-font-size: .875rem;
  --bs-body-bg: #F9F9F9;
  --bs-body-color: #7e7e7e;
  --bs-heading-color: #212529;
  --gy-sidebar-w: 17rem;
  --gy-header-h: 4.5rem;
  --gy-soft: #E8ECF7;
  --gy-shadow: 0 .3125rem .3125rem rgba(82, 63, 105, .05);
}
h1, h2, h3, h4, h5, h6 { font-weight: 600; }
.btn-primary { --bs-btn-bg: #1E3FB4; --bs-btn-border-color: #1E3FB4; --bs-btn-hover-bg: #183290; --bs-btn-hover-border-color: #183290; --bs-btn-active-bg: #142a78; --bs-btn-active-border-color: #142a78; }
.btn-secondary { --bs-btn-bg: #A02CFA; --bs-btn-border-color: #A02CFA; --bs-btn-hover-bg: #8a1fe0; --bs-btn-hover-border-color: #8a1fe0; --bs-btn-color: #fff; --bs-btn-hover-color: #fff; }
.btn-outline-primary { --bs-btn-color: #1E3FB4; --bs-btn-border-color: #1E3FB4; --bs-btn-hover-bg: #1E3FB4; --bs-btn-hover-border-color: #1E3FB4; }
.btn { border-radius: .75rem; font-weight: 500; padding: .5rem 1.1rem; }
.btn-sm { padding: .3rem .75rem; border-radius: .6rem; }
.form-control, .form-select { border-radius: .75rem; padding: .6rem .9rem; border-color: #e6e6e6; }
.form-control:focus, .form-select:focus { border-color: #1E3FB4; box-shadow: 0 0 0 .2rem rgba(30, 63, 180, .12); }
.form-label { font-weight: 500; color: #212529; }
.card { border: 0; border-radius: 1rem; box-shadow: var(--gy-shadow); }
.card-header { background: transparent; border-bottom: 1px solid #f0f0f0; padding: 1.25rem 1.5rem; }
.card-body { padding: 1.5rem; }
.table > :not(caption) > * > * { padding: .9rem 1rem; vertical-align: middle; }
.table thead th { font-weight: 600; color: #212529; border-bottom-width: 1px; background: transparent; }
.badge { font-weight: 500; border-radius: .5rem; padding: .4em .7em; }
.badge-soft-primary { background: #E8ECF7; color: #1E3FB4; }
.badge-soft-success { background: #DFF5E5; color: #1b8a3b; }
.badge-soft-danger { background: #FEE3ED; color: #d4286a; }
.badge-soft-warning { background: #FFF4DB; color: #a37300; }
.badge-soft-secondary { background: #F0DFFE; color: #7d16d4; }
.badge-soft-gray { background: #eee; color: #666; }

/* Layout */
.gy-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--gy-sidebar-w); background: #fff; box-shadow: var(--gy-shadow); z-index: 1040; display: flex; flex-direction: column; transition: transform .25s; }
.gy-brand { height: var(--gy-header-h); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; font-weight: 700; font-size: 1.15rem; color: #212529; text-decoration: none; }
.gy-brand .logo { width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: linear-gradient(135deg, #1E3FB4, #A02CFA); color: #fff; display: grid; place-items: center; font-size: 1.2rem; }
.gy-menu { list-style: none; margin: 0; padding: .5rem 1rem; flex: 1; overflow-y: auto; }
.gy-menu .section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #a5a5a5; padding: 1rem .75rem .4rem; font-weight: 600; }
.gy-menu a { display: flex; align-items: center; gap: .85rem; padding: .8rem .9rem; border-radius: .8rem; color: #7e7e7e; text-decoration: none; font-weight: 500; margin-bottom: .15rem; }
.gy-menu a i { font-size: 1.2rem; }
.gy-menu a:hover { background: #f4f6fb; color: #1E3FB4; }
.gy-menu a.active { background: var(--gy-soft); color: #1E3FB4; }
.gy-sidebar-foot { padding: 1rem 1.5rem; font-size: .75rem; color: #a5a5a5; }
.gy-main { margin-left: var(--gy-sidebar-w); min-height: 100vh; }
.gy-header { height: var(--gy-header-h); background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 1.75rem; box-shadow: var(--gy-shadow); position: sticky; top: 0; z-index: 1030; }
.gy-header h1 { font-size: 1.25rem; margin: 0; }
.gy-content { padding: 1.75rem; }
.gy-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--gy-soft); color: #1E3FB4; display: grid; place-items: center; font-weight: 600; }
.gy-stat { display: flex; align-items: center; gap: 1rem; }
.gy-stat .ico { width: 3.5rem; height: 3.5rem; border-radius: 1rem; display: grid; place-items: center; font-size: 1.6rem; }
.gy-stat .num { font-size: 1.75rem; font-weight: 700; color: #212529; line-height: 1.1; }
.gy-acting { background: linear-gradient(90deg, #A02CFA, #1E3FB4); color: #fff; padding: .6rem 1.75rem; display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.gy-login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 20% 10%, #E8ECF7, #F9F9F9 55%); }
@media (max-width: 991px) {
  .gy-sidebar { transform: translateX(-100%); }
  .gy-sidebar.open { transform: none; }
  .gy-main { margin-left: 0; }
  .gy-content { padding: 1rem; }
  .gy-header { padding: 0 1rem; }
}

/* Chat */
[x-cloak] { display: none !important; }
.gy-chat { display: flex; flex-direction: row; height: calc(100vh - var(--gy-header-h) - 3.5rem); min-height: 32rem; overflow: hidden; margin: 0; height: calc(100vh - var(--gy-header-h) - 3.5rem); }
.gy-chat-list { width: 22rem; flex-shrink: 0; border-right: 1px solid #f0f0f0; display: flex; flex-direction: column; background: #fff; }
.gy-chat-list .list { overflow-y: auto; flex: 1; }
.gy-chat-list .item { display: flex; gap: .75rem; padding: .85rem 1rem; text-decoration: none; color: #7e7e7e; border-bottom: 1px solid #f7f7f7; }
.gy-chat-list .item:hover { background: #f7f8fc; }
.gy-chat-list .item.active { background: var(--gy-soft); }
.gy-chat-list .item strong { color: #212529; font-weight: 600; }
.min-w-0 { min-width: 0; }
.min-h-0 { min-height: 0; }
.gy-chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #F4F6FB; }
.gy-chat-head { background: #fff; padding: .85rem 1.25rem; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: .75rem; }
.msgs { flex: 1; overflow-y: auto; padding: .9rem 1.1rem; min-height: 0; }
.day-sep { text-align: center; margin: .7rem 0 .35rem; }
.day-sep span { background: #fff; color: #8a8a8a; font-size: .66rem; padding: .12rem .6rem; border-radius: 1rem; box-shadow: var(--gy-shadow); }
.mrow { display: flex; margin-top: .12rem; }
.mrow.first { margin-top: .55rem; }
.mrow.out { justify-content: flex-end; }
.bubble { max-width: min(62%, 34rem); padding: .32rem .6rem; border-radius: .85rem; font-size: .8125rem; line-height: 1.35; white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 1px 1px rgba(82, 63, 105, .08); display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: .5rem; }
.bubble.in { background: #fff; color: #3d3d3d; border: 1px solid #eceff6; }
.bubble.out { background: linear-gradient(135deg, #1E3FB4, #3a56c9); color: #fff; }
.mrow.in.last .bubble { border-bottom-left-radius: .25rem; }
.mrow.out.last .bubble { border-bottom-right-radius: .25rem; }
.bsender, .btag { flex-basis: 100%; font-size: .66rem; opacity: .8; }
.bsender { font-weight: 600; }
.btext { min-width: 0; }
.bmeta { margin-left: auto; font-size: .62rem; opacity: .7; white-space: nowrap; display: inline-flex; gap: .2rem; align-items: center; padding-top: .1rem; }
.bmeta .read { color: #7ee0ff; opacity: 1; }
.bubble a { color: inherit; text-decoration: underline; }
.bubble.in a { color: #1E3FB4; }
.media-img { flex-basis: 100%; display: block; margin: .1rem 0 .2rem; text-decoration: none; }
.media-img img { display: block; max-width: 14rem; max-height: 11rem; border-radius: .6rem; object-fit: cover; }
.bubble audio { flex-basis: 100%; width: 15rem; max-width: 100%; height: 2.1rem; }
.bubble video { flex-basis: 100%; max-width: 15rem; max-height: 11rem; border-radius: .6rem; }
.bubble.sticker { background: transparent; border: 0; box-shadow: none; padding: 0; }
.bubble.sticker .media-img img { max-width: 7rem; max-height: 7rem; }
.bubble.failed { background: #fff; color: #c2255c; border: 1px solid #F94687; }
.bdoc { flex-basis: 100%; display: inline-flex; align-items: center; gap: .35rem; padding: .25rem 0; font-weight: 500; }
.bmissing { flex-basis: 100%; opacity: .75; }
.err-line { flex-basis: 100%; font-size: .66rem; color: #d4286a; }
.gy-chat-compose { background: #fff; padding: .75rem 1rem; border-top: 1px solid #f0f0f0; }
.tpl-panel { background: #F9F9F9; border-radius: .75rem; padding: .75rem; }
.tpl-preview { background: #fff; border-radius: .6rem; padding: .6rem .8rem; white-space: pre-wrap; font-size: .8rem; }
@media (max-width: 991px) {
  .gy-chat { height: calc(100vh - var(--gy-header-h) - 2rem); }
  .gy-chat-list { width: 100%; }
  .gy-chat.has-selected .gy-chat-list { display: none; }
  .gy-chat:not(.has-selected) .gy-chat-main { display: none; }
  .bubble { max-width: 86%; }
}

/* Kanban */
.kanban { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; min-height: 60vh; }
.kcol { flex: 0 0 18rem; width: 18rem; background: #eef0f6; border-radius: 1rem; display: flex; flex-direction: column; max-height: calc(100vh - var(--gy-header-h) - 9rem); }
.kcol-head { background: #fff; border-radius: 1rem 1rem 0 0; border-top: 4px solid #1E3FB4; padding: .8rem 1rem; box-shadow: var(--gy-shadow); }
.kcol-body { padding: .6rem; overflow-y: auto; min-height: 4rem; flex: 1; }
.kcard { background: #fff; border-radius: .8rem; padding: .75rem .85rem; margin-bottom: .6rem; box-shadow: var(--gy-shadow); cursor: grab; }
.kcard:hover { box-shadow: 0 .4rem .9rem rgba(82, 63, 105, .14); }
.kghost { opacity: .45; background: var(--gy-soft); }
.kempty { color: #aaa; }
.gy-modal { position: fixed; inset: 0; background: rgba(20, 24, 40, .45); z-index: 2000; display: grid; place-items: center; padding: 1rem; }
.gy-modal-card { background: #fff; border-radius: 1rem; padding: 1.5rem; width: 100%; max-width: 28rem; box-shadow: 0 1rem 3rem rgba(0, 0, 0, .2); }
@media (max-width: 575px) { .kcol { flex-basis: 85vw; width: 85vw; } }

/* Relatórios */
.rbars { display: flex; align-items: flex-end; gap: 3px; height: 14rem; padding-top: 1.2rem; }
.rbar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; padding-bottom: 1.2rem; }
.rbar-fill { width: 100%; max-width: 1.6rem; background: linear-gradient(180deg, #3a56c9, #1E3FB4); border-radius: .35rem .35rem 0 0; display: block; }
.rbar:hover .rbar-fill { background: #A02CFA; }
.rbar-n { font-size: .65rem; color: #212529; margin-bottom: 2px; min-height: .9rem; }
.rbar-l { position: absolute; bottom: 0; font-size: .62rem; color: #8a8a8a; white-space: nowrap; }
.hbar { height: .55rem; background: #eef0f6; border-radius: 1rem; overflow: hidden; }
.hbar span { display: block; height: 100%; border-radius: 1rem; }
