/* ============================================================
   DC Hub — Ocean Sunset Theme
   ============================================================ */

/* --- Custom Properties --- */
:root {
    --preto-profundo: #001219;
    --ciano-escuro: #005F73;
    --verde-agua-escuro: #0A9396;
    --verde-agua-claro: #94D2BD;
    --creme-suave: #E9D8A6;
    --laranja-vibrante: #EE9B00;
    --laranja-queimado: #CA6702;
    --vermelho-terracota: #BB3E03;
    --vermelho-rubra: #AE2012;
    --vermelho-vinho: #9B2226;

    --font-primary: 'Roboto', sans-serif;
    --font-accent: 'Oxanium', sans-serif;

    /* rem escala com html (desktop usa font-size 150% ≈ zoom do navegador a 150%) */
    --topbar-height: 3.875rem;
    --topbar-v-offset: 1.125rem;
    --layout-max: 68.75rem;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-primary);
    font-weight: 400;
    color: var(--preto-profundo);
    background-color: var(--creme-suave);
}

.app-shell {
    padding-top: calc(var(--topbar-height) + var(--topbar-v-offset) * 2 + 0.5rem);
    min-height: 100vh;
}

html {
    -webkit-text-size-adjust: 100%;
}

button,
.dc-btn,
.dc-arrow,
.dc-select,
.calendar-day,
.btn-view-pill,
.btn-fab {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   FLOATING PILL NAVBAR
   ============================================================ */
.dc-topbar {
    position: fixed;
    top: var(--topbar-v-offset);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: var(--layout-max);
    height: var(--topbar-height);
    background-color: var(--preto-profundo);
    border-radius: 100px;
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: 0 4px 20px rgba(0,18,25,.28);
}

.dc-topbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.dc-nav-drawer {
    display: contents;
}

.dc-menu-toggle {
    display: none;
}

.dc-drawer-label {
    display: none;
}

.dc-mobile-auth-links {
    display: none;
}

.dc-auth-desktop {
    display: block;
}

/* Brand */
.dc-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding-right: 1.5rem;
    border-right: 1px solid rgba(233,216,166,.15);
    margin-right: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}
.dc-brand-logo {
    height: 2.125rem;
    width: auto;
    display: block;
}
.dc-brand:hover .dc-brand-logo {
    opacity: .85;
}

/* Group filter */
.dc-filter {
    flex-shrink: 0;
    margin-right: 1.25rem;
}

.dc-select {
    background-color: transparent;
    border: none;
    color: var(--creme-suave);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: .875rem;
    cursor: pointer;
    outline: none;
    padding: .25rem 1.75rem .25rem 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1.5L5 4.5L9 1.5' stroke='%23E9D8A6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .35rem center;
    background-size: 10px 6px;
    transition: color .2s;
}
.dc-select option { background: var(--preto-profundo); color: var(--creme-suave); }
.dc-select:hover { color: var(--verde-agua-escuro); }

/* Month navigation */
.dc-month-nav {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    margin: 0 auto;
}

.dc-arrow {
    background: none;
    border: none;
    color: var(--creme-suave);
    font-size: .85rem;
    cursor: pointer;
    padding: .2rem .35rem;
    line-height: 1;
    transition: color .2s;
    border-radius: 50%;
}
.dc-arrow:hover { color: var(--verde-agua-escuro); }

.dc-month-label {
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--creme-suave);
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.dc-year-label {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: .85rem;
    color: rgba(233,216,166,.6);
    white-space: nowrap;
}

.dc-month-labels {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: .4rem;
    line-height: 1.15;
}

/* Search */
.dc-search {
    flex-shrink: 0;
    margin-right: 1.25rem;
}

.dc-search-field {
    position: relative;
}

.dc-search input {
    display: block;
    width: 100%;
    background: rgba(233,216,166,.92);
    border: none;
    border-radius: 100px;
    padding: .38rem 2.25rem .38rem 1rem;
    color: var(--preto-profundo);
    font-size: .84rem;
    transition: width .3s, box-shadow .2s;
    outline: none;
}
.dc-search input:focus {
    box-shadow: 0 0 0 2px var(--verde-agua-escuro);
}

