.dashboard-wrapper {
    --dashboard-muted: #9aa4b2;
    --dashboard-card-radius: 12px;
    --dashboard-shadow: 0 6px 18px rgba(14, 30, 37, 0.06);
    --dashboard-max-width: 1300px;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.dashboard-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
}

.content-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    height: 100vh;
    max-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--navy-blue) 0%, #1a365d 100%);
    color: var(--white);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar-header {
    flex-shrink: 0;
    padding: 18px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header .logo {
    width: 100%;
    height: 72px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header .logo img {
    max-width: 180px;
    max-height: 72px;
    object-fit: contain;
    display: block;
}

.company-title h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
}

.subtitle {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.sidebar-menu {
    flex: 1 1 auto;
    min-height: 0;
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(62, 132, 242, 0.55) rgba(255, 255, 255, 0.06);
}

.sidebar-menu::-webkit-scrollbar {
    width: 8px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    margin: 6px 0;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(62, 132, 242, 0.55), rgba(62, 132, 242, 0.35));
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(62, 132, 242, 0.85), rgba(62, 132, 242, 0.55));
    background-clip: padding-box;
    border: 2px solid transparent;
}

.sidebar-menu li {
    margin: 0.125rem 1rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 12px;
    position: relative;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--light-blue);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateX(4px);
}

.sidebar-menu li.active a {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(62, 132, 242, 0.3);
}

.sidebar-menu li.active a::before {
    transform: scaleY(1);
}

.sidebar-menu .menu-maintenance-icon {
    margin-left: auto;
    color: #fbbf24;
    flex-shrink: 0;
    opacity: 0.9;
}

.sidebar-menu li.is-maintenance a {
    opacity: 0.85;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--white);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    padding: 28px;
    background: var(--background-gray);
}

.dashboard-footer {
    flex-shrink: 0;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--dashboard-muted);
    background: var(--background-gray);
    border-top: 1px solid var(--border-gray);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-footer .dev-signature {
    font-size: 0.85rem;
    color: var(--dashboard-muted);
    font-style: italic;
    text-align: center;
}

.dashboard-footer .dev-signature a {
    color: inherit;
    text-decoration: none;
}

.dashboard-footer .dev-signature a:hover {
    text-decoration: underline;
    text-decoration-color: var(--light-blue);
}

.dashboard-footer .dev-signature span {
    font-weight: bold;
    letter-spacing: 0.5px;
    text-underline-offset: 2px;
    color: var(--light-blue);
}

.main-header {
    text-align: center;
    margin-bottom: 3rem;
}

.main-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin: 0 0 1rem;
    background: linear-gradient(135deg, var(--navy-blue), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-header p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.meta-actions {
    white-space: nowrap;
    color: var(--dashboard-muted);
    font-size: 0.95rem;
}

.welcome-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    width: 100%;
    max-width: var(--dashboard-max-width);
    margin: 0 auto;
}

.welcome-card {
    position: relative;
    overflow: hidden;
    background: var(--white);
    border-radius: var(--dashboard-card-radius);
    padding: 20px;
    box-shadow: var(--dashboard-shadow);
    border: 1px solid var(--border-gray);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.welcome-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(14, 30, 37, 0.08);
}

.welcome-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
}

.welcome-card h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: var(--text-dark);
}

.welcome-card p {
    margin: 0 0 14px;
    color: var(--text-light);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    box-shadow: 0 6px 18px rgba(62, 132, 242, 0.18);
    color: var(--white);
    font-weight: 700;
}

.card-link {
    color: var(--light-blue);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    transition: transform 0.16s ease;
}

.card-link:hover {
    transform: translateX(4px);
}

.content-section {
    display: block;
    width: 100%;
    max-width: var(--dashboard-max-width);
    margin: 0 auto 18px;
}

