html {
    font-size: 14px;
    min-height: 100%;
    position: relative;
}

:root {
    --hfs-navy: #123161;
    --hfs-green: #0e9c4a;
    --hfs-green-dark: #087437;
    --hfs-ink: #2d3940;
    --hfs-muted: #66727c;
    --hfs-border: #dce6df;
    --hfs-surface: #f6faf7;
    --hfs-white: #ffffff;
}

body {
    background:
        radial-gradient(circle at top right, rgba(14, 156, 74, 0.08), transparent 26rem),
        linear-gradient(180deg, #ffffff 0%, var(--hfs-surface) 100%);
    color: var(--hfs-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 300;
    line-height: 1.45;
    margin-bottom: 70px;
}

a {
    color: var(--hfs-green);
    text-decoration: none;
}

a:hover {
    color: var(--hfs-green-dark);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--hfs-navy);
    font-weight: 600;
    line-height: 1.12;
}

.odp-shell {
    min-height: calc(100vh - 70px);
    max-width: 1600px;
    width: calc(100% - 1.5rem);
}

.odp-navbar {
    background: var(--hfs-white);
    border-bottom: 1px solid var(--hfs-border);
    box-shadow: 0 10px 30px rgba(18, 49, 97, 0.06);
}

.odp-brand {
    align-items: center;
    color: var(--hfs-navy) !important;
    display: inline-flex;
    font-weight: 600;
    gap: 0.55rem;
}

.odp-brand-mark {
    align-items: center;
    background: var(--hfs-green);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    height: 1.9rem;
    justify-content: center;
    width: 1.9rem;
}

.odp-navbar .nav-link {
    color: var(--hfs-ink) !important;
    font-weight: 500;
}

.odp-navbar .nav-link:hover {
    color: var(--hfs-green) !important;
}

.odp-main {
    padding-bottom: 1.25rem;
    padding-top: 1.25rem;
}

.odp-card {
    background: var(--hfs-white);
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(18, 49, 97, 0.07);
    padding: 1.2rem;
}

.odp-focus-card {
    border-left: 4px solid var(--hfs-green);
}

.odp-page-kicker {
    color: var(--hfs-green);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.odp-muted {
    color: var(--hfs-muted);
}

.form-label {
    color: var(--hfs-navy);
    font-weight: 600;
}

.form-control,
.form-select {
    border-color: var(--hfs-border);
    border-radius: 8px;
    color: var(--hfs-ink);
    padding: 0.45rem 0.65rem;
}

.form-label {
    margin-bottom: 0.3rem;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--hfs-green);
    box-shadow: 0 0 0 0.2rem rgba(14, 156, 74, 0.16);
}

.btn-primary {
    background: var(--hfs-green);
    border-color: var(--hfs-green);
    border-radius: 8px;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
}

.btn {
    line-height: 1.35;
}

.btn-sm,
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--hfs-green-dark);
    border-color: var(--hfs-green-dark);
}

.btn-link {
    color: var(--hfs-green);
    text-decoration: none;
}

.alert {
    border-radius: 8px;
}

.odp-hero {
    background: var(--hfs-white);
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    overflow: hidden;
    padding: 1.4rem;
    position: relative;
}

.odp-hero::after {
    background: var(--hfs-green);
    border-radius: 50%;
    content: "";
    height: 13rem;
    opacity: 0.08;
    position: absolute;
    right: -4rem;
    top: -5rem;
    width: 13rem;
}

.odp-footer {
    background: var(--hfs-white);
    border-top: 1px solid var(--hfs-border);
    bottom: 0;
    color: var(--hfs-muted);
    height: 60px;
    line-height: 60px;
    position: absolute;
    width: 100%;
}

.odp-table {
    color: var(--hfs-ink);
    font-size: 0.875rem;
}