.dc-search-icon {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ciano-escuro);
    font-size: .95rem;
    line-height: 1;
    pointer-events: none;
}

/* Auth area */
.dc-auth {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.dc-btn {
    background: none;
    border: none;
    color: var(--creme-suave);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: .875rem;
    cursor: pointer;
    padding: .3rem .5rem;
    border-radius: 8px;
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.dc-btn:hover { color: var(--verde-agua-escuro); }
.dc-btn.dc-btn-outline {
    border: 1.5px solid rgba(233,216,166,.5);
    padding: .3rem .85rem;
    border-radius: 100px;
}
.dc-btn.dc-btn-outline:hover {
    border-color: var(--verde-agua-escuro);
    color: var(--verde-agua-escuro);
    background: rgba(10,147,150,.1);
}

/* Dropdown trigger in navbar */
.dc-dropdown .dropdown-toggle {
    background: none !important;
    border: none !important;
    color: var(--creme-suave) !important;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: .875rem;
    padding: .3rem .5rem;
    white-space: nowrap;
    box-shadow: none !important;
}
.dc-dropdown .dropdown-toggle::after {
    border-top-color: var(--creme-suave);
}
.dc-dropdown .dropdown-toggle:hover {
    color: var(--verde-agua-escuro) !important;
}

/* search icon alias kept for legacy */
.search-bar { position: relative; }
.search-bar input {
    background-color: var(--creme-suave);
    border: none;
    border-radius: 20px;
    padding: .4rem 2.2rem .4rem 1rem;
    color: var(--preto-profundo);
    font-size: .85rem;
    width: 180px;
    transition: width .3s;
}

.search-bar input:focus {
    width: 240px;
    outline: 2px solid var(--verde-agua-escuro);
}

.search-bar .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--preto-profundo);
    pointer-events: none;
}

/* --- Calendar Grid --- */
.calendar-container {
    max-width: var(--layout-max);
    margin: 0 auto 2rem;
    padding: 1.5rem 1.75rem;
    min-height: calc(100vh - var(--topbar-height) - var(--topbar-v-offset) * 2 - 5rem);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,18,25,.08);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    color: var(--preto-profundo);
    padding: .5rem 0;
    border-bottom: 2px solid var(--verde-agua-claro);
    margin-bottom: .25rem;
}

.day-name-full  { display: inline; }
.day-name-short { display: none; }

.calendar-container:has(.week-view) .calendar-header,
.calendar-container:has(.day-view) .calendar-header {
    display: none;
}

.calendar-container:has(.week-view) {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--topbar-height) - var(--topbar-v-offset) * 2 - 100px);
    padding-bottom: 1rem;
}

.calendar-container:has(.week-view) .week-view {
    flex: 1;
    min-height: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    background: #fafafa;
    min-height: 6.875rem;
    padding: .5rem;
    border-radius: 8px;
    border: 1px solid rgba(148,210,189,.3);
    transition: box-shadow .2s, background .2s, border-color .2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.calendar-day:hover {
    background: #fff;
    border-color: var(--verde-agua-claro);
    box-shadow: 0 2px 8px rgba(0,18,25,.1);
}

.calendar-day.other-month {
    opacity: .3;
}

.calendar-day.today {
    border: 2px solid var(--verde-agua-escuro);
    background: rgba(10,147,150,.06);
    box-shadow: 0 0 0 1px rgba(10,147,150,.12);
}

.day-number {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--preto-profundo);
    margin-bottom: .35rem;
}

/* Event cards inside calendar cells */
.event-card {
    background: var(--verde-agua-claro);
    border-left: 3px solid var(--ciano-escuro);
    border-radius: 4px;
    padding: .2rem .4rem;
    margin-bottom: .2rem;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    overflow: hidden;
}

.event-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,18,25,.15);
}

