:root {
    --ink: #0F172A;
    --muted: #687b76;
    --paper: #F8FAFC;
    --card: #FFFFFF;
    --line: #E2E8F0;
    --green: #0A196F;
    --green-2: #FF1E66;
    --mint: rgba(10, 25, 111, 0.08);
    --gold: #d8a53e;
    --danger: #b83f4c;
    --shadow: 0 16px 45px rgba(23, 59, 53, .09);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.5; }
a { color: var(--green-2); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.topbar {
    min-height: 76px;
    padding: 12px clamp(18px, 4vw, 52px);
    display: flex;
    align-items: center;
    gap: 28px;
    background: var(--green);
    color: white;
}
.brand { display: flex; align-items: center; gap: 10px; color: white; min-width: 210px; }
.brand span:last-child, .user-menu span { display: flex; flex-direction: column; }
.brand small, .user-menu small { color: rgba(255,255,255,.65); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand-logo {
    position: relative; width: 52px; height: 52px; flex: 0 0 auto; display: block; overflow: hidden;
    border-radius: 14px;
}
.brand-logo img {
    position: absolute; width: 178%; height: 178%; max-width: none; left: -39%; top: -39%; object-fit: contain;
}
.brand-logo-white { background: rgba(255,255,255,.08); }
.brand-logo-green { background: white; border: 1px solid var(--line); }
.brand-logo-hero { width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 28px; }
.brand-logo-footer { width: 34px; height: 34px; border-radius: 9px; }
.main-nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.main-nav a { color: rgba(255,255,255,.78); padding: 9px 11px; border-radius: 9px; font-size: 14px; }
.main-nav a:hover { color: white; background: rgba(255,255,255,.08); }
.user-menu { display: flex; align-items: center; gap: 12px; text-align: right; }
.logout-form { margin: 0; }
.nav-toggle { display: none; }

.main-content { width: min(1240px, calc(100% - 32px)); margin: 30px auto 70px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; font-size: clamp(27px, 4vw, 40px); letter-spacing: -.04em; }
.page-heading p { margin: 5px 0 0; color: var(--muted); }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { color: var(--green-2); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.stat { position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; width: 80px; height: 80px; border-radius: 50%; background: var(--mint); right: -25px; bottom: -35px; }
.stat-label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat-value { font-size: 32px; letter-spacing: -.05em; font-weight: 850; }
.stat-note { color: var(--muted); font-size: 12px; }

.button {
    appearance: none; border: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 11px 16px; background: var(--green); color: white; cursor: pointer; font-weight: 750; font-size: 14px;
}
.button:hover { background: var(--green-2); color: white; }
.button-secondary { background: var(--mint); color: var(--green); }
.button-secondary:hover { background: #cce9dc; color: var(--green); }
.button-danger { background: #fae8ea; color: var(--danger); }
.button-danger:hover { background: #f6d5d9; color: var(--danger); }
.button-ghost { background: transparent; border: 1px solid rgba(255,255,255,.25); }
.button-small { padding: 7px 11px; font-size: 12px; }
.button-block { width: 100%; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 750; }
.field small { color: var(--muted); }
.muted { color: var(--muted); }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], select, textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--ink); background: white; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(34,94,83,.12); }
textarea { min-height: 105px; resize: vertical; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 12px; }
.checkbox { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.alert { padding: 13px 16px; border-radius: 11px; margin: 0 0 20px; font-weight: 650; }
.alert-success { background: #dcf4e6; color: #145c38; }
.alert-warning { background: #fff2ce; color: #795300; }
.alert-danger { background: #fae2e5; color: #8d2632; }
.copy-feedback { position: fixed; z-index: 20; top: 92px; right: 22px; box-shadow: var(--shadow); }
.error-list { margin: 0 0 20px; padding: 13px 16px 13px 34px; border-radius: 11px; background: #fae2e5; color: #8d2632; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 11px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: 14px; }
.table-actions { display: flex; gap: 7px; white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 800; background: var(--mint); color: var(--green-2); }
.badge-pendente { background: #fff2ce; color: #795300; }
.badge-cancelado { background: #f3e4e6; color: #8d2632; }
.badge-agendada { background: #e8f0ff; color: #315a91; }
.badge-confirmada { background: #dff3ea; color: #225e53; }
.badge-aguardando_confirmacao, .badge-reagendamento_solicitado { background: #fff2ce; color: #795300; }
.badge-cancelada, .badge-nao_compareceu { background: #f3e4e6; color: #8d2632; }
.badge-concluida { background: #e4efe9; color: #35634f; }
.badge-block { background: #f1e8d7; color: #785928; }
.badge-email-pendente { background: #fff2ce; color: #795300; }
.badge-email-processando { background: #e8f0ff; color: #315a91; }
.badge-email-enviado { background: #dff3ea; color: #225e53; }
.badge-email-erro { background: #f3e4e6; color: #8d2632; }
.badge-email-ignorado { background: #edf0ef; color: #5f6f6b; }
.empty-state { padding: 34px 15px; text-align: center; color: var(--muted); }

.meeting-list { display: grid; gap: 10px; }
.meeting {
    display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px;
    padding: 13px; border: 1px solid var(--line); border-radius: 12px;
}
.meeting-time { font-weight: 850; color: var(--green-2); }
.meeting strong, .meeting small { display: block; }
.meeting small { color: var(--muted); }

.detail-list { display: grid; grid-template-columns: 150px 1fr; gap: 13px 18px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 650; }

.public-layout {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(216,165,62,.20), transparent 28%),
        radial-gradient(circle at 90% 90%, rgba(65,136,120,.24), transparent 30%),
        var(--green);
}
.public-main { width: min(960px, calc(100% - 28px)); margin: 0 auto; padding: 55px 0 70px; }
.public-hero { color: white; text-align: center; margin-bottom: 28px; }
.public-hero h1 { margin: 0; font-size: clamp(31px, 7vw, 55px); letter-spacing: -.06em; }
.public-hero p { color: rgba(255,255,255,.7); margin: 8px auto; max-width: 550px; }
.public-card { background: rgba(255,255,255,.98); border-radius: 22px; padding: clamp(20px, 5vw, 38px); box-shadow: 0 30px 80px rgba(0,0,0,.2); }
.slot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: block; padding: 11px 8px; text-align: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 750; }
.slot input:checked + span { color: white; background: var(--green-2); border-color: var(--green-2); }
.trap-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.login-wrap { width: min(430px, calc(100% - 28px)); margin: 0 auto; padding: 7vh 0; }
.login-brand { color: white; text-align: center; margin-bottom: 22px; }
.login-brand h1 { margin: 0; letter-spacing: -.04em; }
.login-page { min-height: 100dvh; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.login-page .public-main { width: min(960px, calc(100% - 28px)); min-height: 0; padding: clamp(14px, 3vh, 30px) 0; display: grid; place-items: center; }
.login-page-wrap { width: min(430px, 100%); padding: 0; }
.login-page .login-brand { margin-bottom: clamp(10px, 2vh, 18px); }
.login-page .login-brand p { margin: 5px 0 0; }
.login-page .brand-logo-hero { width: clamp(68px, 12vh, 96px); height: clamp(68px, 12vh, 96px); margin-bottom: 8px; border-radius: 23px; }
.login-page .public-card { padding: clamp(20px, 3.6vh, 30px); }
.login-page .public-card h2 { margin: 4px 0 15px; }
.login-field-gap { margin-top: 13px; }
.login-submit { margin-top: 18px; }
.login-page .site-footer { padding-block: 12px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px clamp(18px, 4vw, 52px); color: var(--muted); font-size: 12px; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; }
.public-layout .site-footer { color: rgba(255,255,255,.5); }

.calendar-shell { padding: 18px; }
.fc .fc-button-primary { background: var(--green); border-color: var(--green); }
.fc .fc-button-primary:hover { background: var(--green-2); border-color: var(--green-2); }
.fc .fc-prev-button, .fc .fc-next-button { min-width: 44px; font-size: 25px; line-height: 1; padding: 5px 12px; }
.fc .fc-event { border: 0; padding: 3px; cursor: pointer; }

@media (max-width: 980px) {
    .topbar { flex-wrap: wrap; gap: 12px; }
    .nav-toggle { display: inline-flex; margin-left: auto; border: 1px solid rgba(255,255,255,.25); color: white; background: transparent; border-radius: 9px; padding: 8px 11px; }
    .main-nav { display: none; order: 4; width: 100%; flex-direction: column; align-items: stretch; }
    .main-nav.is-open { display: flex; }
    .user-menu { margin-left: auto; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .main-content { width: min(100% - 22px, 1240px); margin-top: 20px; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .grid-2, .grid-4, .form-grid { grid-template-columns: 1fr; }
    .span-2, .field-full { grid-column: auto; }
    .user-menu span { display: none; }
    .card { border-radius: 14px; }
    .meeting { grid-template-columns: 58px 1fr; }
    .meeting .button { display: none; }
    .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-list { grid-template-columns: 1fr; gap: 3px; }
    .detail-list dd { margin-bottom: 9px; }
    .site-footer { flex-direction: column; }
    .fc .fc-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
}

/* Interface V2 */
:root {
    --green-950: #0d2d27;
    --green-900: #123b33;
    --green-800: #195247;
    --green-700: #267162;
    --green-100: #dcefe9;
    --green-50: #edf7f3;
    --gold-soft: #fff3d8;
    --orange-soft: #ffeadc;
    --paper: #F8FAFC;
    --shadow: 0 18px 50px rgba(16, 55, 47, .08);
}

body { overflow-x: hidden; background: var(--paper); }
.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 20; width: 254px; display: flex; flex-direction: column;
    padding: 24px 18px; color: white; background: var(--green-950);
}
.sidebar .brand { min-width: 0; gap: 12px; }
.sidebar .brand-logo, .mobile-header .brand-logo { width: 48px; height: 48px; flex-basis: 48px; border-radius: 15px; }
.sidebar .brand strong, .sidebar .brand small, .mobile-header .brand strong, .mobile-header .brand small { display: block; }
.sidebar .brand small { color: rgba(255,255,255,.55); }
.side-nav { display: grid; gap: 5px; margin-top: 40px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 11px 12px;
    color: rgba(255,255,255,.68); font-size: 13px; font-weight: 750; transition: .2s ease;
}
.nav-item:hover, .nav-item.is-active { color: white; background: rgba(255,255,255,.1); }
.nav-icon { width: 22px; color: #eac66e; font-size: 19px; text-align: center; }
.room-card {
    display: flex; align-items: center; gap: 10px; margin: auto 0 16px; padding: 13px;
    border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.05);
}
.live-dot { width: 8px; height: 8px; display: inline-block; flex: 0 0 8px; border-radius: 50%; background: #5ee1ad; box-shadow: 0 0 0 5px rgba(94,225,173,.12); }
.room-card strong, .room-card small, .profile-card strong, .profile-card small { display: block; }
.room-card strong, .profile-card strong { font-size: 12px; }
.room-card small, .profile-card small { margin-top: 2px; color: rgba(255,255,255,.5); font-size: 10px; }
.profile-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--green-900); background: var(--gold-soft); font-size: 11px; font-weight: 850; }
.avatar.has-photo { overflow: hidden; background: var(--green-50); }
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-card-main { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; color: white; }
.profile-card-main span:last-child { min-width: 0; }
.profile-card-main strong, .profile-card-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--green-800); background: white; font-size: 24px; }
.profile-card .icon-button { width: 28px; height: 28px; color: white; border-color: rgba(255,255,255,.12); background: transparent; }
.pwa-install-button {
    width: 100%; margin: auto 0 12px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.16);
    border-radius: 11px; color: white; background: rgba(255,255,255,.08); cursor: pointer;
    font-size: 11px; font-weight: 800;
}
.pwa-install-button:hover { background: rgba(255,255,255,.14); }
.pwa-install-button:not([hidden]) + .room-card { margin-top: 0; }
.main-content { width: auto; min-height: 100vh; margin: 0 0 0 254px; padding: 42px clamp(24px, 4vw, 64px) 70px; }
.mobile-header, .bottom-nav { display: none; }
.page-heading { align-items: end; margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; }
.page-heading p { font-size: 14px; }
.eyebrow { color: var(--green-700); font-size: 10px; letter-spacing: .14em; }
.heading-actions { align-items: center; }
.button { border-radius: 11px; padding: 12px 16px; font-size: 12px; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-secondary { background: var(--green-100); }
.button-light { color: var(--green-950); background: white; }
.text-button { color: var(--green-700); font-size: 12px; font-weight: 800; }
.card, .public-card { border-radius: 20px; box-shadow: var(--shadow); }

.dashboard-hero { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: 18px; }
.room-status {
    min-height: 270px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
    padding: 28px; border-radius: 22px; color: white;
    background: radial-gradient(circle at 92% 10%, rgba(216,165,62,.32), transparent 35%), var(--green-900); box-shadow: var(--shadow);
}
.room-status.is-occupied { background: radial-gradient(circle at 92% 10%, rgba(216,165,62,.38), transparent 35%), #4b4329; }
.room-status-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 999px; color: #c8f5e4; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.room-label { color: rgba(255,255,255,.5); font-size: 11px; font-weight: 700; }
.room-status p { margin: 0 0 5px; color: rgba(255,255,255,.55); font-size: 11px; }
.room-status h2 { max-width: 520px; margin: 0 0 9px; font-size: clamp(22px, 3vw, 31px); line-height: 1.15; letter-spacing: -.04em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; color: rgba(255,255,255,.65); font-size: 11px; }
.hero-meta span + span::before { content: "·"; margin-right: 8px; }
.metrics-grid { display: grid; gap: 18px; }
.metric-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.metric-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font-size: 21px; }
.metric-gold { color: #805e18; background: var(--gold-soft); }
.metric-mint { color: var(--green-700); background: var(--green-50); }
.metric-card strong, .metric-card span, .metric-card small { display: block; }
.metric-card strong { font-size: 29px; line-height: 1; }
.metric-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 34px 0 14px; }
.section-heading h2 { margin: 0; font-size: 21px; }
.timeline-card { padding: 7px 20px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.time-row { position: relative; display: grid; grid-template-columns: 62px 14px 1fr auto; align-items: center; gap: 14px; min-height: 79px; color: var(--ink); border-bottom: 1px solid var(--line); }
.time-row:last-child { border: 0; }
.time-row::before { content: ""; position: absolute; left: 82px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.time-row time { font-size: 10px; font-weight: 750; }
.time-row time strong { display: block; font-size: 12px; }
.timeline-dot { position: relative; z-index: 1; width: 9px; height: 9px; justify-self: center; border: 2px solid white; border-radius: 50%; background: var(--green-700); box-shadow: 0 0 0 2px var(--green-100); }
.meeting-info strong, .meeting-info small { display: block; }
.meeting-info strong { font-size: 13px; }
.meeting-info small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.public-link-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--green-50); }
.public-link-card h2 { margin: 0 0 4px; font-size: 18px; }
.public-link-card p { margin: 0; color: var(--muted); font-size: 12px; }
.filter-card { margin-bottom: 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; align-items: end; }
.filter-submit .button { width: 100%; }
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.summary-card { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.summary-card span, .summary-card strong { display: block; }
.summary-card span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.summary-card strong { margin-top: 7px; color: var(--green-800); font-size: 28px; }
.block-row { background: #fffaf0; }
.daily-breakdown { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.daily-breakdown h2 { margin: 2px 0 0; font-size: 18px; }
.breakdown-list { display: flex; flex-wrap: wrap; gap: 8px; }
.breakdown-list span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: var(--green-50); color: var(--green-800); font-size: 11px; }

.availability-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.availability-mode { position: relative; display: block; }
.availability-mode input { position: absolute; opacity: 0; pointer-events: none; }
.availability-mode span { min-height: 100%; display: block; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; }
.availability-mode strong, .availability-mode small { display: block; }
.availability-mode strong { margin-bottom: 4px; font-size: 13px; }
.availability-mode small { color: var(--muted); font-size: 10px; }
.availability-mode input:checked + span { border-color: var(--green-700); background: var(--green-50); box-shadow: 0 0 0 3px rgba(38,113,98,.1); }
.availability-fields.is-disabled { opacity: .45; pointer-events: none; }
.recipient-section { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--green-50); }
.recipient-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.recipient-heading label, .recipient-heading small { display: block; }
.recipient-list { display: grid; gap: 10px; margin-top: 14px; }
.recipient-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.whatsapp-section { padding: 18px; border: 1px solid #cfe4dc; border-radius: 16px; background: #f0f8f5; }
.whatsapp-master { color: var(--green-900); font-size: 14px; font-weight: 850; }
.whatsapp-fields { display: grid; gap: 18px; margin-top: 16px; }
.whatsapp-recipient-heading { margin-top: 2px; }
.whatsapp-number-control { display: grid; gap: 5px; }
.whatsapp-number-status { display: inline-flex; align-items: center; gap: 6px; min-height: 16px; font-size: 10px; font-weight: 800; }
.whatsapp-number-status::before { width: 7px; height: 7px; content: ""; border-radius: 50%; background: transparent; }
.whatsapp-number-status.is-valid { color: #247157; }
.whatsapp-number-status.is-valid::before { background: #35a477; box-shadow: 0 0 0 3px rgba(53,164,119,.12); }
.whatsapp-number-status.is-invalid { color: #9a3945; }
.whatsapp-number-status.is-invalid::before { background: #c94b5b; box-shadow: 0 0 0 3px rgba(201,75,91,.12); }
.link-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.table-actions form { margin: 0; }
.calendar-shell { padding: 20px; overflow: hidden; }
.fc .fc-toolbar-title { font-size: clamp(18px, 3vw, 26px); letter-spacing: -.04em; }
.fc .fc-button-primary { border-radius: 9px; box-shadow: none; }
.fc .fc-daygrid-day.fc-day-today, .fc .fc-timegrid-col.fc-day-today { background: var(--green-50); }
.fc .fc-event { border-left: 3px solid var(--green-700); border-radius: 6px; background: var(--green-50); color: var(--green-800); }
.table-wrap { border-radius: 14px; }
table { min-width: 760px; }
th { background: #fafcfb; }
.form-actions { align-items: center; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; padding: 11px 15px; border-radius: 10px; color: white; background: var(--green-950); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; font-size: 11px; font-weight: 800; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.pwa-ios-dialog {
    position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
    background: rgba(7, 26, 22, .66); backdrop-filter: blur(8px);
}
.pwa-ios-dialog-card { width: min(420px, 100%); padding: 26px; border-radius: 20px; background: white; box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.pwa-ios-dialog-card h2 { margin: 6px 0 10px; color: var(--green-950); font-size: 23px; }
.pwa-ios-dialog-card p { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
body.has-modal { overflow: hidden; }

.profile-page-grid { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: 20px; }
.profile-photo-card { display: flex; align-items: center; gap: 20px; }
.profile-photo-card h2 { margin: 0 0 4px; }
.profile-photo-card p { margin: 0 0 10px; color: var(--muted); }
.avatar-profile { width: 112px; height: 112px; flex: 0 0 112px; border-radius: 30px; font-size: 30px; }
.profile-upload-form { display: grid; gap: 18px; margin-top: 20px; }
.profile-upload-form .button { justify-self: start; }
.profile-remove-form { margin-top: 12px; }
.person-label { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.avatar-small { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; font-size: 9px; }
.avatar-event { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 6px; font-size: 7px; }
.calendar-event-person { display: flex; align-items: center; gap: 5px; min-width: 0; }
.calendar-event-person span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.public-layout { background: radial-gradient(circle at 10% 10%, rgba(216,165,62,.18), transparent 28%), radial-gradient(circle at 90% 90%, rgba(65,136,120,.24), transparent 30%), var(--green-950); }
.public-main { min-height: calc(100vh - 75px); }
.public-card { border: 1px solid rgba(255,255,255,.4); }
.site-footer { background: white; }
.public-layout .site-footer { background: transparent; }

@media (max-width: 1050px) {
    .sidebar { width: 212px; }
    .main-content { margin-left: 212px; }
    .dashboard-hero { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .sidebar { display: none; }
    .main-content { width: 100%; max-width: 100%; margin: 0; padding: 20px 14px 100px; overflow: hidden; }
    .mobile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; }
    .mobile-header .brand { min-width: 0; color: var(--green-950); }
    .mobile-header .brand small { color: var(--muted); }
    .mobile-header .brand-logo { width: 42px; height: 42px; flex-basis: 42px; }
    .mobile-user-actions { display: flex; align-items: center; gap: 8px; }
    .pwa-install-mobile { width: auto; margin: 0; padding: 8px 10px; color: var(--green-900); border-color: var(--line); background: white; }
    .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 6px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(15px); }
    .bottom-nav a { display: grid; gap: 2px; place-items: center; color: var(--muted); font-size: 9px; font-weight: 750; }
    .bottom-nav span { font-size: 20px; line-height: 1; }
    .bottom-nav a.is-active { color: var(--green-800); }
    .bottom-nav .new-mobile span { width: 40px; height: 40px; display: grid; place-items: center; margin-top: -21px; border-radius: 13px; color: white; background: var(--green-900); box-shadow: 0 7px 20px rgba(18,59,51,.25); }
    .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 20px; }
    .page-heading h1 { font-size: 32px; }
    .heading-actions { display: grid; grid-template-columns: 1fr; }
    .heading-actions .button { width: 100%; min-width: 0; }
    .dashboard-hero, .metrics-grid, .availability-modes { grid-template-columns: 1fr; }
    .filter-grid, .summary-grid { grid-template-columns: 1fr; }
    .daily-breakdown { align-items: stretch; flex-direction: column; }
    .room-status { min-width: 0; min-height: 250px; padding: 22px; border-radius: 18px; }
    .room-status h2 { overflow-wrap: anywhere; }
    .timeline-card { padding: 5px 13px; }
    .time-row { grid-template-columns: 50px 12px 1fr; gap: 10px; min-height: 84px; }
    .time-row::before { left: 66px; }
    .time-row .badge { display: none; }
    .public-link-card { align-items: stretch; flex-direction: column; }
    .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
    .span-2, .field-full { grid-column: auto; }
    .card { padding: 18px; border-radius: 16px; }
    .calendar-shell { padding: 8px; overflow-x: auto; }
    .calendar-shell #calendar { min-width: 0; }
    .fc .fc-toolbar { align-items: stretch; flex-direction: column; }
    .fc .fc-toolbar-chunk { display: flex; justify-content: center; }
    .fc .fc-toolbar-chunk:last-child, .fc .fc-toolbar-chunk:last-child .fc-button-group { width: 100%; }
    .fc .fc-toolbar-chunk:last-child .fc-button { flex: 1; padding-inline: 5px; font-size: 10px; }
    .fc .fc-daygrid-day-number { font-size: 11px; }
    .table-wrap { margin-inline: -18px; border-radius: 0; }
    .detail-list { grid-template-columns: 1fr; }
    .public-main { padding-top: 30px; }
    .login-page .public-main { padding: 12px 0; }
    .login-page .site-footer { display: none; }
    .login-page .brand-logo-hero { width: 72px; height: 72px; }
    .recipient-heading { align-items: stretch; flex-direction: column; }
    .recipient-heading .button { width: 100%; }
    .recipient-row { grid-template-columns: 1fr; }
    .recipient-row .button { width: 100%; }
    .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .copy-feedback { top: 18px; right: 14px; left: 14px; text-align: center; }
    .profile-page-grid { grid-template-columns: 1fr; }
    .profile-photo-card { align-items: flex-start; }
    .avatar-profile { width: 88px; height: 88px; flex-basis: 88px; border-radius: 24px; }
}

@media (max-height: 760px) and (min-width: 761px) {
    .login-page .public-main { padding: 10px 0; }
    .login-page .brand-logo-hero { width: 68px; height: 68px; }
    .login-page .login-brand h1 { font-size: 24px; }
    .login-page .public-card { padding: 18px 24px; }
    .login-page .public-card h2 { margin-bottom: 10px; }
    .login-page .field { gap: 4px; }
    .login-page .site-footer { padding-block: 8px; }
}

/* Agenda compartilhada */
[hidden] { display: none !important; }
.section-divider { margin: 28px 0; border: 0; border-top: 1px solid var(--line); }
.inline-field-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.meeting-mode-fields { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fafcfb; }
.calendar-filter-card { padding-block: 18px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px; color: var(--muted); font-size: 11px; font-weight: 700; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 7px; }
.calendar-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--legend-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--legend-color) 16%, transparent); }
.modality-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: white; background: var(--modality-color); font-size: 10px; font-weight: 800; }
.readonly-note { padding: 13px 15px; border: 1px solid #d7e5e0; border-radius: 12px; color: var(--green-800); background: var(--green-50); font-size: 12px; }
.email-history-heading { align-items: start; margin-top: 0; }
.email-history-heading > p { max-width: 420px; text-align: right; }
.email-attempt-heading { margin-top: 26px; }
.email-attempt-heading h3 { margin: 0; font-size: 16px; }
.email-recipient-list { display: grid; gap: 6px; min-width: 210px; }
.email-recipient-list span { display: grid; gap: 1px; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.email-recipient-list small { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.email-error-cell { max-width: 300px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.compact-heading { margin-top: 0; }
.compact-heading h2 { margin: 0; }
.operational-section {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fafcfb;
}
.operational-items { gap: 8px; }
.operational-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.detail-list-wide { grid-template-columns: 190px 1fr; }
.badge-operational-sala, .badge-operational-presencial { background: #dff3ea; color: #225e53; }
.badge-operational-online { background: #e8f0ff; color: #315a91; }
.badge-operational-externa { background: #ffeadc; color: #9a5b2d; }
.badge-operational-outro { background: #eee7f3; color: #6f5a86; }
.badge-operational-creditor { background: #fff2ce; color: #795300; }
.badge-operational-prepare, .badge-prep-pendente, .badge-prep-em_preparacao { background: #fff2ce; color: #795300; }
.badge-prep-sala_pronta { background: #dff3ea; color: #225e53; }
.badge-prep-falta_informacao { background: #fae2e5; color: #8d2632; }
.badge-prep-nao_precisa { background: #edf0ef; color: #5f6f6b; }
.badge-prep-cancelada { background: #f3e4e6; color: #8d2632; }
.badge-operational-important { background: #fae2e5; color: #8d2632; }
.staff-summary-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.alert-panel { border-color: #f1dca8; background: #fffaf0; }
.alert-list { display: grid; gap: 9px; }
.alert-list a {
    display: grid; gap: 2px; padding: 12px 14px; border: 1px solid #efd99d;
    border-radius: 13px; color: var(--ink); background: white;
}
.alert-list strong { font-size: 13px; }
.alert-list span { color: var(--muted); font-size: 11px; }
.quick-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-filter { border: 1px solid var(--line); background: white; }
.quick-filter.is-active { color: white; background: var(--green-800); border-color: var(--green-800); }

@media (max-width: 1050px) {
    .staff-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .email-history-heading > p { max-width: none; text-align: left; }
    .detail-list-wide { grid-template-columns: 1fr; }
    .staff-summary-grid { grid-template-columns: 1fr; }
}

.public-booking-card { max-width: 1120px; margin-inline: auto; }
.public-booking-grid { display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(320px, .9fr); gap: 28px; }
.public-calendar-panel, .public-slots-panel { min-width: 0; }
.public-calendar-toolbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 12px; margin-bottom: 18px; text-align: center; }
.public-calendar-toolbar h2 { margin: 3px 0 0; font-size: 22px; }
.icon-button.is-disabled { opacity: .28; cursor: not-allowed; }
.public-calendar-weekdays, .public-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.public-calendar-weekdays { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; }
.public-calendar-day { min-height: 58px; display: grid; place-items: center; align-content: center; gap: 1px; border: 1px solid #d4e4df; border-radius: 12px; color: var(--green-800); background: var(--green-50); transition: .16s ease; }
.public-calendar-day:hover { color: white; background: var(--green-700); border-color: var(--green-700); transform: translateY(-1px); }
.public-calendar-day span { font-size: 15px; font-weight: 850; line-height: 1; }
.public-calendar-day small { font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.public-calendar-day.is-selected { color: white; background: var(--green-900); border-color: var(--green-900); box-shadow: 0 7px 18px rgba(18, 59, 51, .22); }
.public-calendar-day.is-disabled { color: #a9b5b1; background: #f5f7f6; border-color: #edf1ef; }
.public-calendar-day.is-outside { opacity: .35; }
.public-calendar-note { margin: 14px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.public-slots-panel { padding-left: 28px; border-left: 1px solid var(--line); }
.public-slots-panel h2 { margin: 3px 0 0; }
.public-contact-fields { margin-top: 24px; }
.public-slots-panel .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 220px; overflow-y: auto; padding-right: 4px; }
form[aria-busy="true"] { opacity: .72; pointer-events: none; }
button:disabled { cursor: wait; opacity: .72; transform: none !important; }

@media (max-width: 900px) {
    .public-booking-grid { grid-template-columns: 1fr; }
    .public-slots-panel { padding: 25px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 700px) {
    .inline-field-action { grid-template-columns: 1fr; }
    .inline-field-action .button { width: 100%; }
    .calendar-legend { gap: 8px 12px; }
    .public-booking-card { padding: 18px 14px; }
    .public-calendar-toolbar { grid-template-columns: 40px 1fr 40px; }
    .public-calendar-day { min-height: 46px; border-radius: 9px; }
    .public-calendar-day span { font-size: 13px; }
    .public-calendar-day small { display: none; }
    .public-calendar-weekdays, .public-calendar-grid { gap: 4px; }
    .public-slots-panel .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
}

@media (max-width: 380px) {
    .public-calendar-day { min-height: 40px; }
    .public-calendar-toolbar h2 { font-size: 18px; }
}


/* =========================================================================
   ESTILOS ESPECÍFICOS LABFLOW (Cards, Grid de Horários e Kanban)
   ========================================================================= */

.room-card-box {
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.room-card-box:hover {
    border-color: rgba(10, 25, 111, 0.3);
    box-shadow: 0 8px 20px rgba(10, 25, 111, 0.06);
}

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 14px;
}

.room-code-badge {
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(10, 25, 111, 0.08);
    color: #0A196F;
    font-weight: 800;
    font-family: monospace;
    font-size: 13px;
    border: 1px solid rgba(10, 25, 111, 0.18);
}

.slots-grid-16 {
    display: grid;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    gap: 6px;
}

@media (max-width: 1200px) {
    .slots-grid-16 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .slots-grid-16 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.slot-pill {
    min-height: 44px;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-align: center;
    cursor: default;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s ease;
}

.slot-pill span.slot-time {
    font-family: monospace;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
}
.slot-pill span.slot-label {
    font-size: 9px;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 2px;
}

.slot-free {
    background: #FFFFFF;
    border: 1.5px dashed #CBD5E1;
    color: #0F172A;
    cursor: pointer;
}
.slot-free:hover {
    border-color: #0A196F;
    background: #F8FAFC;
    transform: translateY(-1px);
}

.slot-selected {
    background: #0A196F !important;
    border: 1.5px solid #0A196F !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(10, 25, 111, 0.25);
    cursor: pointer;
}

.slot-fixed {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    color: #92400E;
}

.slot-my-fixed {
    background: #FDE68A;
    border: 1.5px solid #F59E0B;
    color: #78350F;
    font-weight: 800;
}

.slot-released {
    background: #D1FAE5;
    border: 1.5px solid #34D399;
    color: #065F46;
    cursor: pointer;
}
.slot-released:hover {
    background: #A7F3D0;
    transform: translateY(-1px);
}

.slot-occupied {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #94A3B8;
}

.slot-mine {
    background: #EDE9FE;
    border: 1.5px solid #A78BFA;
    color: #5B21B6;
}

.slot-event {
    background: #581C87;
    border: 1px solid #3B0764;
    color: #FFFFFF;
}

.slot-viewonly {
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    color: #94A3B8;
}

/* Kanban Board Manutenção */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}
@media (max-width: 900px) {
    .kanban-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .kanban-board { grid-template-columns: 1fr; }
}

.kanban-column {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 420px;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 10px;
    border-bottom: 2px solid #E2E8F0;
}

.kanban-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}