:root {
    --ehc-navy: #103b4a;
    --ehc-navy-deep: #0a2b36;
    --ehc-teal: #0f8f8d;
    --ehc-teal-light: #79d6d5;
    --ehc-bg: #f2f6f8;
    --ehc-border: #d8e3e8;
    --ehc-text: #17323f;
    --ehc-muted: #6b7f89;
    --ehc-red: #c74444;
    --ehc-red-bg: #fff0f0;
    --ehc-yellow: #9a6b00;
    --ehc-yellow-bg: #fff7d9;
    --ehc-green: #27794d;
    --ehc-green-bg: #eaf8f0;
}

.ehc-eto-portal,
.ehc-eto-portal * {
    box-sizing: border-box;
}

.ehc-eto-portal {
    width: min(100%, 980px);
    margin: 30px auto;
    padding: 0 16px 40px;
    color: var(--ehc-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ehc-eto-portal-wide {
    width: min(100%, 1380px);
}

.ehc-eto-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.ehc-eto-brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--ehc-navy), #155c6e);
    color: #fff;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 9px 24px rgba(16, 59, 74, .2);
}

.ehc-eto-brand strong,
.ehc-eto-brand span {
    display: block;
}

.ehc-eto-brand strong {
    font-size: 18px;
    color: var(--ehc-navy);
}

.ehc-eto-brand span {
    color: var(--ehc-muted);
    font-size: 13px;
    margin-top: 2px;
}

.ehc-eto-card {
    background: #fff;
    border: 1px solid var(--ehc-border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 14px 38px rgba(19, 56, 72, .08);
}

.ehc-eto-card-wide {
    max-width: 820px;
    margin: 0 auto;
}

.ehc-eto-card-muted {
    background: #f7fafb;
}

.ehc-eto-card-heading {
    margin-bottom: 22px;
}

.ehc-eto-card-heading h2,
.ehc-eto-dashboard-header h2 {
    color: var(--ehc-navy);
    margin: 4px 0 8px;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.15;
}

.ehc-eto-card-heading p,
.ehc-eto-dashboard-header p {
    margin: 0;
    color: var(--ehc-muted);
    line-height: 1.6;
}

.ehc-eto-eyebrow {
    display: inline-block;
    color: var(--ehc-teal);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.ehc-eto-auth-layout,
.ehc-eto-grid-2,
.ehc-eto-dashboard-grid,
.ehc-eto-stat-grid {
    display: grid;
    gap: 20px;
}

.ehc-eto-auth-layout,
.ehc-eto-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ehc-eto-dashboard-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
    align-items: start;
}

.ehc-eto-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 20px 0;
}

.ehc-eto-form {
    display: grid;
    gap: 17px;
}

.ehc-eto-field label,
.ehc-eto-form > label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 750;
    color: var(--ehc-navy);
}

.ehc-eto-field input,
.ehc-eto-field select,
.ehc-eto-field textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #bfd0d8;
    border-radius: 10px;
    padding: 11px 13px;
    background: #fff;
    color: var(--ehc-text);
    font: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.ehc-eto-field textarea {
    resize: vertical;
}

.ehc-eto-field input:focus,
.ehc-eto-field select:focus,
.ehc-eto-field textarea:focus {
    outline: none;
    border-color: var(--ehc-teal);
    box-shadow: 0 0 0 3px rgba(15, 143, 141, .14);
}

.ehc-eto-field small,
.ehc-eto-password-note {
    display: block;
    margin: 6px 0 0;
    color: var(--ehc-muted);
    font-size: 12px;
    line-height: 1.5;
}

.ehc-eto-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 500 !important;
}

.ehc-eto-checkbox input {
    width: 17px;
    height: 17px;
}

.ehc-eto-button,
.ehc-eto-text-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.ehc-eto-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 11px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ehc-teal), #087875);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 143, 141, .2);
    transition: transform .15s, box-shadow .15s;
}

.ehc-eto-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(15, 143, 141, .27);
}

.ehc-eto-button-full {
    width: 100%;
}

