﻿:root {
    --tc-green-50: #f1faf2;
    --tc-green-100: #e3f6e5;
    --tc-green-200: #c4eac8;
    --tc-green-300: #91d899;
    --tc-green-400: #4fc65a;
    --tc-green-500: #25a934;
    --tc-green-600: #188525;
    --tc-green-700: #12681d;
    --tc-green-800: #0d5117;
    --tc-green-900: #083d10;
    --tc-blue: #2563eb;
    --tc-blue-soft: #eff6ff;
    --tc-orange: #c56a08;
    --tc-orange-soft: #fff7ed;
    --tc-red: #c43d3d;
    --tc-red-soft: #fff1f1;
    --tc-purple: #7048c5;
    --tc-purple-soft: #f5f1ff;
    --tc-text: #172019;
    --tc-text-soft: #39463c;
    --tc-muted: #6d786f;
    --tc-border: #e1e9e2;
    --tc-border-strong: #d3dfd5;
    --tc-background: #f5f8f5;
    --tc-white: #ffffff;
    --tc-shadow-sm: 0 8px 24px rgba(21, 56, 27, 0.05);
    --tc-shadow-md: 0 16px 42px rgba(21, 56, 27, 0.08);
    --tc-shadow-lg: 0 25px 60px rgba(15, 61, 23, 0.12);
}

/* PAGE */

.tc-finance-page {
    min-height: calc(100vh - 90px);
    padding: 44px 0 72px;
    background: radial-gradient( circle at top right, rgba(74, 202, 83, 0.1), transparent 30% ), linear-gradient( 180deg, #fbfdfb 0%, var(--tc-background) 100% );
}

    .tc-finance-page .auto-container {
        width: 100%;
        max-width: 1440px;
        margin: 0 auto;
        padding: 0 28px;
    }

/* PAGE HEADER */

.tc-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 25px;
    padding: 32px 36px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(24, 133, 37, 0.14);
    border-radius: 25px;
    background: linear-gradient( 120deg, rgba(255, 255, 255, 0.99), rgba(236, 249, 237, 0.97) );
    box-shadow: var(--tc-shadow-md);
}

    .tc-page-header::after {
        content: "";
        width: 260px;
        height: 260px;
        position: absolute;
        top: -155px;
        right: -80px;
        border-radius: 50%;
        background: rgba(65, 199, 73, 0.09);
        pointer-events: none;
    }

.tc-page-header-content {
    max-width: 780px;
    position: relative;
    z-index: 1;
}

.tc-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: var(--tc-green-600);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

    .tc-page-eyebrow::before {
        content: "";
        width: 25px;
        height: 3px;
        border-radius: 99px;
        background: var(--tc-green-600);
    }

.tc-page-header h1 {
    margin: 0;
    color: var(--tc-text);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.tc-page-header p {
    max-width: 720px;
    margin: 13px 0 0;
    color: var(--tc-muted);
    font-size: 0.96rem;
    line-height: 1.75;
}

.tc-header-icon,
.tc-header-stat {
    width: 130px;
    min-height: 108px;
    flex: 0 0 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    z-index: 1;
    border-radius: 21px;
    color: #ffffff;
    background: linear-gradient( 145deg, var(--tc-green-400), var(--tc-green-800) );
    box-shadow: 0 17px 35px rgba(17, 116, 29, 0.23);
}

    .tc-header-icon svg {
        width: 46px;
        height: 46px;
    }

    .tc-header-stat span {
        margin-bottom: 5px;
        font-size: 0.66rem;
        font-weight: 750;
        letter-spacing: 0.07em;
        text-align: center;
        text-transform: uppercase;
        opacity: 0.9;
    }

    .tc-header-stat strong {
        font-size: 2.45rem;
        font-weight: 850;
        line-height: 1;
    }

/* ALERTS */

.tc-alert {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 20px;
    padding: 15px 17px;
    border: 1px solid #b9dfbd;
    border-radius: 15px;
    color: var(--tc-green-800);
    background: var(--tc-green-50);
    box-shadow: var(--tc-shadow-sm);
}

    .tc-alert:empty {
        display: none;
    }

    .tc-alert svg {
        width: 21px;
        height: 21px;
        flex: 0 0 21px;
        margin-top: 1px;
    }

.tc-alert-danger {
    border-color: #efc3c3;
    color: var(--tc-red);
    background: var(--tc-red-soft);
}

/* TOOLBAR */

.tc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid var(--tc-border);
    border-radius: 18px;
    background: var(--tc-white);
    box-shadow: var(--tc-shadow-sm);
}