.content-section[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .main-content {
        padding: 20px;
    }

    .main-header h2 {
        font-size: 1.5rem;
    }

    .main-header p {
        font-size: 1rem;
    }

    .company-title h3 {
        font-size: 0.95rem;
    }

    .sidebar {
        width: 240px;
        min-width: 240px;
        max-width: 240px;
    }

    .sidebar-footer {
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-menu .menu-maintenance-icon {
    margin-left: auto;
    color: #d97706;
    flex-shrink: 0;
    opacity: 0.85;
}
.sidebar-menu li.is-maintenance a {
    opacity: 0.85;
}

.wip-page {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
            radial-gradient(circle at top left, rgba(62, 132, 242, 0.12), transparent 32rem),
            linear-gradient(180deg, var(--surface-2), var(--background-gray));
}

.wip-card {
    width: min(100%, 560px);
    padding: 2.25rem;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 45px rgba(10, 34, 64, 0.12);
    text-align: center;
}

.wip-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 1.25rem;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    box-shadow: 0 12px 28px rgba(62, 132, 242, 0.28);
}

.wip-icon span {
    width: 32px;
    height: 32px;
    border: 4px solid rgba(255, 255, 255, 0.95);
    border-top-color: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.wip-eyebrow {
    margin: 0 0 0.65rem;
    color: var(--light-blue);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.wip-card h1 {
    margin: 0 0 0.85rem;
    color: var(--navy-blue);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.wip-text {
    max-width: 440px;
    margin: 0 auto;
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
}

.wip-note {
    max-width: 420px;
    margin: 1rem auto 0;
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.5;
}

@media (max-width: 520px) {
    .wip-page {
        padding: 1.25rem;
    }

    .wip-card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .wip-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }
}
/* App-wide toast notifications. Top-right stacked container. */

.app-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    color: #fff;
    background: #1f2937;
    box-shadow: 0 14px 32px rgba(2, 8, 23, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-left: 4px solid rgba(255, 255, 255, 0.4);
    font-size: 0.92rem;
    line-height: 1.35;
    animation: appToastIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

.app-toast--leaving {
    animation: appToastOut 0.22s ease-in forwards;
}

.app-toast__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0.95;
    margin-top: 1px;
}

.app-toast__body {
    flex: 1;
    min-width: 0;
}

.app-toast__title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.app-toast__message {
    color: rgba(255, 255, 255, 0.92);
    word-wrap: break-word;
}

.app-toast__close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.app-toast__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.app-toast--success {
    background: linear-gradient(135deg, #10b981, #059669);
    border-left-color: #047857;
}

.app-toast--error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-left-color: #b91c1c;
}

.app-toast--warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-left-color: #b45309;
}

.app-toast--info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-left-color: #1d4ed8;
}

@keyframes appToastIn {
    from {
        opacity: 0;
        transform: translateX(110%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes appToastOut {
    to {
        opacity: 0;
        transform: translateX(110%);
    }
}

@media (max-width: 540px) {
    .app-toast-container {
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
}

/* Container Principal */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--background-gray);
    min-height: 100vh;
}

/* Cabeçalho da Página */
.container h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--navy-blue), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.container h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 2px;
}

/* Descrição */
.container p {
    font-size: 1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Card Container para o Formulário */
.form-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-gray);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

/* Estilo do formulário */
form {
    display: grid;
    gap: 1.5rem;
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inputs e Selects */
.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CORREÇÃO: Select com seta customizada (PROBLEMA DAS SETAS RESOLVIDO) */
.input-group select {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-right: 3rem; /* Espaço para a seta */
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27m6 8 4 4 4-4%27/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(62, 132, 242, 0.1);
    transform: translateY(-2px);
}

.input-group input:hover,
.input-group select:hover,
.input-group textarea:hover {
    border-color: #c0c7d1;
}

/* Select com foco - muda cor da seta */
.input-group select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%233E84F2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27m6 8 4 4 4-4%27/%3e%3c/svg%3e");
}

/* Textarea específico */
textarea {
    resize: vertical;
    min-height: 80px;
    font-family: var(--font-family);
}

/* Input de arquivo */
input[type="file"] {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px dashed var(--border-gray);
    cursor: pointer;
    position: relative;
}

input[type="file"]:hover {
    border-color: var(--light-blue);
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

input[type="file"]:focus {
    border-color: var(--light-blue);
    border-style: solid;
}

/* Grid responsivo para campos relacionados */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Botão de Submit */
.btn {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 160px;
    justify-self: center;
    margin-top: 1rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover {
    background: linear-gradient(135deg, #d97706, #ea580c);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

/* Loading state para o botão */
.btn.loading {
    background: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Estados de validação */
.input-group.error input,
.input-group.error select,
.input-group.error textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group.success input,
.input-group.success select,
.input-group.success textarea {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .container h2 {
        font-size: 1.75rem;
    }

    .btn {
        width: 100%;
        justify-self: stretch;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .input-group input,
    .input-group select,
    .input-group textarea {
        padding: 0.875rem 1rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
    }
}

/* Animações de entrada */
.form-card {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus indicators para acessibilidade */
.input-group input:focus-visible,
.input-group select:focus-visible,
.input-group textarea:focus-visible {
    outline: 2px solid var(--light-blue);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Estilos específicos para tipos de pedidos */
.tipo-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tipo-ferias {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tipo-baixa {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.tipo-licenca {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.tipo-pessoal {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Page layout */
.controlo-page {
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
}

.controlo-header {
    background: white;
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.page-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(62, 132, 242, 0.25);
}

.header-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.header-text p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
}

/* Primary button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(62, 132, 242, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(62, 132, 242, 0.4);
}

.controlo-content {
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards */
.controlo-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.controlo-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.controlo-card-header h3,
.controlo-modal-header h3 { /* reused for modal header */
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy-blue);
    margin: 0;
}

.controlo-card-header p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.controlo-card-body {
    padding: 1.5rem 2rem;
    flex: 1;
}

/* Grid for permissions + hierarchy */
.controlo-grid {
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 1.5rem;
}

/* Form controls */
.field-select,
.field-input { /* shared base for selects + modal inputs */
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    font-family: inherit;
    background: #ffffff;
}

.helper-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted-color);
}

/* Permissions list */
.perm-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.perm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.perm-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.perm-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.perm-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

.empty-state {
    font-size: 0.9rem;
    color: var(--muted-color);
}

/* Chip (permission toggle) */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    background: transparent;
    cursor: pointer;
}

.chip-off .chip-track {
    background: #e5e7eb;
    box-shadow: inset 0 0 0 1px #d1d5db;
}

.chip-on .chip-track {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.chip-track {
    position: relative;
    width: 38px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chip-off .chip-icon svg {
    stroke: #9ca3af;
    filter: none;
}

.chip-on .chip-icon svg {
    stroke: #ecfdf5;
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.85));
}

/* Hierarchy */
/* Destacar o colaborador selecionado */
.hierarchy-item--current {
    border-color: var(--gradient-1);
    box-shadow:
            0 0 0 1px rgba(59, 130, 246, 0.25),
            0 10px 20px rgba(15, 23, 42, 0.12);
}

.hierarchy-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.4rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    margin-top: 0.4rem;
}

.hierarchy-item:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06); /* transparent red */
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.4);
    transform: translateY(-1px);
}

.hierarchy-item--current:hover {
    border-color: var(--gradient-1);
    background: #ffffff;
    box-shadow:
            0 0 0 1px rgba(59, 130, 246, 0.25),
            0 10px 20px rgba(15, 23, 42, 0.12);
    transform: none;
}

/* Ícone de remoção (hidden por default) */
.hier-remove-icon {
    position: absolute;
    inset: 0;                     /* fill the avatar wrapper */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.0);
    opacity: 0;
    pointer-events: none;
    transition:
            opacity 0.15s ease,
            transform 0.15s ease,
            background 0.15s ease;
}

.hier-remove-icon svg {
    width: 16px;
    height: 16px;
    stroke: #b91c1c; /* vermelho escuro */
}

.hierarchy-item:hover .hier-remove-icon {
    opacity: 1;
    background: rgba(248, 250, 252, 0.9);
    transform: scale(1.02);
}

/* Tooltip */
.hier-tooltip {
    position: absolute;
    top: 50%;
    right: 0;               /* anchor inside the card */
    left: auto;
    margin-left: 0;
    transform: translateY(-50%);
    background: #111827;
    color: #f9fafb;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: normal;    /* allow wrapping */
    max-width: calc(100% - 2.5rem);
    text-align: right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 9999;
}

.hier-tooltip::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    left: auto;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #111827 transparent transparent;
}

.hierarchy-item:hover .hier-tooltip {
    opacity: 1;
}

.avatar-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* Avatar circle */
.avatar-small {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hierarchy-text .h-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.hierarchy-text .h-sub {
    font-size: 0.8rem;
    color: var(--text-light);
}


/* Modal */
.controlo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.controlo-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.controlo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    color: #111827;
    transition: background 0.15s ease, transform 0.15s ease;
}

.modal-close-btn:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

/* Modal body */
.controlo-modal-body {
    padding: 1.5rem 1.75rem 1.25rem;
    overflow-y: auto;
}

/* Modal grid for fields */
.controlo-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem 1.25rem;
}

/* Modal footer */
.controlo-modal-footer {
    padding: 1rem 1.75rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* --------- Pré-visualização de hierarquia (card body) --------- */
.controlo-card-body--hierarchy {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Preview */
.hier-preview {
    width: 100%;
    flex: 1 1 auto;
    margin-top: 0.25rem;
    border-radius: 14px;
    border: 1px dashed #cbd5f5;
    background: #f9fafb;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    cursor: pointer;
}

.hier-preview:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.hier-preview:not(:disabled):hover {
    border-color: var(--gradient-1);
    background: #eef2ff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.hier-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.hier-preview-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.hier-preview-meta {
    margin-top: 0.1rem;
    font-size: 0.8rem;
    color: var(--muted-color);
}

.hier-preview-cta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--gradient-1);
    font-weight: 500;
    white-space: nowrap;
}

.hier-preview-cta svg {
    width: 14px;
    height: 14px;
}

.hier-preview-canvas {
    position: relative;
    border-radius: 10px;
    background: #ffffff;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    padding: 0.6rem 0.75rem;
    min-height: 80px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;            /* everything inside is cut by the borders */
    cursor: grab;
}

.hier-preview-canvas::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    background-image:
            repeating-linear-gradient(
                    to right,
                    rgba(148, 163, 184, 0.18) 0,
                    rgba(148, 163, 184, 0.18) 1px,
                    transparent 1px,
                    transparent 40px
            ),
            repeating-linear-gradient(
                    to bottom,
                    rgba(148, 163, 184, 0.18) 0,
                    rgba(148, 163, 184, 0.18) 1px,
                    transparent 1px,
                    transparent 40px
            );
    background-size: 40px 40px;
}