.event-card .event-title {
    font-weight: 700;
    font-size: .7rem;
    color: var(--preto-profundo);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card .event-group {
    font-family: var(--font-accent);
    font-size: .6rem;
    color: var(--ciano-escuro);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-share-box .form-control {
    font-size: .75rem;
}

.event-card .event-time {
    font-size: .6rem;
    color: var(--preto-profundo);
    opacity: .7;
}

.day-events-meta {
    display: none;
}

/* --- Day View --- */
.day-view {
    padding: .5rem 0;
    background: #fff;
    border-radius: 8px;
}

.day-view-header h4 {
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--preto-profundo);
    margin-bottom: 1rem;
}

.day-back-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: none;
    border: none;
    padding: 0 0 .75rem;
    color: var(--ciano-escuro);
    font-weight: 700;
    font-size: .875rem;
    cursor: pointer;
}

.day-back-btn:hover {
    color: var(--verde-agua-escuro);
}

.day-time-slot {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(148,210,189,.3);
}

.time-label {
    flex-shrink: 0;
    width: 3.25rem;
    text-align: right;
    font-size: .78rem;
    color: var(--ciano-escuro);
    font-weight: 700;
    line-height: 1.3;
}

/* --- Week View --- */
.week-view {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--topbar-height) - var(--topbar-v-offset) * 2 - 180px);
}

.week-scroll {
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.week-time-rail {
    padding-top: 3.625rem;
    border-right: 1px solid rgba(148,210,189,.35);
}

.week-hour-label {
    height: 3rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: .15rem .45rem 0 0;
    font-size: .68rem;
    font-weight: 700;
    color: var(--ciano-escuro);
    border-top: 1px solid rgba(148,210,189,.3);
    box-sizing: border-box;
}

.week-hour-label:first-child {
    border-top: none;
}

.week-columns {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.week-day-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(148,210,189,.25);
}

.week-day-column:last-child {
    border-right: none;
}

.week-day-header {
    text-align: center;
    padding: .45rem .25rem;
    font-weight: 700;
    font-size: .8rem;
    min-height: 3.625rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    border-bottom: 2px solid var(--verde-agua-claro);
}

.week-day-header .day-name {
    display: block;
    color: rgba(0,18,25,.55);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1;
}

.week-day-header .day-number {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--preto-profundo);
    line-height: 1;
    flex-shrink: 0;
}

.week-day-header.today .day-number {
    background: var(--verde-agua-escuro);
    color: #fff;
    border-radius: 50%;
}

.week-day-body {
    position: relative;
    background: #fafafa;
}

.week-day-body.week-time-grid {
    border-top: none;
}

.week-hour-slot {
    height: 3rem;
    border-top: 1px solid rgba(148,210,189,.25);
    box-sizing: border-box;
    pointer-events: none;
}

.week-hour-slot:first-child {
    border-top: none;
}

.week-event-card {
    position: absolute;
    left: 3px;
    right: 3px;
    z-index: 1;
    margin-bottom: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: .25rem .35rem;
}

/* --- Floating Buttons --- */
.floating-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    pointer-events: none;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* View toggle pill — holds two icons side by side */
.btn-view-pill {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0;
    background-color: var(--ciano-escuro);
    border: none;
    border-radius: 16px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background-color .2s, transform .2s;
    box-shadow: 0 3px 12px rgba(0,18,25,.35);
    gap: 8px;
}

.btn-view-pill:hover {
    background-color: var(--verde-agua-escuro);
    transform: scale(1.04);
}

.btn-view-pill img {
    width: 1.5rem;
    height: 1.5rem;
    filter: brightness(0) invert(1);
    opacity: .7;
    transition: opacity .2s;
}

.btn-view-pill img.view-active {
    opacity: 1;
    filter: brightness(0) invert(1) sepia(1) hue-rotate(155deg) saturate(4);
}

.btn-view-pill .pill-divider {
    width: 1px;
    height: 22px;
    background: rgba(233,216,166,.25);
    flex-shrink: 0;
}