.ehc-eto-button-secondary {
    background: var(--ehc-navy);
}

.ehc-eto-button-ghost {
    background: #fff;
    color: var(--ehc-navy) !important;
    border: 1px solid var(--ehc-border);
    box-shadow: none;
}

.ehc-eto-card-footer,
.ehc-eto-centered-link {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e5ecef;
    text-align: center;
    color: var(--ehc-muted);
    font-size: 13px;
    line-height: 1.8;
}

.ehc-eto-card a,
.ehc-eto-centered-link a {
    color: var(--ehc-teal);
    font-weight: 700;
}

.ehc-eto-alert {
    padding: 14px 16px;
    margin: 0 0 20px;
    border-radius: 11px;
    border: 1px solid;
    font-weight: 650;
    line-height: 1.5;
}

.ehc-eto-alert-success {
    color: #17643d;
    background: #eaf8f0;
    border-color: #a9dfbd;
}

.ehc-eto-alert-error {
    color: #952f2f;
    background: #fff0f0;
    border-color: #efb8b8;
}

.ehc-eto-alert-info {
    color: #25586b;
    background: #edf7fa;
    border-color: #b9dde8;
}

.ehc-eto-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 25px 28px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--ehc-navy), #155d6e);
    color: #fff;
    box-shadow: 0 14px 35px rgba(16, 59, 74, .18);
}

.ehc-eto-dashboard-header h2,
.ehc-eto-dashboard-header p,
.ehc-eto-dashboard-header .ehc-eto-eyebrow {
    color: #fff;
}

.ehc-eto-dashboard-header .ehc-eto-eyebrow {
    opacity: .7;
}

.ehc-eto-stat {
    min-height: 125px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid var(--ehc-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(19, 56, 72, .06);
}

.ehc-eto-stat span {
    color: var(--ehc-muted);
    font-size: 13px;
    font-weight: 700;
}

.ehc-eto-stat strong {
    color: var(--ehc-navy);
    font-size: 38px;
    line-height: 1;
}

.ehc-eto-notice-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.ehc-eto-notice-legend span {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.notice-red {
    color: var(--ehc-red) !important;
    background: var(--ehc-red-bg) !important;
    border-color: #efb7b7 !important;
}

.notice-yellow {
    color: var(--ehc-yellow) !important;
    background: var(--ehc-yellow-bg) !important;
    border-color: #ead48d !important;
}

.notice-green {
    color: var(--ehc-green) !important;
    background: var(--ehc-green-bg) !important;
    border-color: #aadebd !important;
}

.ehc-eto-calendar {
    border: 1px solid var(--ehc-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.ehc-eto-calendar-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f5f9fa;
    border-bottom: 1px solid var(--ehc-border);
    text-align: center;
    color: var(--ehc-navy);
}

.ehc-eto-calendar-nav {
    min-height: 36px;
    border: 1px solid var(--ehc-border);
    border-radius: 9px;
    background: #fff;
    color: var(--ehc-navy);
    cursor: pointer;
    font-weight: 900;
}

.ehc-eto-calendar-nav:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.ehc-eto-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    padding: 10px;
}

.ehc-eto-calendar-weekday {
    padding: 4px 0 7px;
    color: var(--ehc-muted);
    text-align: center;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.ehc-eto-calendar-day,
.ehc-eto-calendar-spacer {
    aspect-ratio: 1;
}

.ehc-eto-calendar-day {
    min-width: 0;
    border: 1px solid;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    transition: transform .12s, box-shadow .12s;
}

.ehc-eto-calendar-day:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(18, 54, 70, .12);
}

.ehc-eto-calendar-day.is-selected {
    outline: 3px solid var(--ehc-navy);
    outline-offset: -2px;
    box-shadow: 0 0 0 2px #fff inset;
}

.ehc-eto-calendar-day.is-past {
    color: #a7b2b8;
    background: #f1f3f4;
    border-color: #e1e5e7;
    cursor: not-allowed;
}

.ehc-eto-selected-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 42px;
}

.ehc-eto-empty-selection {
    width: 100%;
    padding: 11px;
    border: 1px dashed #bdccd3;
    border-radius: 9px;
    color: var(--ehc-muted);
    text-align: center;
    font-size: 12px;
}

.ehc-eto-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid;
    border-radius: 999px;
    padding: 7px 10px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}

