.xeno_app_dashboard {
    max-width: 1200px;
    margin: 0 auto;
    // Core wraps every action in .o_action_manager > .o_action, both
    // height:100% + overflow:hidden, relying on each view's own inner
    // .o_content to scroll. These custom client-action pages (My Profile,
    // Home dashboard) render a bare div with no such inner scroller, so a
    // page taller than the viewport (e.g. once the Apps section is added)
    // was clipped with no way to scroll. Give this root a definite height
    // and its own vertical scroll -- scoped to these pages only, normal
    // Odoo views are untouched.
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;

    h2 {
        font-family: var(--body-font-family);
        color: #142933;
    }
}

.xeno_app_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.xeno_app_tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;

    &:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
        border: 1px solid #142933;
    }
}

.xeno_app_name {
    font-weight: 500;
    text-align: center;
    color: #142933;
}

// --- Home dashboard widgets ---

// Only rendered on the employee's own birthday (xeno_is_birthday_today).
.xeno_birthday_banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #fce7f3, #fde2e2);
    color: #9d174d;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 20px;
    border-radius: 10px;
}

.xeno_birthday_emoji {
    font-size: 1.4rem;
}

.xeno_home_grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;

    @media (max-width: 900px) {
        grid-template-columns: 1fr;
    }
}

.xeno_profile_card,
.xeno_mini_calendar,
.xeno_news_feed,
.xeno_leave_summary {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    padding: 20px;
}

.xeno_profile_card {
    display: flex;
    align-items: center;
    gap: 16px;
}

// Vertical card (h5 + label/value rows) -- overrides the flex-row layout
// above, which is built for the avatar+name profile card specifically.
.xeno_probation_card {
    display: block;

    h5 {
        margin-bottom: 12px;
    }
}

.xeno_probation_row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);

    &:last-child {
        border-bottom: none;
    }
}

// Personal Information page
.xeno_personal_info_card,
.xeno_personal_documents_card {
    display: block;

    h5 {
        margin-bottom: 12px;
    }
}

.xeno_personal_info_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;

    label {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 0.85rem;
        font-weight: 600;
        color: #495057;
    }

    &.xeno_personal_info_grid_wide {
        grid-template-columns: 1fr;
    }
}

.xeno_personal_documents_list {
    list-style: none;
    padding: 0;
    margin: 0;

    li {
        padding: 8px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);

        &:last-child {
            border-bottom: none;
        }
    }

    .xeno_doc_rename_btn {
        opacity: 0;
        transition: opacity 0.15s;
    }

    li:hover .xeno_doc_rename_btn {
        opacity: 1;
    }

    .xeno_doc_rename_input {
        max-width: 320px;
    }
}

.xeno_profile_avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px #142933;
}

.xeno_profile_name {
    font-family: var(--body-font-family);
    font-size: 1.2rem;
    color: #142933;
    font-weight: 600;
}

.xeno_profile_job {
    color: #6c757d;
    font-size: 0.9rem;
}

// --- Home dashboard (My Profile landing page) card system -- deliberately
// separate from the .xeno_profile_card glass-card style above (still used
// by My Profile's attendance/probation cards and Personal Information),
// since this page wants an opaque white card matching the rest of the app's
// list/form surfaces. .xeno_card is added ALONGSIDE .xeno_mini_calendar/
// .xeno_news_feed below (not replacing those class names, which the old
// glass-card rule above still targets) -- same specificity, defined later,
// so its background/border/radius/padding win for elements carrying both
// classes, with no effect on any other page that uses the old classes alone.
.xeno_profile_strip {
    display: flex;
    align-items: center;
    gap: 14px;
}

.xeno_profile_strip_text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.xeno_profile_sub {
    font-size: 0.85rem;
    color: #6c757d;
}

.xeno_card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(20, 41, 51, 0.05);
    padding: 18px 20px;
}

.xeno_card_header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--body-font-family);
    font-weight: 600;
    color: #142933;
    font-size: 1rem;
    margin-bottom: 14px;

    i {
        color: #EC1D23;
    }
}

.xeno_card_head_nav {
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.xeno_card_header_title {
    display: flex;
    align-items: center;
    gap: 8px;

    i {
        color: #EC1D23;
    }
}

.xeno_hr_subtitle {
    margin: 2px 0 0;
    font-size: 0.78rem;
    font-weight: 400;
    color: #6c757d;
}

.xeno_day_nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #142933;
    white-space: nowrap;

    // Overrides .xeno_card_header's "i { color: #EC1D23 }" (meant for the
    // section's own leading icon) -- these prev/next chevrons sit inside
    // that same header for layout purposes but should read as plain
    // navigation, in the same navy as the date label next to them, not the
    // brand-red accent color. Set explicitly rather than `inherit`, since
    // Bootstrap's own .btn-light already sets a (slightly different) text
    // color on the <button> that inherit would pick up instead.
    button i {
        color: #142933;
    }
}