.tc-toolbar-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.tc-toolbar-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--tc-green-600);
    background: var(--tc-green-50);
}

    .tc-toolbar-icon svg {
        width: 23px;
        height: 23px;
    }

.tc-toolbar-title h2 {
    margin: 0;
    color: var(--tc-text);
    font-size: 1.05rem;
    font-weight: 800;
}

.tc-toolbar-title p {
    margin: 3px 0 0;
    color: var(--tc-muted);
    font-size: 0.79rem;
}

.tc-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* SEARCH */

.tc-search {
    width: min(100%, 320px);
    min-height: 45px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--tc-border-strong);
    border-radius: 12px;
    background: #fafcfa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .tc-search:focus-within {
        border-color: rgba(24, 133, 37, 0.55);
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(24, 133, 37, 0.09);
    }

    .tc-search svg {
        width: 19px;
        height: 19px;
        flex: 0 0 19px;
        color: #849087;
    }

    .tc-search input {
        width: 100%;
        height: 43px;
        padding: 0;
        border: none;
        outline: none;
        color: var(--tc-text);
        background: transparent;
        font-size: 0.86rem;
    }

/* BUTTONS */

.tc-btn {
    min-height: 43px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px !important;
    border: 1px solid transparent !important;
    border-radius: 11px !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: #ffffff !important;
    font-size: 0.79rem !important;
    font-weight: 780 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

    .tc-btn:hover {
        transform: translateY(-2px);
        color: #ffffff !important;
        text-decoration: none !important;
        filter: brightness(1.04);
    }

    .tc-btn:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(24, 133, 37, 0.14);
    }

    .tc-btn svg,
    .tc-btn i {
        width: 17px;
        height: 17px;
        flex: 0 0 17px;
    }

.tc-btn-primary {
    border-color: var(--tc-green-700) !important;
    background: linear-gradient( 135deg, var(--tc-green-500), var(--tc-green-800) ) !important;
    box-shadow: 0 9px 20px rgba(18, 104, 29, 0.22);
}

.tc-btn-dark {
    border-color: #324139 !important;
    background: linear-gradient( 135deg, #5d6a61, #29352d ) !important;
    box-shadow: 0 9px 20px rgba(40, 53, 44, 0.18);
}

.tc-btn-blue {
    border-color: #1e56c8 !important;
    background: linear-gradient( 135deg, #4381f5, #1d4ed8 ) !important;
    box-shadow: 0 9px 20px rgba(37, 99, 235, 0.2);
}

.tc-btn-orange {
    border-color: #ad5a05 !important;
    background: linear-gradient( 135deg, #e69532, #a95204 ) !important;
    box-shadow: 0 9px 20px rgba(185, 94, 8, 0.2);
}

.tc-btn-purple {
    border-color: #5c36a8 !important;
    background: linear-gradient( 135deg, #8b67df, #5932a2 ) !important;
    box-shadow: 0 9px 20px rgba(100, 60, 179, 0.2);
}

.tc-btn-outline {
    border-color: #bcd9bf !important;
    color: var(--tc-green-800) !important;
    background: var(--tc-green-50) !important;
}

    .tc-btn-outline:hover {
        color: var(--tc-green-800) !important;
        background: var(--tc-green-100) !important;
    }

/* TABLE */

.tc-table-card {
    overflow: hidden;
    border: 1px solid var(--tc-border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--tc-shadow-md);
}

.tc-table-scroll {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #b9cabb #eef3ee;
}

.tc-data-table {
    width: 100%;
    min-width: 1050px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--tc-text);
}

    .tc-data-table thead th {
        padding: 17px 16px;
        border: none;
        border-bottom: 1px solid #dce6dd;
        color: #5e6b61;
        background: #f5f9f5;
        font-size: 0.7rem;
        font-weight: 820;
        letter-spacing: 0.055em;
        text-align: left;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .tc-data-table tbody td {
        padding: 18px 16px;
        vertical-align: middle;
        border: none;
        border-bottom: 1px solid #edf1ed;
        color: var(--tc-text-soft);
        background: #ffffff;
        font-size: 0.85rem;
    }

    .tc-data-table tbody tr:last-child td {
        border-bottom: none;
    }

    .tc-data-table tbody tr:hover td {
        background: #fbfdfb;
    }

    .tc-data-table th:first-child,
    .tc-data-table td:first-child {
        padding-left: 22px;
    }

    .tc-data-table th:last-child,
    .tc-data-table td:last-child {
        padding-right: 22px;
    }

.tc-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    border-top: 1px solid var(--tc-border);
    color: var(--tc-muted);
    background: #fafcfa;
    font-size: 0.76rem;
}

    .tc-table-footer strong {
        color: var(--tc-text);
    }

/* CELLS */

.tc-id-badge,
.tc-operation-badge,
.tc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 770;
    white-space: nowrap;
}

.tc-id-badge {
    border: 1px solid #d1e5d3;
    color: var(--tc-green-800);
    background: var(--tc-green-50);
}

.tc-money {
    color: var(--tc-green-800);
    font-size: 0.92rem;
    font-weight: 850;
    white-space: nowrap;
}

.tc-profit {
    color: var(--tc-blue);
}

.tc-total {
    color: var(--tc-green-700);
    font-size: 0.98rem;
}

.tc-date {
    color: var(--tc-muted);
    white-space: nowrap;
}

.tc-subscriber {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.tc-avatar {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--tc-green-800);
    background: var(--tc-green-100);
    font-weight: 850;
}

.tc-subscriber strong {
    display: block;
    color: var(--tc-text);
    font-size: 0.86rem;
}

.tc-operation-badge {
    border: 1px solid #cbdaf8;
    color: var(--tc-blue);
    background: var(--tc-blue-soft);
}

.tc-operation-withdrawal {
    border-color: #f0cba4;
    color: var(--tc-orange);
    background: var(--tc-orange-soft);
}

.tc-operation-reinvest {
    border-color: #c9dff8;
    color: var(--tc-blue);
    background: var(--tc-blue-soft);
}

/* ACTIONS */

.tc-actions-cell {
    min-width: 340px;
}

.tc-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* FORM PAGE */

.tc-form-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: 25px;
    align-items: start;
}

.tc-information-card,
.tc-form-card {
    border: 1px solid var(--tc-border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--tc-shadow-md);
}

.tc-information-card {
    padding: 27px;
}

.tc-form-card {
    padding: 30px;
}

.tc-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 24px;
    padding-bottom: 21px;
    border-bottom: 1px solid var(--tc-border);
}