.ehc-eto-date-chip b {
    font-size: 16px;
    line-height: 1;
}

.ehc-eto-history-list {
    display: grid;
    gap: 12px;
    max-height: 780px;
    overflow: auto;
    padding-right: 4px;
}

.ehc-eto-history-item {
    padding: 16px;
    border: 1px solid var(--ehc-border);
    border-radius: 13px;
    background: #fbfdfd;
}

.ehc-eto-history-main > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.ehc-eto-history-main time {
    color: var(--ehc-navy);
    font-weight: 850;
}

.ehc-eto-history-main p {
    margin: 10px 0;
    color: #4f6671;
    font-size: 13px;
    line-height: 1.55;
}

.ehc-eto-badge {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.status-pending {
    color: #835a00;
    background: #fff5cf;
}

.status-approved {
    color: #17643d;
    background: #dcf4e6;
}

.status-denied {
    color: #922e2e;
    background: #ffe2e2;
}

.status-withdrawn,
.status-canceled {
    color: #64757d;
    background: #e9eef0;
}

.status-cancellation_pending {
    color: #764ca1;
    background: #f0e4fb;
}

.ehc-eto-response {
    margin-top: 9px;
    padding: 10px;
    border-left: 3px solid var(--ehc-teal);
    background: #edf7f7;
    color: #36545f;
    font-size: 12px;
    line-height: 1.5;
}

.ehc-eto-history-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5ecef;
}

.ehc-eto-text-button {
    padding: 0;
    background: transparent;
    color: var(--ehc-teal);
    font-size: 12px;
    font-weight: 800;
}

.ehc-eto-empty-state {
    display: grid;
    gap: 6px;
    padding: 35px 20px;
    border: 1px dashed #bdccd3;
    border-radius: 12px;
    text-align: center;
    color: var(--ehc-muted);
}

.ehc-eto-empty-state strong {
    color: var(--ehc-navy);
    font-size: 18px;
}

@media (max-width: 980px) {
    .ehc-eto-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .ehc-eto-history-list {
        max-height: none;
    }
}

@media (max-width: 720px) {
    .ehc-eto-auth-layout,
    .ehc-eto-grid-2,
    .ehc-eto-stat-grid {
        grid-template-columns: 1fr;
    }

    .ehc-eto-card {
        padding: 21px;
        border-radius: 15px;
    }

    .ehc-eto-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ehc-eto-dashboard-header .ehc-eto-button {
        width: 100%;
    }

    .ehc-eto-stat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .ehc-eto-stat {
        min-height: 100px;
        padding: 13px;
    }

    .ehc-eto-stat span {
        font-size: 10px;
    }

    .ehc-eto-stat strong {
        font-size: 29px;
    }

    .ehc-eto-calendar-grid {
        gap: 3px;
        padding: 7px;
    }

    .ehc-eto-calendar-day {
        border-radius: 7px;
        font-size: 11px;
    }
}

.ehc-eto-calendar-day.is-blocked {
    color: #5e6b72 !important;
    background: #e8eef1 !important;
    border-color: #c8d3d8 !important;
    cursor: not-allowed;
    opacity: .82;
}

.ehc-eto-calendar-day.is-blocked.status-approved {
    color: #17643d !important;
    background: #dcf4e6 !important;
    border-color: #a9dfbd !important;
}

.ehc-eto-calendar-day.is-blocked.status-pending {
    color: #835a00 !important;
    background: #fff5cf !important;
    border-color: #ead48d !important;
}

.ehc-eto-calendar-day.is-blocked.status-cancellation_pending {
    color: #764ca1 !important;
    background: #f0e4fb !important;
    border-color: #d5b9ed !important;
}