.btn-fab {
    pointer-events: auto;
    width: 3.625rem;
    height: 3.625rem;
    border-radius: 50%;
    background-color: var(--laranja-vibrante);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s, transform .2s;
    box-shadow: 0 4px 16px rgba(238,155,0,.45);
    color: var(--preto-profundo);
    font-size: 1.6rem;
    line-height: 1;
}

.btn-fab:hover {
    background-color: var(--laranja-queimado);
    color: #fff;
    transform: scale(1.08);
}

/* --- Modal Overrides --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
}

.modal-backdrop.show {
    background-color: var(--preto-profundo);
    opacity: 0.82;
}

.modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,18,25,.35);
    overflow: hidden;
}

.modal-header {
    background-color: var(--preto-profundo);
    color: var(--creme-suave);
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(233,216,166,.12);
    padding: 1rem 1.25rem;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

.modal-title {
    font-family: var(--font-accent);
    font-weight: 600;
}

.modal-body {
    background: #fff;
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    background: #f8faf9;
    border-top: 1px solid rgba(148,210,189,.35);
    padding: .85rem 1.25rem;
}

.modal-body .form-label {
    font-weight: 600;
    color: var(--preto-profundo);
    font-size: .875rem;
    margin-bottom: .35rem;
}

.modal-body .form-control,
.modal-body .form-select,
.modal-body textarea.form-control {
    border: 1.5px solid var(--verde-agua-claro);
    border-radius: 8px;
    padding: .5rem .75rem;
    color: var(--preto-profundo);
    transition: border-color .2s, box-shadow .2s;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus,
.modal-body textarea.form-control:focus {
    border-color: var(--verde-agua-escuro);
    box-shadow: 0 0 0 0.2rem rgba(10,147,150,.18);
}

.modal-body .form-control::placeholder {
    color: rgba(0,18,25,.4);
}

.modal-body .table {
    --bs-table-border-color: rgba(148,210,189,.4);
}

.modal-body .table thead th {
    background: rgba(148,210,189,.2);
    color: var(--preto-profundo);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 2px solid var(--verde-agua-claro);
}

.role-request-notice {
    background: rgba(148,210,189,.12) !important;
    border-color: var(--verde-agua-claro) !important;
    color: var(--preto-profundo);
}

.btn-dc-primary {
    background-color: var(--ciano-escuro);
    border-color: var(--ciano-escuro);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color .2s;
}

.btn-dc-primary:hover {
    background-color: var(--verde-agua-escuro);
    border-color: var(--verde-agua-escuro);
    color: #fff;
}

.btn-dc-secondary {
    background-color: var(--verde-agua-claro);
    border-color: var(--verde-agua-claro);
    color: var(--preto-profundo);
    font-weight: 600;
    border-radius: 8px;
}

.btn-dc-secondary:hover {
    background-color: #7cc4a9;
    border-color: #7cc4a9;
    color: var(--preto-profundo);
}

.btn-dc-warning {
    background-color: var(--laranja-vibrante);
    border-color: var(--laranja-vibrante);
    color: var(--preto-profundo);
    font-weight: 600;
    border-radius: 8px;
}

.btn-dc-warning:hover {
    background-color: var(--laranja-queimado);
    border-color: var(--laranja-queimado);
    color: #fff;
}

.btn-dc-danger {
    background-color: var(--vermelho-terracota);
    border-color: var(--vermelho-terracota);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
}

.btn-dc-danger:hover {
    background-color: var(--vermelho-rubra);
    border-color: var(--vermelho-rubra);
    color: #fff;
}

/* Status Badges */
.badge-rsvp {
    background-color: var(--laranja-vibrante);
    color: var(--preto-profundo);
}

.badge-presente {
    background-color: var(--verde-agua-escuro);
    color: #fff;
}

.badge-ausente {
    background-color: var(--vermelho-terracota);
    color: #fff;
}

.badge-role-adm {
    background-color: var(--vermelho-vinho);
    color: #fff;
}

.badge-role-proj {
    background-color: var(--ciano-escuro);
    color: #fff;
}

.badge-role-user {
    background-color: var(--verde-agua-claro);
    color: var(--preto-profundo);
}