.tc-card-heading-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--tc-green-600);
    background: var(--tc-green-50);
}

    .tc-card-heading-icon svg {
        width: 23px;
        height: 23px;
    }

.tc-card-heading h2 {
    margin: 0;
    color: var(--tc-text);
    font-size: 1.14rem;
    font-weight: 820;
}

.tc-card-heading p {
    margin: 4px 0 0;
    color: var(--tc-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.tc-note-list {
    display: grid;
    gap: 16px;
}

.tc-note-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tc-note-number {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--tc-green-800);
    background: var(--tc-green-100);
    font-size: 0.78rem;
    font-weight: 850;
}

.tc-note-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--tc-text);
    font-size: 0.86rem;
}

.tc-note-item p {
    margin: 0;
    color: var(--tc-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.tc-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #efcfa8;
    border-radius: 14px;
    color: #8d510a;
    background: var(--tc-orange-soft);
    font-size: 0.8rem;
    line-height: 1.55;
}

    .tc-warning-box svg {
        width: 21px;
        height: 21px;
        flex: 0 0 21px;
    }

.tc-form-group {
    margin-bottom: 19px;
}

.tc-form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--tc-text-soft);
    font-size: 0.79rem;
    font-weight: 780;
}

.tc-form-control {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--tc-border-strong);
    border-radius: 12px;
    outline: none;
    color: var(--tc-text);
    background: #ffffff;
    font-size: 0.88rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .tc-form-control:focus {
        border-color: rgba(24, 133, 37, 0.6);
        box-shadow: 0 0 0 4px rgba(24, 133, 37, 0.09);
    }

    .tc-form-control[readonly] {
        color: var(--tc-green-800);
        background: var(--tc-green-50);
        font-weight: 800;
    }

.tc-input-wrapper {
    position: relative;
}

.tc-input-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    color: var(--tc-muted);
    font-weight: 750;
    transform: translateY(-50%);
    pointer-events: none;
}

.tc-input-wrapper .tc-form-control {
    padding-left: 31px;
}

.tc-form-help {
    display: block;
    margin-top: 7px;
    color: var(--tc-muted);
    font-size: 0.73rem;
    line-height: 1.45;
}