.hier-preview-canvas.is-dragging {
    cursor: grabbing;
}

/* no internal element is clickable */
.hier-preview-canvas * {
    pointer-events: none;
}

.hier-preview-diagram {
    margin-top: 0.5rem;
    display: inline-block;
    position: relative;
    z-index: 1;          /* above the canvas bg */
    will-change: transform; /* optimize for smoother dragging */
}

.hier-preview-diagram-inner {
    display: inline-block;
    padding: 1.25rem 1.75rem;
    transform: scale(0.85);
    transform-origin: top center;
    border-radius: 12px;
}

.hierarchy-item--more {
    justify-content: center;
    text-align: center;
}

.hierarchy-item--more .h-sub {
    display: none;
}

.hier-preview-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.6rem;
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    z-index: 2;
}

/* Big diagram (scroll + drag) */

.hier-diagram-container {
    margin-top: 0.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    overflow: auto;
    max-height: min(70vh, 540px);
}

.hier-diagram-inner {
    position: relative;
    min-width: 1000px;
    min-height: 420px;
    padding: 1.75rem 2.25rem;
    background-image:
            linear-gradient(to right, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 40px 40px;
    cursor: grab;
}

.hier-diagram-inner:active {
    cursor: grabbing;
}

.hier-diagram-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

.hier-diagram-row + .hier-diagram-row {
    margin-top: 3.5rem;
}

.hier-diagram-row--center {
    position: relative;
}

.hier-diagram-row--center::before,
.hier-diagram-row--center::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: #cbd5f5;
}

/* Connects the top block to the center row */
.hier-diagram-row--center::before {
    top: calc(-1 * var(--hier-line-length));
    height: var(--hier-line-length);
}

/* Connects the bottom block to the center */
.hier-diagram-row--center::after {
    bottom: calc(-1 * var(--hier-line-length));
    height: var(--hier-line-length);
}

.hier-diagram-area {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem 0.9rem;
    border-radius: 14px;
    border: 2px solid #cbd5f5;
    background: rgba(248, 250, 252, 0.9);
}

.hier-diagram-area .hier-diagram-row-label {
    margin: 0;
}

.hier-diagram-area .hier-diagram-row-nodes {
    margin-top: 0.4rem;
}

/* Select for adding new hierarchy item panel */
.hier-add-overlay {
    position: absolute;
    inset: 0;
    z-index: 4100;
}

.hier-add-panel {
    position: absolute;
    min-width: 260px;
    max-width: 360px;
    background: #ffffff;
    border-radius: 14px;
    padding: 0.75rem 0.9rem 0.9rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    border: 1px solid #e5e7eb;
}

.hier-add-panel .field-label {
    margin-bottom: 0.35rem;
}

.hier-add-panel .hier-add-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

.hier-add-panel .hier-add-actions .btn-secondary {
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
}

.hier-add-select {
    width: 100%;
}

.hier-diagram-row-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-color);
}

.hier-diagram-row-nodes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hier-connector {
    flex: 0 0 18px;
    height: 2px;
    background: #cbd5f5;
    border-radius: 999px;
    margin: 0;
}

.hier-diagram-inner .hierarchy-item {
    margin-top: 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.5rem 0.45rem;
    min-height: var(--hier-card-height);
    min-width: 220px;
}

.hier-preview-diagram-inner .hierarchy-item {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .controlo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .controlo-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        text-align: center;
    }

    .controlo-content {
        padding: 1rem 1.5rem;
    }

    .controlo-card-header {
        padding: 1rem 1.5rem;
    }

    .controlo-card-body {
        padding: 1rem 1.5rem;
    }

    .controlo-modal {
        max-width: 100%;
        margin: 0 0.75rem;
    }

    .controlo-modal-header,
    .controlo-modal-body,
    .controlo-modal-footer {
        padding-inline: 1.25rem;
    }
}
.btn-generate-password {
    margin-top: 0.5rem;
    align-self: flex-start;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-wrapper .field-input {
    flex: 1;
    padding-right: 2.5rem;
}
.password-toggle-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.password-toggle-btn:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

/* --------- Modal do diagrama de hierarquia --------- */

.controlo-modal--wide {
    max-width: 1024px;
}

.hier-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hier-modal-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.hier-modal-footer {
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

.hier-modal-status {
    margin-right: auto;
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hier-modal-status--visible {
    opacity: 1;
}

.hier-modal-status--success {
    color: #15803d;
}

.hier-modal-status--error {
    color: #b91c1c;
}

.hier-modal-status--info {
    color: var(--text-light);
}

.ui-popover-dialog,
.ui-popover-dialog:modal {
    outline: none;
    border: none;
    overflow: visible;
    max-width: none;
    max-height: none;
    border-radius: 12px;
    overflow: clip;
    /* anchor positioning */
    position: fixed;
    inset: auto;
    position-anchor: --ui-popover-anchor;
    position-area: block-start center;
    transform: translateY(-8px);

    filter: drop-shadow(0 18px 60px rgba(0, 0, 0, 0.28));
}

.ui-popover-dialog:focus,
.ui-popover-dialog:focus-visible {
    outline: none;
}

.ui-popover-dialog::backdrop {
    background: transparent;
}

.ui-popover-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.ui-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.ui-modal-overlay--active {
    display: flex;
}

.ui-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.ui-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.ui-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.ui-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

.ui-modal-close:hover {
    color: var(--navy-blue);
}

.ui-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.ui-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.ui-modal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ui-modal-detail-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ui-modal-detail-field.full-width {
    grid-column: 1 / -1;
}

.ui-modal-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    font-weight: 600;
}

.ui-modal-detail-value {
    font-size: 0.95rem;
    color: #0f172a;
    word-break: break-word;
}

.ui-modal-body textarea {
    width: 100%;
    margin-top: 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
}

.ui-modal-body textarea:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(62, 132, 242, 0.1);
}

@media (max-width: 768px) {
    .ui-modal { width: 95%; }
    .ui-modal-detail-grid { grid-template-columns: 1fr; }
}

.horarios-page {
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
}

.horarios-header {
    background: #fff;
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.horarios-header .header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.horarios-header .page-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(62, 132, 242, 0.25);
    flex: 0 0 56px;
}

.horarios-header .header-text {
    min-width: 0;
}

.horarios-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin: 0 0 0.25rem;
    letter-spacing: -0.5px;
}