/* --- Alerts --- */
.toast-container {
    position: fixed;
    top: 70px;
    right: 1rem;
    z-index: 1100;
}

/* --- Responsive (mobile-first) --- */

/* Tablet */
@media (max-width: 900px) {
    .dc-topbar {
        width: calc(100% - 24px);
        padding: 0 1rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    :root {
        --topbar-height: 3.25rem;
        --topbar-v-offset: 8px;
    }

    .app-shell {
        padding-top: calc(var(--topbar-height) + var(--topbar-v-offset) * 2 + 0.35rem);
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    }

    .dc-topbar {
        width: calc(100% - 16px);
        height: var(--topbar-height);
        border-radius: 14px;
        padding: 0 .5rem 0 .65rem;
    }

    .dc-topbar-inner {
        flex-wrap: wrap;
        gap: .35rem;
        align-items: center;
    }

    .dc-brand {
        flex-shrink: 0;
        order: 1;
    }

    .dc-month-nav {
        order: 2;
        flex: 1;
        min-width: 0;
        margin: 0;
        justify-content: center;
        gap: .15rem;
    }

    .dc-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 3;
        flex-shrink: 0;
        width: 2.5rem;
        height: 2.5rem;
        border: none;
        border-radius: 10px;
        background: rgba(233,216,166,.15);
        color: var(--creme-suave);
        font-size: 1.2rem;
        cursor: pointer;
        margin-left: .15rem;
    }

    .dc-nav-drawer {
        display: none;
        flex-direction: column;
        gap: .85rem;
        width: 100%;
        flex-basis: 100%;
        order: 4;
        padding-top: .65rem;
        margin-top: .5rem;
        border-top: 1px solid rgba(233,216,166,.15);
    }

    .dc-nav-drawer.is-open {
        display: flex;
    }

    .dc-topbar:has(.dc-nav-drawer.is-open) {
        height: auto;
        min-height: var(--topbar-height);
        padding-bottom: .65rem;
    }

    .dc-menu-toggle:hover,
    .dc-menu-toggle[aria-expanded="true"] {
        background: rgba(10,147,150,.35);
        color: #fff;
    }

    .dc-drawer-label {
        display: block;
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: rgba(233,216,166,.75);
        margin-bottom: .35rem;
    }

    .dc-filter,
    .dc-search {
        width: 100%;
        margin-right: 0;
    }

    .dc-nav-drawer .dc-search-field {
        width: 100%;
    }

    .dc-nav-drawer .dc-search input {
        width: 100%;
        max-width: 100%;
    }

    .dc-select {
        width: 100%;
        font-size: .875rem;
        min-height: 44px;
        line-height: 1.3;
        padding: .65rem 2.5rem .65rem .85rem;
        background-color: rgba(233,216,166,.12);
        background-position: right .85rem center;
        background-size: 12px 7px;
        border-radius: 10px;
        border: 1px solid rgba(233,216,166,.25);
    }

    .dc-search-field {
        width: 100%;
    }

    .dc-search input {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
        min-height: 44px;
        padding: .65rem 2.75rem .65rem .85rem;
        background: rgba(233,216,166,.92);
        border-radius: 10px;
    }

    .dc-search-icon {
        right: .85rem;
        font-size: 1rem;
    }

    .dc-auth .guest-only .dc-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dc-auth {
        width: 100%;
    }

    .dc-auth-desktop {
        display: none !important;
    }

    .dc-mobile-auth-links:not(.d-none) {
        display: flex;
        flex-direction: column;
        gap: .35rem;
    }

    .dc-drawer-user {
        color: var(--creme-suave);
        font-weight: 700;
        margin: 0 0 .35rem;
        font-size: .9rem;
    }

    .dc-drawer-link {
        display: flex;
        align-items: center;
        padding: .55rem .65rem;
        border-radius: 10px;
        color: var(--creme-suave);
        text-decoration: none;
        font-weight: 600;
        font-size: .875rem;
        transition: background .2s;
    }

    .dc-drawer-link:hover {
        background: rgba(10,147,150,.25);
        color: #fff;
    }

    .dc-drawer-link-danger {
        color: #ffb4a8;
    }

    .dc-btn.dc-btn-outline {
        min-height: 44px;
        padding: .55rem 1rem;
    }

    .dc-brand {
        padding-right: 0;
        margin-right: 0;
        border-right: none;
    }

    .dc-brand-logo {
        height: 1.5rem;
    }

    .dc-month-label {
        font-size: .82rem;
        min-width: auto;
        white-space: nowrap;
    }

    .dc-month-labels {
        flex-direction: row;
        align-items: baseline;
        gap: .3rem;
    }

    .dc-year-label {
        display: inline;
        font-size: .72rem;
    }

    .dc-arrow {
        min-width: 2rem;
        min-height: 2rem;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .95rem;
    }

    .calendar-container {
        margin: 0 .5rem 1rem;
        padding: .75rem .5rem 1rem;
        border-radius: 12px;
        min-height: auto;
    }

    .calendar-header {
        font-size: .72rem;
        padding: .35rem 0;
    }

    .day-name-full  { display: none; }
    .day-name-short { display: inline; }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day {
        min-height: 52px;
        padding: .2rem;
        border-radius: 6px;
        aspect-ratio: 1;
    }

    .day-number {
        font-size: .78rem;
        margin-bottom: 0;
        text-align: center;
        display: block;
    }

    .calendar-day .event-card {
        display: block;
        padding: .12rem .25rem;
        margin-bottom: .12rem;
    }

    .calendar-day .event-card .event-group,
    .calendar-day .event-card .event-time {
        display: none;
    }

    .calendar-day .event-card .event-title {
        font-size: .55rem;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .day-events-meta {
        display: none;
    }

    .day-event-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 16px;
        height: 16px;
        padding: 0 .25rem;
        border-radius: 999px;
        background: var(--verde-agua-escuro);
        color: #fff;
        font-size: .58rem;
        font-weight: 700;
        line-height: 1;
    }

    .calendar-day.today .day-event-count {
        background: var(--ciano-escuro);
    }

    .week-scroll {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .week-time-rail {
        display: none;
        padding-top: 0;
    }

    .week-columns {
        display: flex;
        flex-direction: column;
        gap: .85rem;
    }

    .week-day-column {
        border-right: none;
    }

    .week-day-header {
        text-align: left;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: .5rem;
        min-height: auto;
        padding: .65rem .75rem;
        background: rgba(148,210,189,.15);
        border-radius: 8px 8px 0 0;
        border-bottom: none;
    }

    .week-day-header .day-name {
        display: inline;
        font-size: .75rem;
    }

    .week-day-header .day-number {
        width: 28px;
        height: 28px;
        font-size: .95rem;
    }

    .week-day-body.week-time-grid {
        height: auto !important;
        min-height: 120px;
        border: 1px solid rgba(148,210,189,.3);
        border-radius: 0 0 8px 8px;
        padding: .5rem .65rem .75rem;
    }

    .week-hour-slot {
        display: none;
    }

    .week-event-card {
        position: static;
        height: auto !important;
        margin-bottom: .35rem;
    }

    .day-view-header h4 {
        font-size: .95rem;
    }

    .day-time-slot {
        flex-direction: column;
        gap: .35rem;
    }

    .time-label {
        width: auto;
        text-align: left;
    }

    .floating-buttons {
        padding: .85rem .85rem calc(.85rem + env(safe-area-inset-bottom, 0px));
    }

    .btn-view-pill {
        padding: 10px 14px;
    }

    .btn-fab {
        width: 54px;
        height: 54px;
    }

    .toast-container {
        top: auto;
        bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
        left: .75rem;
        right: .75rem;
    }

    /* Modais: abaixo da navbar, acima dos FABs, roláveis — sem “bottom sheet” cortado */
    .modal.show {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center;
        padding: calc(var(--topbar-height) + var(--topbar-v-offset) * 2 + env(safe-area-inset-top, 0px))
            0.5rem
            calc(5.25rem + env(safe-area-inset-bottom, 0px));
    }

    .modal-dialog {
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        max-height: none;
    }

    .modal-dialog-centered {
        display: flex;
        align-items: stretch;
        min-height: 0;
        height: auto;
    }

    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: 100%;
    }

    .modal-content {
        border-radius: 14px;
        max-height: calc(
            100dvh - var(--topbar-height) - var(--topbar-v-offset) * 2
            - 5.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
        );
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .modal-header,
    .modal-footer {
        flex-shrink: 0;
    }

    .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem 1.1rem;
    }

    .modal-body .form-control,
    .modal-body .form-select,
    .modal-body textarea.form-control {
        font-size: 16px;
        min-height: 44px;
    }

    .modal-body .btn {
        min-height: 44px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .dc-month-label {
        font-size: .85rem;
    }

    .calendar-day {
        min-height: 44px;
    }

    .day-number {
        font-size: .7rem;
    }
}

/* Desktop: escala visual ~150% do navegador (sem depender de zoom do usuário) */
@media (min-width: 768px) {
    html {
        font-size: 150%;
    }

    .dc-topbar-inner {
        flex-wrap: nowrap;
    }

    .dc-brand {
        order: 1;
    }

    .dc-filter {
        order: 2;
    }

    .dc-month-nav {
        order: 3;
        flex: 1;
    }

    .dc-search {
        order: 4;
    }

    .dc-topbar .dc-search input {
        width: 10.625rem;
    }

    .dc-topbar .dc-search input:focus {
        width: 13.75rem;
    }

    .dc-auth {
        order: 5;
    }
}


/* Dropdown menus */
.dropdown-menu {
    border: 1px solid var(--verde-agua-claro);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,18,25,.15);
}