.tc-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding-top: 21px;
    border-top: 1px solid var(--tc-border);
}

/* BALANCE CARDS */

.tc-balance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 23px;
}

.tc-balance-card {
    padding: 18px;
    border: 1px solid var(--tc-border);
    border-radius: 16px;
    background: #fafcfa;
}

    .tc-balance-card span {
        display: block;
        margin-bottom: 7px;
        color: var(--tc-muted);
        font-size: 0.73rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .tc-balance-card strong {
        color: var(--tc-green-800);
        font-size: 1.35rem;
        font-weight: 850;
    }

/* EMPTY STATE */

.tc-empty-state {
    padding: 65px 25px;
    border: 1px solid var(--tc-border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--tc-shadow-md);
    text-align: center;
}

.tc-empty-state-icon {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    margin: 0 auto 17px;
    border-radius: 21px;
    color: var(--tc-green-600);
    background: var(--tc-green-50);
}

    .tc-empty-state-icon svg {
        width: 35px;
        height: 35px;
    }

.tc-empty-state h2 {
    margin: 0 0 8px;
    color: var(--tc-text);
    font-size: 1.25rem;
    font-weight: 820;
}

.tc-empty-state p {
    max-width: 480px;
    margin: 0 auto;
    color: var(--tc-muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

/* RESPONSIVE */

@media (max-width: 991px) {
    .tc-form-layout {
        grid-template-columns: 1fr;
    }

    .tc-information-card {
        order: 2;
    }

    .tc-form-card {
        order: 1;
    }

    .tc-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .tc-toolbar-actions,
    .tc-search {
        width: 100%;
    }

    .tc-search {
        max-width: none;
    }
}

@media (max-width: 767px) {
    .tc-finance-page {
        padding: 24px 0 50px;
    }

        .tc-finance-page .auto-container {
            padding: 0 15px;
        }

    .tc-page-header {
        align-items: flex-start;
        padding: 24px 21px;
        border-radius: 20px;
    }

    .tc-header-icon,
    .tc-header-stat {
        width: 95px;
        min-height: 90px;
        flex-basis: 95px;
        border-radius: 17px;
    }

        .tc-header-icon svg {
            width: 36px;
            height: 36px;
        }

        .tc-header-stat strong {
            font-size: 2rem;
        }

    .tc-form-card,
    .tc-information-card {
        padding: 22px;
        border-radius: 19px;
    }

    .tc-balance-grid {
        grid-template-columns: 1fr;
    }

    .tc-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .tc-page-header {
        display: block;
    }

    .tc-header-icon,
    .tc-header-stat {
        width: 100%;
        min-height: 70px;
        margin-top: 21px;
        flex-direction: row;
        gap: 12px;
    }

    .tc-data-table {
        min-width: 0;
    }

        .tc-data-table thead {
            display: none;
        }

        .tc-data-table,
        .tc-data-table tbody,
        .tc-data-table tr,
        .tc-data-table td {
            width: 100%;
            display: block;
        }

            .tc-data-table tbody tr {
                padding: 17px;
                border-bottom: 10px solid var(--tc-background);
            }

                .tc-data-table tbody tr:last-child {
                    border-bottom: none;
                }

            .tc-data-table tbody td,
            .tc-data-table tbody td:first-child,
            .tc-data-table tbody td:last-child {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 18px;
                padding: 11px 0;
                border-bottom: 1px solid var(--tc-border);
                background: transparent !important;
                text-align: right;
            }

                .tc-data-table tbody td::before {
                    content: attr(data-label);
                    flex: 0 0 42%;
                    color: var(--tc-muted);
                    font-size: 0.69rem;
                    font-weight: 820;
                    letter-spacing: 0.04em;
                    text-align: left;
                    text-transform: uppercase;
                }

    .tc-actions-cell {
        min-width: 0;
        display: block !important;
        padding-top: 17px !important;
        border-bottom: none !important;
    }

        .tc-actions-cell::before {
            display: block;
            margin-bottom: 10px;
        }

    .tc-action-group {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .tc-btn {
        width: 100%;
        min-height: 46px;
    }

    .tc-form-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

@media print {
    .tc-page-header,
    .tc-toolbar-actions,
    .tc-search,
    .tc-actions-cell,
    .tc-form-actions {
        display: none !important;
    }

    .tc-finance-page {
        padding: 0;
        background: #ffffff;
    }

    .tc-table-card {
        border: none;
        box-shadow: none;
    }
}