.horarios-desc {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.horarios-content {
    padding: 2rem 2.5rem;
    display: grid;
    gap: 2rem;
}

.horarios-page .horarios-outside {
    pointer-events: none;
    opacity: 0.35;
}

.horarios-page .calendar-section {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.horarios-page .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.horarios-page .section-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.horarios-page .section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex: 0 0 40px;
}

.horarios-page .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy-blue);
    margin: 0;
}

.horarios-page .calendar-legend {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.horarios-page .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.horarios-page .calendar-legend .legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex-shrink: 0;
}

.horarios-page .legend-dot.trabalho { background-color: #3788d8; }
.horarios-page .legend-dot.ferias { background-color: #10b981; }
.horarios-page .legend-dot.ausencia { background-color: #f59e0b; }

.horarios-page .calendar-container {
    padding: 2rem;
}

/* FullCalendar Customizations especially for */
.horarios-page .fc .fc-bg-event.legend-dot {
    opacity: 0.12;
}

.horarios-page .fc .horarios-outside {
    opacity: 0.35;
    pointer-events: none;
}

.horarios-page .fc .horarios-outside .fc-daygrid-day-number {
    visibility: hidden;
}


.horarios-page .fc .fc-daygrid-day.horarios-outside .fc-daygrid-day-number {
    visibility: hidden;
}

/* force the flex aligment for the day headers so badge keeps its height */
.horarios-page .fc .fc-daygrid-day-top {
    align-items: flex-start;
    gap: 0.35rem;
}

.horarios-page .fc .horarios-work-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    line-height: 1;
}


.horarios-page .fc .horarios-work-badge {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    margin-left: 0.35rem;
    white-space: nowrap;
}

.horarios-page .fc .fc-bg-event.legend-dot.is-draft {
    opacity: 0.05;
}

.horarios-work-badge.is-draft {
    opacity: 0.2;
}

#calendar {
    min-height: 400px;
}

@media (max-width: 900px) {
    .horarios-header {
        padding: 1.5rem;
    }

    .horarios-content {
        padding: 1.5rem;
    }

    .horarios-page .section-header {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .horarios-page .calendar-container {
        padding: 1.5rem;
    }
}

@media (max-width: 520px) {
    .horarios-header .header-left {
        gap: 1rem;
    }

    .horarios-header .page-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        flex-basis: 48px;
    }

    .horarios-title {
        font-size: 1.5rem;
    }
}
.horarios-popover .ui-popover-panel {
    width: 260px;
    border: 1px solid color-mix(in srgb, var(--navy-blue) 12%, transparent);
    border-radius: 12px;
    padding: 12px;
}

.horarios-day-form {
    display: grid;
    gap: 12px;
}
.gestao-page {
    padding: 2.5rem 1.5rem 2.5rem;
}

.gestao-header {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-bottom: 2rem;
}

.gestao-header-inner {
    max-width: 720px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.gestao-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--navy-blue), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gestao-desc {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0;
    line-height: 1.6;
}

.gestao-section {
    display: flex;
    justify-content: center;
    margin-top: 3.5rem;
}

.gestao-main {
    width: 100%;
    max-width: 1100px;
}

.gestao-shell {
    border: 2px solid var(--gradient-1);
    border-radius: 16px;
    background: transparent;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gestao-tabs {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem 0 1.5rem;
    background: transparent;
    border-bottom: none;
}

.gestao-tabs::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gradient-1);
    z-index: 0;
}

.gestao-tabs-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.6rem;
}

.gestao-tabs-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.gestao-tabs-nav-btn:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--navy-blue);
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.18);
    transform: translateY(-0.5px);
}

.gestao-tabs-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}

.gestao-tabs-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
    box-shadow: none;
    transform: none;
}

.gestao-tab {
    position: relative;
    border-radius: 0.75rem 0.75rem 0 0;
    border: 2px solid transparent;
    background: transparent;
    color: var(--text-light);
    padding: 0.35rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    margin-bottom: 0;
    z-index: 1;
    transition: color 0.18s ease, border-color 0.22s ease, background-color 0.22s ease, padding 0.22s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.gestao-tab:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.04);
}

.gestao-tab--active {
    border-color: var(--gradient-1);
    border-bottom-color: var(--white);
    background: var(--white);
    color: var(--navy-blue);
    padding: 0.45rem 1.8rem;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.15);
    z-index: 2;
}

.gestao-tab--active::after {
    content: '';
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 3px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    opacity: 0.95;
}

.gestao-content-card {
    margin-top: 0;
    background: var(--white);
    box-shadow: none;
    padding: 1.75rem 1.5rem;
    border: none;
}

.gestao-view {
    display: none;
    height: 100%;
}

.gestao-view--active {
    display: block;
}

.gestao-approvals-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gestao-approvals-list--hidden {
    display: none;
}

.gestao-approvals-header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.gestao-approvals-header p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.gestao-table-wrapper {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: var(--white);
    overflow: hidden;
}

.gestao-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.9rem;
}

.gestao-table thead {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(59, 130, 246, 0.12));
}