.odp-table thead th {
    border-bottom: 1px solid var(--hfs-border);
    color: var(--hfs-navy);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.odp-table > :not(caption) > * > * {
    padding: 0.45rem 0.55rem;
}

.odp-sort-link {
    color: var(--hfs-navy);
    display: inline-flex;
    gap: 0.25rem;
    white-space: nowrap;
}

.odp-sort-link:hover {
    color: var(--hfs-green);
}

.odp-table tbody td {
    border-color: var(--hfs-border);
}

.odp-status-pill {
    background: rgba(14, 156, 74, 0.1);
    border: 1px solid rgba(14, 156, 74, 0.2);
    border-radius: 999px;
    color: var(--hfs-green-dark);
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.18rem 0.5rem;
}

.odp-status-warning {
    background: rgba(255, 193, 7, 0.16);
    border-color: rgba(255, 193, 7, 0.35);
    color: #7a4f00;
}

.odp-code-cell {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.82rem;
    max-width: 24rem;
    overflow-wrap: anywhere;
}

.odp-email-action-strip {
    background: var(--hfs-white);
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(18, 49, 97, 0.06);
    padding: 0.6rem;
}

.odp-side-panel {
    padding: 0.9rem;
}

@media (min-width: 1200px) {
    .odp-side-panel {
        position: sticky;
        top: 5rem;
    }
}

.odp-email-body-frame {
    background: #fff;
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    box-sizing: border-box;
    display: block;
    height: 34rem;
    max-width: calc(100% - 2.5rem);
    width: calc(100% - 2.5rem);
}

.odp-email-reader {
    padding: 0;
}

.odp-email-toolbar {
    align-items: center;
    background: #fbfdfb;
    border-bottom: 1px solid var(--hfs-border);
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 0.55rem;
    justify-content: space-between;
    padding: 0.65rem 0.9rem;
}

.odp-email-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--hfs-border);
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem;
}

.odp-email-avatar {
    align-items: center;
    background: var(--hfs-navy);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    height: 2.3rem;
    justify-content: center;
    width: 2.3rem;
}

.odp-email-match-band {
    background: var(--hfs-surface);
    border-bottom: 1px solid var(--hfs-border);
    padding: 0.7rem 0.9rem;
}

.odp-email-attachments {
    border-bottom: 1px solid var(--hfs-border);
    padding: 0.9rem;
}

.odp-email-attachments .btn-group {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.35rem;
}

.odp-email-reader > .odp-label,
.odp-email-reader > .odp-email-body-frame,
.odp-email-reader > pre,
.odp-email-reader > .odp-muted {
    margin-left: 0.9rem;
    margin-right: 0.9rem;
}

.odp-email-reader > .odp-email-body-frame,
.odp-email-reader > pre,
.odp-email-reader > .odp-muted {
    margin-bottom: 0.9rem;
}

.odp-task-search-result {
    align-items: flex-start;
    background: var(--hfs-white);
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.7rem 0.8rem;
}

.odp-task-search-main {
    min-width: 0;
}

.odp-task-search-status {
    background: rgba(18, 49, 97, 0.08);
    border-color: rgba(18, 49, 97, 0.14);
    color: var(--hfs-navy);
}

.odp-task-search-meta {
    color: var(--hfs-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.25rem 0.7rem;
    margin-top: 0.35rem;
}

.odp-task-search-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
}

.odp-related-email-list {
    display: grid;
    gap: 0.55rem;
}

.odp-related-email {
    align-items: center;
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
}

.odp-contact-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
    font-size: 0.82rem;
}

