:root {
    --fm-primary: #0f8f8a;
    --fm-primary-600: #087b78;
    --fm-primary-700: #066764;
    --fm-primary-soft: #e8f7f5;
    --fm-primary-softer: #f3fbfa;
    --fm-green-soft: #eaf8ef;
    --fm-amber-soft: #fff6df;
    --fm-blue-soft: #edf5ff;
    --fm-purple-soft: #f4efff;
    --fm-bg: #f7fafb;
    --fm-surface: #ffffff;
    --fm-surface-muted: #f3f6f7;
    --fm-border: #dfe8ea;
    --fm-border-strong: #c7d7da;
    --fm-text: #17252a;
    --fm-muted: #64747b;
    --fm-shadow: 0 14px 34px rgba(15, 46, 54, 0.07);
    --fm-shadow-soft: 0 8px 22px rgba(15, 46, 54, 0.05);
    --fm-radius: 18px;
    --fm-radius-sm: 12px;
}

html {
    background: var(--fm-bg);
}

body,
.fi-body,
.fi-layout {
    background:
        radial-gradient(circle at top right, rgba(15, 143, 138, 0.11), transparent 34rem),
        linear-gradient(180deg, #fbfefe 0%, var(--fm-bg) 24rem);
    color: var(--fm-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fi-main {
    background: transparent;
    min-width: 0;
    padding-top: 0 !important;
}

.fi-main-ctn {
    min-width: 0;
}

.fi-page {
    gap: 1.25rem;
}

.fi-header {
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0;
    padding-bottom: 0.5rem;
}

.fi-header-heading {
    color: var(--fm-text);
    font-size: clamp(1.55rem, 2vw, 2.15rem);
    font-weight: 800;
    letter-spacing: 0;
}

.fi-header-subheading {
    color: var(--fm-muted);
}

.fi-topbar {
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(199, 215, 218, 0.7);
    box-shadow: 0 10px 28px rgba(15, 46, 54, 0.04);
    backdrop-filter: blur(18px);
}

.fi-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f4fbfa 100%);
    border-right: 1px solid var(--fm-border);
    box-shadow: 8px 0 30px rgba(15, 46, 54, 0.06);
}

.fi-sidebar-header {
    background: transparent;
    border-bottom: 1px solid rgba(223, 232, 234, 0.76);
    box-shadow: none;
    min-height: 5rem;
}

.fi-sidebar-header .fi-logo,
.fi-sidebar-header a {
    color: var(--fm-text) !important;
}

.fi-sidebar-nav {
    padding: 1rem 0.85rem;
}

.fi-sidebar-group-label {
    color: #839198;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fi-sidebar-item a {
    border: 1px solid transparent;
    border-radius: 14px;
    color: #3b5158;
    font-weight: 700;
    margin: 0.2rem 0;
    min-height: 2.9rem;
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, color 150ms ease;
}

.fi-sidebar-item a:hover {
    background: var(--fm-primary-softer);
    border-color: #cbe9e7;
    color: var(--fm-primary-700);
    transform: translateX(2px);
}

.fi-sidebar-item.fi-active a {
    background: linear-gradient(135deg, #f0fbfa 0%, #dff5f3 100%);
    border-color: #b7dfdc;
    box-shadow: 0 9px 20px rgba(15, 143, 138, 0.12);
    color: var(--fm-primary-700);
}

.fi-sidebar-item svg,
.fi-sidebar-item-icon {
    color: currentColor;
}

.fi-sidebar-item-badge {
    background: var(--fm-primary);
    color: #ffffff;
}

.fi-btn {
    border-radius: 12px !important;
    font-weight: 800;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.fi-btn:hover {
    transform: translateY(-1px);
}

.fi-btn-color-primary,
.fi-ac-btn-action {
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-primary-600)) !important;
    box-shadow: 0 10px 20px rgba(15, 143, 138, 0.18);
}

.fi-btn-color-primary:hover,
.fi-btn-color-primary:focus,
.fi-btn-color-primary:active {
    background: linear-gradient(135deg, var(--fm-primary-600), var(--fm-primary-700)) !important;
}

.fi-section,
.fi-ta-ctn,
.fi-fo-component-ctn {
    border-color: var(--fm-border) !important;
    border-radius: var(--fm-radius) !important;
    box-shadow: var(--fm-shadow-soft) !important;
}

.fi-section {
    background: rgba(255, 255, 255, 0.96) !important;
}

.fi-section-header-heading,
.fi-ta-header-heading {
    color: var(--fm-text);
    font-weight: 800;
}

.fi-input-wrp,
.fi-select-input,
.fi-textarea,
.fi-fo-field-wrp input,
.fi-fo-field-wrp textarea,
.fi-fo-field-wrp select {
    border-radius: 12px !important;
}

.fi-input-wrp:focus-within {
    box-shadow: 0 0 0 3px rgba(15, 143, 138, 0.13) !important;
}

.fi-ta {
    min-width: 0;
}

.fi-ta-table {
    min-width: 100%;
}

.fi-ta-text,
.fi-ta-cell {
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}

.fi-ta-header,
.fi-ta-content,
.fi-ta-footer {
    background: #ffffff;
}

.fi-ta-row {
    transition: background-color 120ms ease;
}

.fi-ta-row:hover {
    background: var(--fm-primary-softer);
}

.fi-badge {
    border-radius: 999px;
    font-weight: 800;
}

.fi-dropdown-panel {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid var(--fm-border);
    border-radius: 16px !important;
    box-shadow: var(--fm-shadow);
    overflow: hidden;
}

.fi-user-menu .fi-avatar,
.fi-topbar .fi-avatar {
    border: 2px solid #ffffff;
    box-shadow: 0 8px 18px rgba(15, 46, 54, 0.13);
}

.fi-dropdown-list {
    padding: 0.45rem !important;
}

.fi-dropdown-list-item {
    border-radius: 12px !important;
    color: var(--fm-text) !important;
    font-weight: 800;
}

.fi-dropdown-list-item:hover,
.fi-dropdown-list-item:focus {
    background: var(--fm-primary-softer) !important;
    color: var(--fm-primary-700) !important;
}

.fi-dropdown-list-item-icon {
    color: var(--fm-primary-700) !important;
}

.fi-modal-window {
    border-radius: 20px !important;
    box-shadow: 0 24px 70px rgba(15, 46, 54, 0.18) !important;
}

.fi-pagination,
.fi-ta-filters {
    border-color: var(--fm-border);
}

.fi-loading-indicator {
    background: linear-gradient(90deg, var(--fm-primary), #62c8c1) !important;
}

.fi-no-notification,
.fi-ta-empty-state,
.fi-section-empty-state {
    color: var(--fm-muted);
}

.fi-notification {
    border: 1px solid var(--fm-border) !important;
    border-radius: 16px !important;
    box-shadow: var(--fm-shadow) !important;
}

.fi-notification-title {
    color: var(--fm-text);
    font-weight: 900;
}

.fi-notification-body {
    color: var(--fm-muted);
}

.fi-modal-heading {
    color: var(--fm-text);
    font-weight: 900;
}

.fi-modal-description {
    color: var(--fm-muted);
}

.fi-tabs {
    border-radius: 14px;
}

.fi-tabs-item-active {
    background: var(--fm-primary-soft) !important;
    color: var(--fm-primary-700) !important;
}

.fm-page-shell {
    display: grid;
    gap: 1.25rem;
    margin-top: -0.25rem;
}

.fm-dashboard-hero {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #eefaf8 100%);
    border: 1px solid var(--fm-border);
    border-radius: 24px;
    box-shadow: var(--fm-shadow);
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    padding: clamp(1.2rem, 2.5vw, 2rem);
}

.fm-eyebrow {
    color: var(--fm-primary-700);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.fm-dashboard-hero h1 {
    color: var(--fm-text);
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
    margin: 0;
}

.fm-dashboard-hero p {
    color: var(--fm-muted);
    margin: 0.65rem 0 0;
    max-width: 44rem;
}

.fm-hero-actions,
.fm-quick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.fm-grid {
    display: grid;
    gap: 1rem;
}

.fm-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fm-two-col {
    grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 0.85fr);
}

.fm-three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fm-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    box-shadow: var(--fm-shadow-soft);
    min-width: 0;
    overflow: hidden;
}

.fm-card-padded {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.fm-stat-card {
    display: flex;
    gap: 1rem;
    min-height: 8.5rem;
}

.fm-stat-icon {
    align-items: center;
    border-radius: 16px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 3.25rem;
    justify-content: center;
    width: 3.25rem;
}

.fm-stat-icon svg {
    height: 1.55rem;
    width: 1.55rem;
}

.fm-tone-teal { background: var(--fm-primary-soft); color: var(--fm-primary-700); }
.fm-tone-amber { background: var(--fm-amber-soft); color: #b36a00; }
.fm-tone-blue { background: var(--fm-blue-soft); color: #1766b1; }
.fm-tone-purple { background: var(--fm-purple-soft); color: #6741a5; }
.fm-tone-green { background: var(--fm-green-soft); color: #16814a; }

.fm-stat-label {
    color: var(--fm-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.fm-stat-value {
    color: var(--fm-text);
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 900;
    line-height: 1.08;
    margin-top: 0.3rem;
}

.fm-stat-delta {
    color: var(--fm-muted);
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.55rem;
}

.fm-card-header {
    align-items: center;
    border-bottom: 1px solid rgba(223, 232, 234, 0.75);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
}

.fm-card-title {
    color: var(--fm-text);
    font-size: 1rem;
    font-weight: 900;
}

.fm-card-subtitle {
    color: var(--fm-muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.fm-link {
    color: var(--fm-primary-700);
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
}

.fm-link:hover {
    color: var(--fm-primary);
}

.fm-button,
.fm-button-secondary {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 900;
    gap: 0.45rem;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0 1rem;
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
    white-space: nowrap;
}

.fm-button {
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-primary-600));
    box-shadow: 0 10px 20px rgba(15, 143, 138, 0.18);
    color: #ffffff !important;
}

.fm-button-secondary {
    background: #ffffff;
    border: 1px solid var(--fm-border-strong);
    color: var(--fm-primary-700) !important;
}

.fm-button:hover,
.fm-button-secondary:hover {
    transform: translateY(-1px);
}

.fm-chart-wrap {
    padding: 1rem 1.25rem 1.25rem;
}

.fm-chart {
    min-height: 17rem;
    width: 100%;
}

.fm-chart svg {
    display: block;
    height: 100%;
    min-height: 17rem;
    overflow: visible;
    width: 100%;
}

.fm-list {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.fm-list-row {
    align-items: center;
    background: #ffffff;
    border: 1px solid #edf2f3;
    border-radius: 14px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.85rem;
}

.fm-list-main {
    min-width: 0;
}

.fm-list-title {
    color: var(--fm-text);
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-list-meta {
    color: var(--fm-muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.fm-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 0.35rem 0.65rem;
    text-transform: capitalize;
    white-space: nowrap;
}

.fm-pill-pending { background: var(--fm-amber-soft); color: #a96000; }
.fm-pill-accepted,
.fm-pill-completed,
.fm-pill-active,
.fm-pill-paid { background: var(--fm-green-soft); color: #137342; }
.fm-pill-cancelled,
.fm-pill-declined,
.fm-pill-failed,
.fm-pill-rejected { background: #fff0ef; color: #b42318; }
.fm-pill-neutral { background: var(--fm-primary-soft); color: var(--fm-primary-700); }

.fm-progress-track {
    background: #e8eff1;
    border-radius: 999px;
    height: 0.75rem;
    overflow: hidden;
}

.fm-progress-bar {
    background: linear-gradient(90deg, var(--fm-primary), #54c4bb);
    border-radius: inherit;
    height: 100%;
}

.fm-check-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.fm-check-item {
    align-items: center;
    color: #33454b;
    display: flex;
    gap: 0.65rem;
    min-width: 0;
}

.fm-check-dot {
    align-items: center;
    border: 1px solid #c9d7da;
    border-radius: 999px;
    color: transparent;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.7rem;
    height: 1.05rem;
    justify-content: center;
    width: 1.05rem;
}

.fm-check-dot-done {
    background: #18a267;
    border-color: #18a267;
    color: #ffffff;
}

.fm-empty {
    color: var(--fm-muted);
    padding: 1.5rem;
    text-align: center;
}

.fm-package-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fm-package-price {
    color: var(--fm-text);
    font-size: 2rem;
    font-weight: 900;
}

.fm-billing-current {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1rem;
}

.fm-billing-meta {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.25rem;
}

.fm-billing-meta div {
    background: var(--fm-primary-softer);
    border: 1px solid #d3ecea;
    border-radius: 14px;
    padding: 0.85rem;
}

.fm-billing-meta span {
    color: var(--fm-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
}

.fm-billing-meta strong {
    color: var(--fm-text);
    display: block;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.fm-upgrade-note {
    background: var(--fm-amber-soft);
    border: 1px solid #f5d994;
    border-radius: 14px;
    color: #8a5400;
    font-weight: 800;
    margin-top: 1rem;
    padding: 0.85rem;
}

.fm-pricing-card {
    position: relative;
}

.fm-pricing-card-featured {
    border-color: #8ed7d2;
    box-shadow: 0 20px 46px rgba(15, 143, 138, 0.12);
}

.fm-pricing-card-current {
    outline: 3px solid rgba(15, 143, 138, 0.18);
}

.fm-pricing-topline {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: space-between;
}

.fm-plan-diff {
    background: #fbfdfd;
    border: 1px solid var(--fm-border);
    border-radius: 14px;
    color: var(--fm-muted);
    display: grid;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 0.35rem;
    margin-top: 1rem;
    padding: 0.85rem;
}

.fm-plan-diff strong {
    color: var(--fm-text);
}

.fm-responsive-table {
    overflow-x: auto;
    width: 100%;
}

.fm-comparison-table {
    border-collapse: collapse;
    min-width: 48rem;
    width: 100%;
}

.fm-comparison-table th,
.fm-comparison-table td {
    border-bottom: 1px solid var(--fm-border);
    color: var(--fm-text);
    padding: 0.95rem 1rem;
    text-align: left;
    vertical-align: top;
}

.fm-comparison-table th {
    background: var(--fm-primary-softer);
    color: var(--fm-primary-700);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fm-comparison-table td {
    color: #40545b;
    font-size: 0.88rem;
    font-weight: 700;
}

.fm-profile-hero {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #eefaf8 100%);
    border: 1px solid var(--fm-border);
    border-radius: 24px;
    box-shadow: var(--fm-shadow);
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    padding: clamp(1.2rem, 2.5vw, 2rem);
}

.fm-profile-identity {
    align-items: center;
    display: flex;
    gap: 1rem;
    min-width: 0;
}

.fm-profile-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--fm-primary), #6fcac1);
    border: 5px solid #ffffff;
    border-radius: 999px;
    box-shadow: var(--fm-shadow);
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.45rem;
    font-weight: 900;
    height: 5rem;
    justify-content: center;
    overflow: hidden;
    width: 5rem;
}

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

.fm-profile-hero h1 {
    color: var(--fm-text);
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0;
}

.fm-profile-hero p,
.fm-profile-copy {
    color: var(--fm-muted);
    margin: 0.45rem 0 0;
}

.fm-profile-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
}

.fm-profile-heading {
    color: var(--fm-text);
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

.fm-form-stack {
    margin-top: 1.25rem;
}

.fm-profile-actions {
    border-top: 1px solid var(--fm-border);
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

.fm-profile-links {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.fm-profile-links a {
    background: #ffffff;
    border: 1px solid var(--fm-border);
    border-radius: 14px;
    color: var(--fm-text);
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem;
    text-decoration: none;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.fm-profile-links a:hover {
    background: var(--fm-primary-softer);
    border-color: #b7dfdc;
    box-shadow: var(--fm-shadow-soft);
    transform: translateY(-1px);
}

.fm-profile-links span {
    color: var(--fm-primary-700);
    font-weight: 900;
}

.fm-profile-links small {
    color: var(--fm-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

@media (max-width: 1280px) {
    .fm-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fm-two-col,
    .fm-three-col,
    .fm-package-grid,
    .fm-profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .fi-main {
        padding-inline: 0.75rem !important;
    }

    .fm-dashboard-hero,
    .fm-profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .fm-profile-identity {
        align-items: flex-start;
    }

    .fm-stat-grid {
        grid-template-columns: 1fr;
    }

    .fm-list-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .fm-billing-meta {
        grid-template-columns: 1fr;
    }

    .fm-button,
    .fm-button-secondary {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .fi-ta-content {
        overflow-x: hidden;
    }

    .fi-ta-table {
        width: 100%;
    }
}
