:root {
    --app-bg: radial-gradient(1200px 500px at 50% -160px, #e2e8f0 0%, #f8fafc 42%, #f1f5f9 100%);
    --app-surface: rgba(255, 255, 255, 0.84);
    --app-surface-solid: #ffffff;
    --app-border: rgba(15, 23, 42, 0.1);
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-shadow: 0 12px 28px rgba(15, 23, 42, 0.11);
    --app-radius: 18px;
    --app-safe-bottom: max(14px, env(safe-area-inset-bottom));
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    background: var(--app-bg) fixed;
    color: var(--app-text);
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: min(100%, 540px);
}

.navbar.bg-topo,
.navbar.bg-blue-menu {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
}

.topo-menu p,
.topo-menu h2 {
    color: var(--app-text);
}

.card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

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

.btn {
    border-radius: 14px !important;
    font-weight: 700 !important;
    min-height: 44px;
}

.btn-primary,
.btn-success {
    border: 0;
}

.form-control,
.form-select {
    border-radius: 12px;
    min-height: 44px;
    border: 1px solid rgba(100, 116, 139, 0.28);
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(100, 116, 139, 0.48);
}

.link-menu {
    border-radius: 14px !important;
}

.navbar.bg-topo .link-menu {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1;
}

.navbar.bg-topo .link-menu i {
    display: block;
    line-height: 1;
    font-size: 1rem;
}

.topo-menu {
    margin-top: 10px;
}

.topo-menu .container-fluid.justify-content-start > a.btn.btn-primary.me-3,
.topo-menu .container-fluid.justify-content-start > a.btn.btn-primary.ms-3 {
    width: 44px;
    height: 44px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.topo-menu .container-fluid.justify-content-start > a.btn.btn-primary.me-3 i,
.topo-menu .container-fluid.justify-content-start > a.btn.btn-primary.ms-3 i {
    display: block;
    line-height: 1;
    font-size: 1rem;
}

.ponto-page .ponto-nav-btn,
.ponto-page .ponto-nav-btn-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ponto-page .ponto-nav-btn i,
.ponto-page .ponto-nav-btn-disabled i {
    display: block;
    line-height: 1;
}

.topo-menu nav[aria-label="breadcrumb"] {
    width: 100%;
}

.topo-menu .breadcrumb {
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 0.78rem;
}

.topo-menu .breadcrumb-item {
    display: none;
    line-height: 1;
    min-height: 0;
}

.topo-menu .breadcrumb-item:first-child {
    display: inline-flex;
    align-items: center;
}

.topo-menu .breadcrumb-item:first-child a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: rgba(15, 23, 42, 0.72);
    font-weight: 700;
    border-radius: 0;
    padding: 0;
    background: transparent;
    font-size: 0.78rem;
}

.topo-menu .breadcrumb-item:first-child a::before {
    content: "\f060";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
}

.topo-menu .breadcrumb-item a.badge.bg-secondary,
.topo-menu .breadcrumb-item:first-child a.badge.bg-secondary {
    color: rgba(15, 23, 42, 0.72) !important;
    background: transparent !important;
    border: 0;
    padding: 0;
    font-size: 0.78rem;
}

.app-auth-logo {
    max-width: 75%;
    height: auto;
}

.app-auth .card {
    border: 1px solid rgba(15, 23, 42, 0.14);
}

.app-menu-card {
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.app-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14);
}

.app-menu-link {
    min-height: 124px;
    border: 0 !important;
    background: transparent !important;
    color: var(--app-text) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.app-menu-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    background: rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.app-menu-text {
    font-size: 0.92rem;
    line-height: 1.2rem;
    text-align: center;
}

.ponto-page .tw-mobile-card {
    border-radius: 14px;
}

.ponto-page .btn {
    min-height: 36px !important;
    padding: 6px 10px !important;
    border-radius: 12px !important;
    font-size: 0.9rem;
}

.ponto-page .ponto-actions .btn {
    min-height: 34px !important;
    padding: 5px 10px !important;
    font-size: 0.88rem;
}

.input-group .btn {
    min-width: 42px;
}

.dataTables_wrapper .dataTables_filter {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: rgba(15, 23, 42, 0.8);
    font-weight: 600;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0 !important;
    width: 180px;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(100, 116, 139, 0.28);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 10px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: 0;
    border-color: rgba(100, 116, 139, 0.48);
}

.alert {
    border: 1px solid transparent;
    border-radius: 14px;
}

footer {
    padding-bottom: calc(56px + var(--app-safe-bottom));
}

#preloader {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

#preloader .loader {
    width: 64px;
    height: 64px;
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .topo-menu .breadcrumb-item:first-child a,
    .topo-menu .breadcrumb-item a.badge.bg-secondary,
    .topo-menu .breadcrumb-item:first-child a.badge.bg-secondary {
        font-size: 0.75rem;
    }

    .ponto-page .btn {
        min-height: 34px !important;
        padding: 5px 9px !important;
        font-size: 0.86rem;
    }

    .navbar.bg-topo .link-menu,
    .topo-menu .container-fluid.justify-content-start > a.btn.btn-primary.me-3,
    .topo-menu .container-fluid.justify-content-start > a.btn.btn-primary.ms-3 {
        width: 42px;
        height: 42px;
    }

    .ponto-page .ponto-actions .btn {
        min-height: 32px !important;
        padding: 4px 8px !important;
        font-size: 0.82rem;
    }

    .dataTables_wrapper .dataTables_filter {
        justify-content: flex-start;
    }

    .dataTables_wrapper .dataTables_filter label {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
    }

    .card .card-body {
        padding: 0.9rem;
    }
}