.gestao-table th,
.gestao-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.gestao-table th {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gestao-table tbody tr:last-child td {
    border-bottom: none;
}

.gestao-table tbody tr {
    transition: background-color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.gestao-table tbody tr:hover {
    background-color: #f9fafb;
    transform: translateY(-1px);
}

.gestao-collab-name {
    font-weight: 500;
    color: #0f172a;
}

.gestao-collab-email {
    font-size: 0.8rem;
    color: var(--text-light);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.status-badge--pending {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.4);
    color: #92400e;
}

.gestao-table-action {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--gradient-1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.gestao-table-action:hover {
    text-decoration: underline;
}

.gestao-approvals-empty {
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.gestao-allrecs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gestao-allrecs-list--hidden {
    display: none;
}

.gestao-allrecs-header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.gestao-allrecs-header p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.gestao-company-name {
    font-weight: 500;
    color: #0f172a;
}

.gestao-allrecs-empty {
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    display: none;
}

.gestao-record-view {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 260px;
    position: relative;
}

.gestao-record-view--active {
    display: flex;
}

.gestao-record-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.gestao-record-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.gestao-record-header-text h3 {
    margin: 0 0 0.3rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.gestao-record-header-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.gestao-table-wrapper--record {
    margin: 0;
}

.gestao-record-table .gestao-record-cell-label {
    width: 40%;
}

.gestao-table-wrapper--record {
    overflow: visible;
}

.gestao-record-table {
    border-collapse: separate;
    border-spacing: 0;
}

.gestao-table tbody tr.gestao-record-row--emergency-first th,
.gestao-table tbody tr.gestao-record-row--emergency-first td {
    box-shadow: inset 0 2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-record-row--emergency-last th,
.gestao-table tbody tr.gestao-record-row--emergency-last td {
    box-shadow: inset 0 -2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-record-row--emergency th:first-child {
    box-shadow: inset 2px 0 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-record-row--emergency td:last-child {
    box-shadow: inset -2px 0 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-record-row--emergency-first th:first-child {
    position: relative;
    overflow: visible;
    padding-top: 1.45rem;
    box-shadow:
            inset 2px 0 0 var(--danger-red),
            inset 0 2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-record-row--emergency-first td:last-child {
    box-shadow:
            inset -2px 0 0 var(--danger-red),
            inset 0 2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-record-row--emergency-last th:first-child {
    box-shadow:
            inset 2px 0 0 var(--danger-red),
            inset 0 -2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-record-row--emergency-last td:last-child {
    box-shadow:
            inset -2px 0 0 var(--danger-red),
            inset 0 -2px 0 var(--danger-red);
}

.gestao-record-row--emergency-first th:first-child::before {
    content: 'Emergência';
    position: absolute;
    top: 0;
    left: 0.55rem;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.05rem;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: var(--danger-gradient);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.18);
}
.gestao-allrecs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.gestao-search {
    position: relative;
    flex: 1 1 280px;
    max-width: 420px;
}

.gestao-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light, #6b7280);
    pointer-events: none;
}

.gestao-search-input {
    width: 100%;
    padding: 0.55rem 0.85rem 0.55rem 2.25rem;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    border: 1px solid var(--border-gray, #e2e8f0);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gestao-search-input:focus {
    border-color: var(--light-blue, #3E84F2);
    box-shadow: 0 0 0 3px rgba(62, 132, 242, 0.15);
}

.gestao-allrecs-summary {
    font-size: 0.85rem;
    color: var(--text-light, #6b7280);
    white-space: nowrap;
}

.gestao-pagination {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.gestao-page-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--navy-blue, #0A2240);
    background: #fff;
    border: 1px solid var(--border-gray, #e2e8f0);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gestao-page-btn:hover:not(:disabled) {
    background: var(--light-blue, #3E84F2);
    border-color: var(--light-blue, #3E84F2);
    color: #fff;
}

.gestao-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gestao-page-info {
    font-size: 0.9rem;
    color: var(--navy-blue, #0A2240);
    font-weight: 500;
    min-width: 130px;
    text-align: center;
}

.gestao-diff-view {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 260px;
    position: relative;
}

.gestao-diff-view--active {
    display: flex;
}

.gestao-diff-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.gestao-diff-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.gestao-diff-header-text h3 {
    margin: 0 0 0.3rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.gestao-diff-header-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.gestao-diff-back-icon {
    position: static;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.gestao-diff-back-icon:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--navy-blue);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}

.gestao-diff-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.gestao-diff-column h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-blue);
}

.gestao-diff-fields {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.gestao-diff-field {
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #f9fafb;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
}

.gestao-diff-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.gestao-diff-label-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.gestao-diff-label-text {
    white-space: nowrap;
}

.gestao-diff-value {
    color: #0f172a;
    word-break: break-word;
    white-space: pre-line;
}

.gestao-diff-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
}

.gestao-diff-icon-svg {
    width: 1rem;
    height: 1rem;
}

.gestao-diff-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.gestao-table-wrapper--diff {
    background: transparent;
    margin: 0;
    overflow: visible;
}

.gestao-diff-table {
    border-collapse: separate;
    border-spacing: 0;
}

.gestao-diff-table .gestao-diff-cell-label {
    width: 40%;
    padding-left: 0.9rem;
}

.gestao-diff-table tbody tr {
    cursor: default;
    transform: none;
}

.gestao-diff-table tbody tr:hover {
    background-color: transparent;
    transform: none;
}

.gestao-table tbody tr.gestao-diff-row--changed-old,
.gestao-table tbody tr.gestao-diff-row--changed-old:hover {
    background: rgba(248, 113, 113, 0.18);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.8);
}

.gestao-table tbody tr.gestao-diff-row--changed-new,
.gestao-table tbody tr.gestao-diff-row--changed-new:hover {
    background: rgba(34, 197, 94, 0.18);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.8);
}

.gestao-diff-icon--old {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.gestao-diff-icon--new {
    background: rgba(22, 163, 74, 0.15);
    color: #15803d;
}

.gestao-table tbody tr.gestao-diff-row--emergency-first th,
.gestao-table tbody tr.gestao-diff-row--emergency-first td {
    box-shadow: inset 0 2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-diff-row--emergency-last th,
.gestao-table tbody tr.gestao-diff-row--emergency-last td {
    box-shadow: inset 0 -2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-diff-row--emergency th:first-child {
    box-shadow: inset 2px 0 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-diff-row--emergency td:last-child {
    box-shadow: inset -2px 0 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-diff-row--emergency-first th:first-child {
    position: relative;
    overflow: visible;
    padding-top: 1.45rem;
    box-shadow:
            inset 2px 0 0 var(--danger-red),
            inset 0 2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-diff-row--emergency-first td:last-child {
    box-shadow:
            inset -2px 0 0 var(--danger-red),
            inset 0 2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-diff-row--emergency-last th:first-child {
    box-shadow:
            inset 2px 0 0 var(--danger-red),
            inset 0 -2px 0 var(--danger-red);
}

.gestao-table tbody tr.gestao-diff-row--emergency-last td:last-child {
    box-shadow:
            inset -2px 0 0 var(--danger-red),
            inset 0 -2px 0 var(--danger-red);
}

.gestao-diff-row--emergency-first th:first-child::before {
    content: 'Emergência';
    position: absolute;
    top: 0;
    left: 0.55rem;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.05rem;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: var(--danger-gradient);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.18);
}
.ficha-page {
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
}

.ficha-header,
.ficha-header-left,
.ficha-section-header,
.ficha-contact-card,
.ficha-contact-phone {
    display: flex;
    align-items: center;
}

.ficha-header {
    background: #ffffff;
    padding: 2rem 2.5rem;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ficha-header-left {
    gap: 1.5rem;
}

.ficha-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ficha-page-icon,
.ficha-section-icon,
.ficha-contact-avatar {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.ficha-page-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(62, 132, 242, 0.25);
}

.ficha-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.ficha-contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.ficha-header-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.ficha-header-text p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.ficha-note-text {
    font-size: 0.95rem;
}

.ficha-info-card,
.ficha-contact-card {
    transition: all 0.2s ease;
}

.ficha-content {
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ficha-section {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.ficha-section-header {
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ficha-section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy-blue);
    margin: 0;
}

.ficha-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.ficha-info-card,
.ficha-contact-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ficha-info-card {
    padding: 1.25rem;
    border-radius: 12px;
}

.ficha-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--light-blue);
}

.ficha-info-card.ficha-highlight {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-color: #d1fae5;
}

.ficha-info-card.ficha-highlight:hover {
    border-color: #10b981;
}

.ficha-info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.ficha-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-blue);
    word-break: break-word;
}

.ficha-info-card.ficha-highlight .ficha-info-value {
    color: #059669;
    font-size: 1.125rem;
}

.ficha-empty-contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.ficha-empty-icon {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.ficha-empty-contacts p {
    color: var(--text-light);
    font-size: 1rem;
}

.ficha-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.ficha-contact-card {
    padding: 1.5rem;
    border-radius: 16px;
    gap: 1rem;
}

.ficha-contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--light-blue);
}

.ficha-contact-info {
    display: flex;
    flex-direction: column;
}

.ficha-contact-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy-blue);
    margin-bottom: 0.25rem;
}

.ficha-contact-relation {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.ficha-contact-phone {
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}
/* Page layout */
.phe-page {
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
}

.phe-header {
    background: white;
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.phe-header .header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.phe-header .page-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(62, 132, 242, 0.25);
}

.phe-header .header-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.phe-header .header-text p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

/* Content area */
.phe-content {
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card */
.phe-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.phe-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 20px 20px 0 0;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.phe-card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy-blue);
    margin: 0;
}

.phe-card-header p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.phe-card-body {
    padding: 1.5rem 2rem;
}

/* Form grid */
.phe-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.field-row {
    display: block;
}

.field-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    font-family: inherit;
    background: #ffffff;
}

.field-select:focus,
.phe-card-body .field-input:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(62, 132, 242, 0.1);
}

.phe-card-body textarea.field-input {
    resize: vertical;
    min-height: 80px;
}

/* Time select pair */
.time-select-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-select-group .field-select {
    flex: 1;
}

.time-sep {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy-blue);
}

/* Submit area */
.phe-form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

/* Feedback */
.feedback-message {
    margin-top: 1.25rem;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.feedback-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #86efac;
}

.feedback-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Responsive */
@media (max-width: 768px) {
    .phe-header { padding: 1.5rem; }
    .phe-content { padding: 1.5rem; }
    .phe-card-body { padding: 1.25rem; }
    .phe-form-grid { grid-template-columns: 1fr; }
}

.he-page {
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
}

.he-header {
    background: white;
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.he-header .header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.he-header .page-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(62, 132, 242, 0.25);
}

.he-header .header-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.he-header .header-text p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.he-content {
    padding: 2rem 2.5rem;
}

.he-shell {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.he-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
}

.he-tab {
    position: relative;
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.he-tab:hover {
    color: var(--navy-blue);
    background: rgba(62, 132, 242, 0.04);
}

.he-tab--active {
    color: var(--navy-blue);
    background: white;
}

.he-tab--active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
}

.he-tab-content {
    padding: 1.75rem 2rem;
}

.he-view {
    display: none;
}

.he-view--active {
    display: block;
}

.he-section-header {
    margin-bottom: 1.25rem;
}

.he-section-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy-blue);
    margin: 0 0 0.25rem;
}

.he-section-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.he-filters {
    margin-bottom: 1.25rem;
}

.he-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.he-filter-row .field-input,
.he-filter-row .field-select {
    max-width: 220px;
}

.btn-sm {
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
}

.he-table-wrapper {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.he-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.he-table thead {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(59, 130, 246, 0.12));
}

.he-table th,
.he-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.he-table th {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.he-table tbody tr:last-child td {
    border-bottom: none;
}

.he-table tbody tr {
    transition: background-color 0.15s ease;
}

.he-table tbody tr:hover {
    background-color: #f9fafb;
}

.he-collab-name {
    font-weight: 500;
    color: #0f172a;
}

.he-collab-email {
    font-size: 0.8rem;
    color: var(--text-light);
}

.he-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.he-badge--requested {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.4);
    color: #92400e;
}

.he-badge--approved {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    color: #166534;
}

.he-badge--rejected {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #991b1b;
}

.he-action-group {
    display: flex;
    gap: 0.4rem;
}

.he-action-btn {
    border: none;
    background: transparent;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.he-action-btn--approve {
    color: #166534;
    background: rgba(34, 197, 94, 0.1);
}

.he-action-btn--approve:hover {
    background: rgba(34, 197, 94, 0.25);
}

.he-action-btn--reject {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.1);
}

.he-action-btn--reject:hover {
    background: rgba(239, 68, 68, 0.25);
}

.he-action-btn--detail {
    color: var(--gradient-1);
}

.he-action-btn--detail:hover {
    text-decoration: underline;
}

.he-empty {
    display: none;
    margin: 0;
    padding: 2rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

.he-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.he-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.he-stat-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy-blue);
}

.he-export-controls {
    margin-bottom: 1.5rem;
}

.he-export-actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
}

.he-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
}

.he-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gradient-1);
    cursor: pointer;
}

@media (max-width: 768px) {
    .he-header { padding: 1.5rem; }
    .he-content { padding: 1.5rem; }
    .he-tab-content { padding: 1.25rem; }
    .he-filter-row { flex-direction: column; }
    .he-filter-row .field-input,
    .he-filter-row .field-select { max-width: 100%; }
}

.he-justif-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--gradient-1);
    border: 1.5px solid var(--gradient-1);
    border-radius: 50%;
    cursor: default;
    user-select: none;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.he-justif-icon:hover {
    background: var(--gradient-1);
    color: white;
}

.he-justif-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f8fafc;
    font-family: inherit;
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    white-space: pre-wrap;
    max-width: 280px;
    width: max-content;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.he-justif-icon:hover::after {
    opacity: 1;
}

.he-no-data {
    color: var(--text-light);
}

.he-col-justif {
    text-align: center;
    width: 100px;
}

.aprov-page {
    padding: 0;
    background: #f3f6fb;
    min-height: 100vh;
}

.aprov-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    gap: 1.5rem;
}

.aprov-header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.aprov-page-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 10px 26px rgba(62, 132, 242, 0.22);
}

.aprov-header-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.5px;
}