.odp-contact-legend span {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.odp-contact-dot {
    border-radius: 50%;
    display: inline-block;
    height: 0.7rem;
    width: 0.7rem;
}

.odp-contact-dot-received {
    background: #8b98a5;
}

.odp-contact-dot-system {
    background: var(--hfs-green);
}

.odp-contact-dot-agent {
    background: var(--hfs-navy);
}

.odp-contact-upcoming {
    background: #fbfdfb;
    border: 1px dashed #b9d8c3;
    border-radius: 8px;
    padding: 0.75rem;
}

.odp-contact-upcoming-list,
.odp-contact-feed {
    display: grid;
    gap: 0.65rem;
}

.odp-contact-upcoming-item {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.6rem 0.7rem;
}

.odp-contact-feed-row {
    display: flex;
}

.odp-contact-feed-row-received {
    justify-content: flex-start;
}

.odp-contact-feed-row-system,
.odp-contact-feed-row-agent {
    justify-content: flex-end;
}

.odp-contact-bubble {
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    max-width: min(42rem, 76%);
    overflow-wrap: anywhere;
    padding: 0.75rem;
}

.odp-contact-bubble-received {
    background: #fbfcfd;
    border-color: #d6dee6;
}

.odp-contact-bubble-system {
    background: rgba(14, 156, 74, 0.08);
    border-color: rgba(14, 156, 74, 0.24);
}

.odp-contact-bubble-agent {
    background: rgba(18, 49, 97, 0.08);
    border-color: rgba(18, 49, 97, 0.2);
}

.odp-contact-bubble-header,
.odp-contact-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.odp-contact-bubble-header {
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.odp-contact-marker {
    background: rgba(18, 49, 97, 0.08);
    border: 1px solid rgba(18, 49, 97, 0.12);
    border-radius: 999px;
    color: var(--hfs-navy);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.16rem 0.45rem;
}

.odp-contact-title {
    color: var(--hfs-navy);
}

.odp-contact-meta {
    margin-top: 0.55rem;
}

.odp-section-divider {
    border-top: 1px solid var(--hfs-border);
    margin: 0.9rem 0;
}

.odp-compact-facts {
    font-size: 0.86rem;
}

@media (max-width: 767.98px) {
    .odp-task-search-result {
        align-items: stretch;
        flex-direction: column;
    }

    .odp-task-search-actions {
        justify-content: flex-start;
    }

    .odp-related-email {
        align-items: stretch;
        flex-direction: column;
    }

    .odp-contact-upcoming-item {
        align-items: stretch;
        flex-direction: column;
    }

    .odp-contact-bubble {
        max-width: 100%;
    }
}

.odp-email-body-text {
    background: #fff;
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    color: var(--hfs-ink);
    box-sizing: border-box;
    max-height: 34rem;
    overflow: auto;
    overflow-wrap: anywhere;
    padding: 0.75rem;
    white-space: pre-wrap;
    width: auto;
    word-break: break-word;
}

.odp-recipient-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 2rem;
    align-items: center;
    padding: 0.25rem;
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    background: #fff;
}

.odp-recipient-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    padding: 0.18rem 0.45rem;
    border: 1px solid #b7c4d5;
    border-radius: 999px;
    background: #f6f9fc;
    color: var(--hfs-navy);
    font-size: 0.8rem;
    word-break: break-word;
}

.odp-recipient-chip-locked {
    border-color: var(--hfs-green);
    background: #edf9f2;
}

.odp-recipient-remove {
    border: 0;
    background: transparent;
    color: var(--hfs-muted);
    line-height: 1;
    padding: 0 0.1rem;
}

.odp-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.55rem 0;
}

.odp-reply-editor {
    min-height: 8rem;
    padding: 0.6rem;
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    background: #fff;
}

.odp-reply-editor:focus {
    outline: 2px solid rgba(14, 156, 74, 0.25);
    border-color: var(--hfs-green);
}

.odp-reply-modal-content {
    max-height: calc(100vh - 3rem);
}

.odp-reply-modal-body {
    overflow-y: auto;
}

.odp-email-template-lock,
.odp-original-trail {
    padding: 0.6rem;
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    background: var(--hfs-surface);
}

.odp-label {
    color: var(--hfs-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.odp-form-band {
    background: var(--hfs-surface);
    border: 1px solid var(--hfs-border);
    border-radius: 8px;
    padding: 0.75rem;
}

.odp-drop-zone {
    background: var(--hfs-surface);
    border: 1px dashed var(--hfs-border);
    border-radius: 8px;
    padding: 0.75rem;
}

.odp-drop-zone-active {
    border-color: var(--hfs-green);
    box-shadow: 0 0 0 0.2rem rgba(14, 156, 74, 0.12);
}

.odp-drop-zone .text-danger {
    font-weight: 600;
}

.btn-outline-primary {
    border-color: var(--hfs-green);
    color: var(--hfs-green);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--hfs-green);
    border-color: var(--hfs-green);
    color: #fff;
}

.btn-outline-danger {
    border-radius: 8px;
    font-weight: 700;
}