.xeno_table_wrap {
    overflow-x: auto;
}

.xeno_report_table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;

    th, td {
        padding: 8px 12px;
        text-align: center;
        white-space: nowrap;
        border-bottom: 1px solid #f0f1f3;
    }

    th {
        color: #6c757d;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 0.02em;
        background: #f9fafb;
    }

    tbody tr:hover {
        background: #f9fafb;
    }
}

.xeno_table_empty {
    color: #9ca3af;
    padding: 24px 0 !important;
}

.xeno_leave_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.xeno_leave_card {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 14px;
}

.xeno_leave_card_top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.xeno_leave_type {
    font-weight: 600;
    color: #142933;
    font-size: 0.88rem;
}

.xeno_leave_remaining_big {
    font-family: var(--body-font-family);
    font-weight: 700;
    font-size: 1.3rem;
    color: #142933;
    white-space: nowrap;
}

.xeno_leave_bar {
    height: 6px;
    border-radius: 999px;
    background: #ececec;
    overflow: hidden;
    margin-bottom: 10px;
}

.xeno_leave_bar_fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.2s ease;
}

.xeno_leave_stats {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.76rem;
    color: #6c757d;

    strong {
        color: #142933;
    }
}

.xeno_upcoming_leave {
    display: flex;
    align-items: center;
    gap: 14px;
}

.xeno_upcoming_leave_icon {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 10px;
    background: rgba(236, 29, 35, 0.1);
    color: #EC1D23;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.xeno_upcoming_leave_title {
    font-weight: 600;
    color: #142933;
}

.xeno_upcoming_leave_dates {
    font-size: 0.85rem;
    color: #6c757d;
}

.xeno_pill {
    margin-left: auto;
    flex: none;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.xeno_pill_pending {
    background: #fdf1d6;
    color: #8a6d1d;
}

.xeno_pill_approved {
    background: #e1f3ea;
    color: #1f8f6e;
}

.xeno_mini_calendar_legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: #6c757d;
}

.xeno_legend_dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    margin-right: 5px;
}

.xeno_legend_dot_holiday {
    background: #EC1D23;
}

.xeno_legend_dot_leave {
    background: #6a3691;
}

.xeno_mini_calendar_header {
    font-weight: 600;
    color: #142933;
    margin-bottom: 10px;
    text-align: center;
}

.xeno_mini_calendar_weekdays,
.xeno_mini_calendar_grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.xeno_mini_calendar_weekdays span {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 600;
}

.xeno_mini_calendar_cell {
    padding: 6px 0;
    font-size: 0.85rem;
    color: #142933;
    border-radius: 6px;

    &.today {
        background: #142933;
        color: #fff;
        font-weight: 700;
    }

    &.holiday {
        background: rgba(236, 29, 35, 0.15);
        color: #EC1D23;
        font-weight: 600;
    }

    &.today.holiday {
        background: #EC1D23;
        color: #fff;
    }

    // Attendance status: a bottom border so it stays visible even when
    // combined with .today/.holiday's own background.
    &.att-present { box-shadow: inset 0 -3px 0 #1f8f6e; }
    &.att-late { box-shadow: inset 0 -3px 0 #b3791d; }
    &.att-absent { box-shadow: inset 0 -3px 0 #c81119; }
    &.att-leave { box-shadow: inset 0 -3px 0 #6a3691; }
    &.att-off { box-shadow: inset 0 -3px 0 #1d4ed8; }
    &.att-bt { box-shadow: inset 0 -3px 0 #0e7490; }

    // My Profile dashboard's own-leave highlight (distinct from the
    // attendance-status modifiers above, which belong to My Profile's
    // separate attendance-history calendar).
    &.my-leave { box-shadow: inset 0 -3px 0 #6a3691; }
}

.xeno_attendance_card h5 {
    font-family: var(--body-font-family);
    color: #142933;
    margin-bottom: 8px;
}

.xeno_attendance_link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1d6fb3;

    &:hover {
        text-decoration: underline;
    }
}

.xeno_news_item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(20, 41, 51, 0.08);

    &:last-child {
        border-bottom: none;
    }
}

.xeno_news_date {
    font-size: 0.75rem;
    color: #6c757d;
}

.xeno_news_title {
    font-weight: 600;
    color: #142933;
}

.xeno_news_body {
    font-size: 0.85rem;
    color: #495057;
}