.aprov-header-text p {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
}

.aprov-content {
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.aprov-content > * {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

/* ===== Stats ===== */
.aprov-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.aprov-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.aprov-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    border-color: rgba(245, 158, 11, 0.35);
}

.aprov-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.aprov-stat-icon--pending {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.22);
}

.aprov-stat-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.aprov-stat-label {
    margin-top: 0.1rem;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 600;
}

.aprov-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy-blue);
    line-height: 1.1;
}

/* ===== Tabs ===== */
.aprov-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.aprov-tab {
    background: transparent;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.aprov-tab:hover {
    color: var(--navy-blue);
}

.aprov-tab--active {
    color: var(--navy-blue);
    border-bottom-color: var(--gradient-1, #3e84f2);
}

.aprov-view {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}

.aprov-view--active {
    display: flex;
}

/* ===== Filters ===== */
.aprov-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.aprov-filter-group {
    display: inline-flex;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.aprov-filter {
    background: transparent;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.aprov-filter:hover {
    color: var(--navy-blue);
}

.aprov-filter--active {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: #ffffff;
}

/* ===== List & cards ===== */
.aprov-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aprov-empty {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-light);
    margin: 0;
}

.aprov-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
    padding: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem 1.5rem;
    align-items: start;
}

.aprov-card-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.aprov-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.aprov-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin: 0;
}

.aprov-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
    background: #eef2ff;
    color: #4338ca;
}