/* Tab navigation in modals */
.nav-tabs .nav-link {
    color: var(--ciano-escuro);
    font-weight: 600;
}

.nav-tabs .nav-link.active {
    color: var(--preto-profundo);
    border-color: var(--verde-agua-escuro) var(--verde-agua-escuro) #fff;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Check-in panel */
.checkin-user-list {
    max-height: 320px;
    overflow-y: auto;
}

#checkinQrReader {
    min-height: 260px;
}

#checkinQrReader video {
    border-radius: 8px;
}

/* --- PATOS credit --- */
.dc-patos-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.dc-patos-credit-text {
    font-family: var(--font-accent);
    font-size: .8rem;
    font-weight: 600;
    color: var(--ciano-escuro);
    letter-spacing: .02em;
}

.dc-patos-credit-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    display: block;
}

.dc-patos-credit--page {
    display: none;
}

.dc-patos-credit--modal {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 210, 189, .3);
}

/* Desktop: crédito PATOS no canto inferior direito */
@media (min-width: 768px) {
    .dc-patos-credit--page {
        display: flex;
        position: fixed;
        right: 1.25rem;
        bottom: 1rem;
        left: auto;
        z-index: 15;
        padding: 0;
        margin: 0;
        pointer-events: none;
        justify-content: flex-end;
        gap: .45rem;
    }

    .dc-patos-credit--page .dc-patos-credit-text {
        display: none;
    }

    .dc-patos-credit--page .dc-patos-credit-logo {
        height: 1.875rem;
        pointer-events: auto;
    }

    .calendar-container {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - var(--topbar-height) - var(--topbar-v-offset) * 2 - 52px);
        margin-bottom: 2rem;
    }

    .calendar-container .calendar-grid {
        flex: 1;
        min-height: 0;
        grid-auto-rows: minmax(4.5rem, 1fr);
    }

    .calendar-container:has(.week-view),
    .calendar-container:has(.day-view) {
        min-height: calc(100vh - var(--topbar-height) - var(--topbar-v-offset) * 2 - 52px);
    }
}

/* Print styles */
@media print {
    .dc-topbar,
    .floating-buttons,
    .modal-backdrop,
    .dc-patos-credit { display: none !important; }
    body { padding-top: 0 !important; }
}
