/* ===================================================
   Gestor de Tarefas — Folha de estilos global
   Paleta: #27374D | #526D82 | #96A9B7 | #DDE6ED | #1B8FC8
   =================================================== */

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #DDE6ED;
}

/* ===================== SIDEBAR ===================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background-color: #27374D;
    display: flex;
    flex-direction: column;
    z-index: 200;
    box-shadow: 3px 0 12px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    padding: 16px 20px 14px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-logo-img {
    width: 160px;
    max-width: 100%;
    border-radius: 6px;
}

.sidebar-logo-text {
    font-size: 17px;
    font-weight: 700;
    color: #DDE6ED;
    letter-spacing: 0.3px;
    margin: 0;
}

.sidebar-logo-sub {
    font-size: 10.5px;
    color: #96A9B7;
    margin: 2px 0 0;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid #526D82;
    margin: 0 16px;
    opacity: 0.4;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 10px;
    flex: 1;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    color: #96A9B7;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    border-left: 3px solid transparent;
    text-decoration: none !important;
}

.sidebar-item:hover {
    background-color: rgba(82, 109, 130, 0.35);
    color: #DDE6ED;
}

.sidebar-item-active {
    background-color: rgba(27, 143, 200, 0.14);
    color: #B1DDFF !important;
    border-left: 3px solid #1B8FC8;
}

.sidebar-item-active:hover {
    background-color: rgba(27, 143, 200, 0.22);
    color: #B1DDFF !important;
}

.sidebar-footer {
    padding: 0 10px 16px;
    flex-shrink: 0;
}

.sidebar-user-row {
    display: flex;
    align-items: center;
    color: #96A9B7;
    font-size: 12.5px;
    padding: 8px 14px 10px;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 14px;
    margin-bottom: 6px;
    background-color: transparent;
    border: 1px solid #526D82;
    border-radius: 8px;
    color: #96A9B7;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
}

.sidebar-refresh-btn:hover {
    background-color: #1B8FC8;
    border-color: #1B8FC8;
    color: #fff;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 14px;
    background-color: transparent;
    border: 1px solid #526D82;
    border-radius: 8px;
    color: #96A9B7;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
}

.sidebar-logout-btn:hover {
    background-color: #A64B4C;
    border-color: #A64B4C;
    color: #fff;
}

/* ===================== SIDEBAR DROPDOWN (dark theme) ===================== */

.sidebar-unidade-dropdown .Select-control {
    background: #1e2d3d !important;
    border: 1px solid #526D82 !important;
    border-radius: 6px !important;
    min-height: 30px !important;
    color: #DDE6ED !important;
}
.sidebar-unidade-dropdown .Select-value-label,
.sidebar-unidade-dropdown .Select-placeholder {
    color: #96A9B7 !important;
    font-size: 12px !important;
}
.sidebar-unidade-dropdown .Select-menu-outer {
    background: #1e2d3d !important;
    border: 1px solid #526D82 !important;
    z-index: 9999 !important;
}
.sidebar-unidade-dropdown .Select-option {
    background: #1e2d3d !important;
    color: #DDE6ED !important;
    font-size: 12px !important;
}
.sidebar-unidade-dropdown .Select-option.is-focused {
    background: rgba(27, 143, 200, 0.18) !important;
}
.sidebar-unidade-dropdown .Select-option.is-selected {
    background: rgba(27, 143, 200, 0.28) !important;
}
.sidebar-unidade-dropdown .Select-arrow { border-top-color: #96A9B7 !important; }

/* ===================== MAIN CONTENT ===================== */

.main-content {
    margin-left: 220px;
    min-height: 100vh;
    background-color: #DDE6ED;
    padding: 28px 32px;
}

.page-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #96A9B7;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #27374D;
    margin: 0 0 4px;
}

.page-subtitle {
    font-size: 13px;
    color: #526D82;
    margin: 0;
}

/* ===================== FILTER CARD ===================== */

.filter-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(39, 55, 77, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #526D82;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 2px;
}