.aprov-chip--ferias { background: #ecfeff; color: #0e7490; }
.aprov-chip--baixa { background: #fee2e2; color: #b91c1c; }
.aprov-chip--licenca { background: #f3e8ff; color: #6b21a8; }

.aprov-chip--status-aprovado { background: #dcfce7; color: #166534; }
.aprov-chip--status-rejeitado { background: #fee2e2; color: #991b1b; }

.aprov-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.aprov-card-meta strong {
    color: var(--navy-blue);
    font-weight: 600;
}

.aprov-card-justif {
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #475569;
    white-space: pre-wrap;
}

.aprov-card-attach a {
    color: var(--gradient-1, #3e84f2);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.aprov-card-attach a:hover {
    text-decoration: underline;
}

.aprov-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    min-width: 130px;
}

.aprov-btn {
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.aprov-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.aprov-btn--approve {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.aprov-btn--reject {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
}

.aprov-btn--approve:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.aprov-btn--reject:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 720px) {
    .aprov-header { padding: 1.5rem 1.25rem; }
    .aprov-content { padding: 1.25rem; }
    .aprov-card {
        grid-template-columns: 1fr;
    }
    .aprov-card-actions {
        flex-direction: row;
        min-width: 0;
    }
    .aprov-card-actions .aprov-btn {
        flex: 1;
    }
}

/* ===== Modal extras ===== */
.aprov-modal-comment {
    width: 100%;
    min-height: 90px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-family: inherit;
    font-size: 0.92rem;
    resize: vertical;
    margin-top: 0.75rem;
}

.aprov-modal-comment:focus {
    outline: none;
    border-color: var(--gradient-1, #3e84f2);
    box-shadow: 0 0 0 3px rgba(62, 132, 242, 0.15);
}

.aprov-modal-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin: 0.5rem 0 0 0;
}

.ferias-page {
    padding: 0;
    background: #f3f6fb;
    min-height: 100vh;
}

.ferias-header,
.ferias-header-left,
.ferias-header-actions,
.ferias-stat-card,
.ferias-card-header,
.ferias-card-title-wrap,
.ferias-card-decider,
.ferias-field-label,
.ferias-tab {
    display: flex;
    align-items: center;
}

.ferias-header {
    background: #ffffff;
    padding: 2rem 2.5rem;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    gap: 1.5rem;
}

.ferias-header-left {
    gap: 1.25rem;
    min-width: 0;
}

.ferias-header-actions {
    gap: 0.75rem;
    flex-shrink: 0;
}

.ferias-page-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 10px 26px rgba(62, 132, 242, 0.22);
}

.ferias-header-text {
    min-width: 0;
}

.ferias-header-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.5px;
}

.ferias-header-text p {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
}

.ferias-content {
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ferias-content > * {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.ferias-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.ferias-stat-card {
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ferias-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 130, 246, 0.35);
}

.ferias-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.ferias-stat-card:nth-child(1) .ferias-stat-icon {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.22);
}

.ferias-stat-card:nth-child(2) .ferias-stat-icon {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.18);
}

.ferias-stat-card:nth-child(3) .ferias-stat-icon {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.16);
}

.ferias-stat-card:nth-child(4) .ferias-stat-icon {
    background: linear-gradient(135deg, #ef4444, #f87171);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.14);
}

.ferias-stat-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ferias-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy-blue);
    line-height: 1.1;
}

.ferias-stat-label {
    margin-top: 0.1rem;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 600;
}

.ferias-filters {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
    padding: 0.9rem 1rem;
}

.ferias-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ferias-tab {
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: var(--navy-blue);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ferias-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.ferias-tab.is-active {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-color: rgba(59, 130, 246, 0.15);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(62, 132, 242, 0.22);
}

.ferias-tab svg {
    flex-shrink: 0;
}

.ferias-tab.is-active svg {
    color: #ffffff;
}

.ferias-tab:focus-visible,
#ferias-novo-pedido-btn:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.35);
    outline-offset: 3px;
}

.ferias-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 640px;
}

.ferias-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ferias-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.ferias-card-topline {
    height: 4px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
}

.ferias-card[data-status="approved"] .ferias-card-topline {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.ferias-card[data-status="pending"] .ferias-card-topline {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.ferias-card[data-status="rejected"] .ferias-card-topline {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.ferias-card-header {
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem 1.6rem 1rem 1.6rem;
}

.ferias-card-title-wrap {
    gap: 1rem;
    min-width: 0;
}

.ferias-card-type-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 10px 22px rgba(62, 132, 242, 0.18);
}

.ferias-card-title-text {
    min-width: 0;
}

.ferias-card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy-blue);
    line-height: 1.2;
}

.ferias-card-subtitle {
    margin: 0.25rem 0 0 0;
    color: var(--text-light);
    font-size: 0.92rem;
    font-weight: 600;
}

.ferias-card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: var(--navy-blue);
}

.ferias-status-approved,
.ferias-card[data-status="approved"] .ferias-card-status {
    border-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    color: #059669;
}

.ferias-card[data-status="pending"] .ferias-card-status {
    border-color: rgba(245, 158, 11, 0.25);
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #b45309;
}

.ferias-card[data-status="rejected"] .ferias-card-status {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #b91c1c;
}

.ferias-card-body {
    padding: 0 1.6rem 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ferias-date-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 1.15rem;
}

.ferias-date-box {
    flex: 1;
    min-width: 0;
}

.ferias-date-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 0.6px;
}

.ferias-date-value {
    margin-top: 0.25rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy-blue);
}

.ferias-date-sep {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    flex-shrink: 0;
}

.ferias-field {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ferias-field-label {
    gap: 0.55rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--navy-blue);
}

.ferias-field-label svg {
    color: var(--text-light);
    flex-shrink: 0;
}

.ferias-field-value {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1rem;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
    min-height: 54px;
    display: flex;
    align-items: center;
}

.ferias-card-footer {
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 1rem 1.6rem;
}

.ferias-card-decider {
    gap: 0.6rem;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.92rem;
}

.ferias-card-decider svg {
    color: var(--text-light);
    flex-shrink: 0;
}

.ferias-card-decider strong {
    color: var(--navy-blue);
    font-weight: 800;
}

/* ─── Status correct data-attributes (backend uses pt names) ─── */
.ferias-card[data-status="pendente"] .ferias-card-status {
    border-color: rgba(245, 158, 11, 0.25);
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #b45309;
}

.ferias-card[data-status="aprovado"] .ferias-card-status {
    border-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    color: #059669;
}

.ferias-card[data-status="rejeitado"] .ferias-card-status {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #b91c1c;
}

/* topline accent */
.ferias-card[data-status="pendente"]  .ferias-card-topline { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.ferias-card[data-status="aprovado"]  .ferias-card-topline { background: linear-gradient(90deg, #10b981, #34d399); }
.ferias-card[data-status="rejeitado"] .ferias-card-topline { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ─── Empty state ─── */
.ferias-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ─── Comprovativo link ─── */
a.ferias-comprovativo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--light-blue);
    text-decoration: none;
}

a.ferias-comprovativo-link:hover { text-decoration: underline; }

.ferias-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0.25rem 0;
}

.ferias-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ferias-form-dates {
    flex-direction: row;
    gap: 1rem;
}

.ferias-form-dates > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ferias-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.ferias-form-required {
    color: #ef4444;
    margin-left: 2px;
}

.ferias-form-hint {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 0.35rem;
}

.ferias-form-error {
    color: #b91c1c;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0;
}

.ferias-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.5rem;
}

.apw-page {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.apw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.apw-header .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.apw-header .page-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apw-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.apw-header p {
    margin: 0.15rem 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.apw-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.apw-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    max-width: 720px;
}

.apw-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.apw-card-header .card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apw-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.apw-card-header p {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

.apw-card-body {
    padding: 1.25rem;
}

.apw-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 460px;
}

.apw-form-grid .field-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.apw-form-grid .field-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
}

.apw-form-grid .field-input {
    width: 100%;
    padding: 0.55rem 2.4rem 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apw-form-grid .field-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.apw-password-wrapper {
    position: relative;
}

.apw-toggle-btn {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.3rem;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.apw-toggle-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.apw-feedback {
    margin: 1rem 0 0;
    min-height: 1.2rem;
    font-size: 0.88rem;
}

.apw-feedback.is-error {
    color: #b91c1c;
}

.apw-feedback.is-success {
    color: #047857;
}

.apw-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.apw-actions .btn-primary,
.apw-actions .btn-secondary {
    min-width: 140px;
}

.apw-actions .btn-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Page Login - Enhanced Modern UI/UX Styles */

/* Login Container with Enhanced Glass Effect */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-blue) 0%, #1a365d 40%, #2d5a87 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
            radial-gradient(circle at 15% 25%, rgba(62, 132, 242, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 85% 75%, rgba(62, 132, 242, 0.12) 0%, transparent 50%),
            radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.login-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(62, 132, 242, 0.05) 45deg, transparent 90deg, rgba(62, 132, 242, 0.05) 135deg, transparent 180deg);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Login Box */
.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3.5rem 3rem;
    border-radius: 24px;
    box-shadow:
            0 32px 64px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    width: 100%;
    max-width: 440px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Logo and Brand */
.login-brand {
    margin-bottom: 2.5rem;
}

.login-brand .logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), #4a90e2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow:
            0 12px 32px rgba(62, 132, 242, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.login-brand .logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.login-brand .logo svg {
    width: 36px;
    height: 36px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* When company logo image is present, remove box styling and fit image */
.login-brand .logo.has-company-logo {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    width: 200px;
    height: 80px;
    border-radius: 0;
}
.login-brand .logo.has-company-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.login-brand h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 0.75rem;
    letter-spacing: -0.8px;
    background: linear-gradient(135deg, var(--navy-blue), #1a365d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-brand p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0;
    font-weight: 400;
}

.brand-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--light-blue), transparent);
    margin: 1.5rem auto 0;
    border-radius: 1px;
}

/* Enhanced Form Styles */
.login-form {
    margin-top: 2.5rem;
}

.form-group {
    margin-bottom: 1.75rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.input-wrapper {
    position: relative;
    transform-style: preserve-3d;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    font-family: var(--font-family);
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.form-input:focus {
    outline: none;
    border-color: var(--light-blue);
    background: white;
    box-shadow:
            0 0 0 4px rgba(62, 132, 242, 0.1),
            0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--light-blue);
    transform: translateY(-50%) scale(1.1);
}

/* Enhanced Password Toggle */
.password-toggle {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.05);
}

/* Enhanced Submit Button */
.login-submit {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), #4a90e2);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow:
            0 8px 24px rgba(62, 132, 242, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow:
            0 12px 32px rgba(62, 132, 242, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-submit:hover::before {
    left: 100%;
}

.login-submit:active {
    transform: translateY(-1px);
}

.login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-submit .btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.login-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-submit.loading .btn-text {
    display: none;
}

.login-submit.loading .spinner {
    display: block;
}

/* Enhanced Toast Notifications */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 0.75rem;
    box-shadow:
            0 12px 32px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(255, 255, 255, 0.2);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 320px;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(0);
    transition: transform 0.3s ease-out;
}

.toast.removing {
    animation: slideOutRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

/* Neutralize variant backgrounds (avoid full green/red fill) and apply subtle tint only on left accent via border */
.toast.success,
.toast.error,
.toast.warning {
    background: rgba(255,255,255,0.95) !important; /* ensure no overriding solid color */
}

/* Optional very light inner shadow glow matching accent for depth without coloring whole card */
.toast.success { box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2), 0 0 0 3px rgba(16,185,129,0.08); }
.toast.error { box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2), 0 0 0 3px rgba(239,68,68,0.10); }
.toast.warning { box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2), 0 0 0 3px rgba(245,158,11,0.10); }

.toast .toast-icon {
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast .toast-content {
    flex: 1;
}

.toast .toast-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.toast .toast-message {
    color: var(--text-light);
    font-size: 0.9rem;
}

.toast .toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.toast .toast-close:hover {
    color: var(--text-dark);
}

/* Enhanced Responsive Design */
@media (max-width: 480px) {
    .login-box {
        margin: 1.5rem;
        padding: 2.5rem 2rem;
        border-radius: 20px;
    }

    .login-brand h1 {
        font-size: 2rem;
    }

    .login-brand .logo {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .login-brand .logo svg {
        width: 32px;
        height: 32px;
    }

    .toast {
        min-width: auto;
        margin: 0 1rem 0.75rem;
    }

    .toast-container {
        left: 0;
        right: 0;
        top: 1.5rem;
    }
}

/* Focus styles for accessibility */
.login-submit:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid var(--light-blue);
    outline-offset: 2px;
}