/* Date picker overrides */
.SingleDatePickerInput {
    border: none !important;
    background: transparent !important;
}
.DateInput {
    background: transparent !important;
}
.DateInput_input {
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-size: 13px !important;
    color: #27374D !important;
    border: 1.5px solid #DDE6ED !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    background: #fff !important;
    line-height: 1 !important;
    width: 120px !important;
}
.DateInput_input:focus, .DateInput_input__focused {
    border-color: #1B8FC8 !important;
    box-shadow: 0 0 0 3px rgba(27, 143, 200, 0.12) !important;
}
.CalendarDay__selected, .CalendarDay__selected:hover {
    background: #1B8FC8 !important;
    border-color: #1B8FC8 !important;
}
.CalendarDay__today { font-weight: 700; }
.DayPickerNavigation_button { border-color: #DDE6ED !important; }

/* Dropdown overrides (filter area) */
.filter-dropdown .Select-control {
    border: 1.5px solid #DDE6ED !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    min-height: 36px !important;
}
.filter-dropdown .Select-control:hover {
    border-color: #1B8FC8 !important;
}

/* ===================== CARDS BI / KPI ===================== */

.bi-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1.5px solid #e0e7ef;
    box-shadow: 0 2px 8px rgba(39, 55, 77, 0.08);
    margin-bottom: 16px;
    height: 100%;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.bi-card:hover {
    border-color: #c8d6df;
    box-shadow: 0 4px 14px rgba(39, 55, 77, 0.13);
}

.bi-card-title {
    font-size: 11px;
    font-weight: 600;
    color: #526D82;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bi-card-value {
    font-size: 20px;
    font-weight: 700;
    color: #27374D;
    margin: 0;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bi-card-sub {
    font-size: 12px;
    color: #96A9B7;
    margin: 4px 0 0;
}

/* ===================== ACCORDION ===================== */

.accordion-button {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #27374D !important;
    background-color: #fff !important;
    padding: 12px 16px !important;
}

.accordion-button:not(.collapsed) {
    color: #1B8FC8 !important;
    background-color: #f4faff !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(27, 143, 200, 0.12) !important;
}

.accordion-button::after {
    filter: none !important;
}

.accordion-item {
    border: 1px solid #e8edf0 !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
    overflow: hidden;
}

.accordion-body {
    padding: 16px 20px !important;
    background: #fafbfc;
}

/* ===================== TABS ===================== */

.nav-tabs {
    border-bottom: 2px solid #e8edf0 !important;
    margin-bottom: 16px;
}

.nav-tabs .nav-link {
    font-size: 13px !important;
    color: #526D82 !important;
    border: none !important;
    border-radius: 6px 6px 0 0 !important;
    padding: 8px 16px !important;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-tabs .nav-link:hover {
    color: #27374D !important;
    background: #f0f4f8;
}

.nav-tabs .nav-link.active {
    color: #1B8FC8 !important;
    background: #fff !important;
    border-bottom: 2px solid #1B8FC8 !important;
    font-weight: 600;
    margin-bottom: -2px;
}

/* ===================== LOGIN ===================== */

.login-page {
    min-height: 100vh;
    background: linear-gradient(145deg, #27374D 0%, #526D82 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 44px 40px 36px;
    width: 400px;
    max-width: 95vw;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.login-logo-wrap {
    text-align: center;
    margin-bottom: 28px;
}

.login-title {
    font-size: 19px;
    font-weight: 700;
    color: #27374D;
    text-align: center;
    margin: 0 0 4px;
}

.login-subtitle {
    font-size: 13px;
    color: #526D82;
    text-align: center;
    margin: 0 0 28px;
}

.login-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #27374D;
    margin-bottom: 5px;
}

.login-input {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #DDE6ED;
    border-radius: 8px;
    font-size: 14px;
    color: #27374D;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 16px;
}

.login-input:focus {
    border-color: #1B8FC8;
    box-shadow: 0 0 0 3px rgba(27, 143, 200, 0.12);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #1B8FC8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: background-color 0.18s;
    letter-spacing: 0.3px;
}

.login-btn:hover { background-color: #27374D; }
.login-btn:disabled { opacity: 0.65; cursor: not-allowed; }

.login-error {
    color: #A64B4C;
    font-size: 13px;
    text-align: center;
    min-height: 20px;
    margin-top: 10px;
}

/* ===================== PLACEHOLDER ===================== */

.placeholder-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    gap: 12px;
    color: #526D82;
}

.placeholder-icon-lg {
    font-size: 60px;
    color: #96A9B7;
    line-height: 1;
}

.placeholder-label {
    font-size: 15px;
    color: #526D82;
    margin: 0;
}

/* ===================== MODAL ===================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px 24px;
    width: 400px;
    max-width: 95vw;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.25);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #96A9B7;
    font-size: 15px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.modal-close-btn:hover {
    background: #f0f0f0;
    color: #27374D;
}

/* ===================== UTILITÁRIOS ===================== */

.section-divider {
    border: none;
    border-top: 1px solid #e8edf0;
    margin: 20px 0;
}

.tag-ok    { color: #27B6A5; font-weight: 600; }
.tag-alert { color: #A64B4C; font-weight: 600; }
.tag-warn  { color: #D4A843; font-weight: 600; }

/* ===================== SNOOZE TABLE ===================== */

.snooze-adiar-btn {
    background-color: transparent;
    border: 1px solid #D4A843;
    color: #D4A843;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.snooze-adiar-btn:hover {
    background-color: #D4A843;
    color: #fff;
}

.desadiar-btn {
    background-color: transparent;
    border: 1px solid #A64B4C;
    color: #A64B4C;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.desadiar-btn:hover {
    background-color: #A64B4C;
    color: #fff;
}

.btn-ver-adiados {
    background-color: transparent;
    border: 1px solid #526D82;
    color: #526D82;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    margin-left: auto;
}

.btn-ver-adiados:hover:not(:disabled) {
    background-color: #526D82;
    color: #fff;
}

.btn-ver-adiados:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.snooze-bar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fffbf0;
    border: 1px solid #D4A843;
    border-radius: 8px;
    padding: 10px 16px;
    width: 100%;
    flex-wrap: wrap;
}

.batch-bar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f7ff;
    border: 1px solid #1B8FC8;
    border-radius: 8px;
    padding: 10px 16px;
    width: 100%;
    flex-wrap: wrap;
}

.desadiar-batch-bar-inner {
    background: #fff5f5;
    border-color: #A64B4C;
}

.motivo-inline-input {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    color: #27374D !important;
    padding: 3px 6px !important;
    width: 100%;
    transition: border-color 0.15s;
}

.motivo-inline-input:hover {
    border-color: #96A9B7 !important;
}

.motivo-inline-input:focus {
    border-color: #1B8FC8 !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: none !important;
}

.select-all-btn {
    background-color: transparent;
    border: 1px solid #96A9B7;
    color: #DDE6ED;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
}

.select-all-btn:hover {
    background-color: rgba(255,255,255,0.2);
    border-color: #DDE6ED;
}

/* ===================== TASK CARDS (Painel) ===================== */

.task-card[style*="pointer"] {
    transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}

.task-card[style*="pointer"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(39, 55, 77, 0.16) !important;
    border-color: #1B8FC8 !important;
}
