/* ==============
   LAYOUT SHELL
   ============== */

.tfc-main-shell {
    background-color: var(--tfc-bg);
    min-height: 100vh;
}

/* ==============
   SIDEBAR (icon + text, collapsible)
   ============== */

.tfc-sidebar {
    width: 240px;
    min-height: 100vh;
    padding: 1rem 0.75rem;
    transition: width 0.2s ease;
    background: linear-gradient(180deg, color-mix(in srgb, var(--tfc-primary-soft) 60%, transparent), var(--tfc-bg) );
    border-right: 1px solid var(--tfc-border);
    color: var(--tfc-text);
}

.tfc-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.tfc-sidebar__brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--tfc-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--tfc-primary);
}

.tfc-sidebar__brand-text {
    font-weight: 600;
    font-size: 1.02rem;
}

.tfc-sidebar__section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tfc-text-muted);
    margin: 0.75rem 0 0.25rem;
}

/* links as icon + text row */
.tfc-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.35rem 0.75rem;
    color: var(--tfc-text);
    font-size: 0.9rem;
}

    .tfc-sidebar .nav-link:hover {
        background-color: color-mix(in srgb, var(--tfc-primary-soft) 60%, transparent);
    }

    .tfc-sidebar .nav-link.active {
        background-color: var(--tfc-primary) !important;
        color: #fff !important;
    }

.tfc-sidebar__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tfc-sidebar__text {
    white-space: nowrap;
}

/* collapsed state (icon-only) */
.tfc-sidebar.sidebar-collapsed {
    width: 60px;
    padding-inline: 0.25rem;
}

    .tfc-sidebar.sidebar-collapsed .tfc-sidebar__brand-text,
    .tfc-sidebar.sidebar-collapsed .tfc-sidebar__section-label,
    .tfc-sidebar.sidebar-collapsed .tfc-sidebar__text {
        display: none;
    }

    .tfc-sidebar.sidebar-collapsed .nav-link {
        justify-content: center;
        padding: 0.45rem 0;
    }

/* ==============
   DASHBOARD STAT CARDS (top 4 boxes)
   ============== */

.tfc-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tfc-stat-card {
    background: radial-gradient(circle at top left, color-mix(in srgb, var(--tfc-primary-soft) 40%, #ffffff 60%), var(--tfc-surface));
    border: 1px solid var(--tfc-border);
    border-radius: 0.6rem;
    padding: 0.45rem 0.6rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease, background-color 0.1s ease;
}

.tfc-stat-card__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tfc-text-muted);
    margin-bottom: 0.1rem;
}

.tfc-stat-card__value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tfc-text);
    line-height: 1.2;
}

/* status border accents */
.tfc-stat-card--pending {
    border-left: 3px solid var(--tfc-warning);
}

.tfc-stat-card--approved {
    border-left: 3px solid var(--tfc-success);
}

.tfc-stat-card--rejected {
    border-left: 3px solid var(--tfc-danger);
}

.tfc-stat-card--active {
    border-color: var(--tfc-primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}

/* ==============
   MAIN DASHBOARD CARD (grid container)
   ============== */

.tfc-dashboard-card {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tfc-primary-soft) 40%, #ffffff 60%), var(--tfc-surface));
    border-radius: 0.75rem;
    border: 1px solid var(--tfc-border);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.tfc-dashboard-card__header {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--tfc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: linear-gradient( to right, color-mix(in srgb, var(--tfc-primary-soft) 90%, transparent), transparent );
}

.tfc-dashboard-card__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tfc-text);
}

.tfc-dashboard-card__subtitle {
    font-size: 0.8rem;
    color: var(--tfc-text-muted);
}

.tfc-dashboard-card__body {
    padding: 0.75rem 0.9rem 0.8rem;
}

/* ==============
   TOOLBAR (search + filters)
   ============== */

.tfc-dashboard-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.tfc-dashboard-toolbar__left,
.tfc-dashboard-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

/* search box with icon */
.tfc-search-wrapper {
    position: relative;
    min-width: 220px;
}

    .tfc-search-wrapper .tfc-search-icon {
        position: absolute;
        left: 0.6rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.85rem;
        color: var(--tfc-text-muted);
    }

.tfc-search-input {
    padding-left: 1.8rem;
    border-radius: 999px;
    border: 1px solid var(--tfc-border);
    font-size: 0.85rem;
    background-color: var(--tfc-surface);
}

    .tfc-search-input:focus {
        border-color: var(--tfc-primary);
        box-shadow: 0 0 0 0.12rem rgba(37, 99, 235, 0.18);
    }

    .tfc-search-input::placeholder {
        color: var(--tfc-text-muted);
        font-size: 0.8rem;
    }

/* filter dropdown / status select */
.tfc-filter-select {
    min-width: 140px;
    font-size: 0.85rem;
}

/* ==============
   GRID / TABLE STYLING
   ============== */

.tenant-grid-container {
    max-height: 430px;
    overflow-y: auto;
    border-radius: 0.6rem;
    border: 1px solid var(--tfc-border);
    background-color: var(--tfc-surface);
}

/* table inside card */
.table.tfc-grid-table {
    margin-bottom: 0;
    font-size: 0.85rem;
}

    .table.tfc-grid-table thead th {
        border-bottom-color: var(--tfc-border);
        background-color: color-mix(in srgb, var(--tfc-primary-soft) 80%, #ffffff 20%);
        color: var(--tfc-text);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding-top: 0.4rem;
        padding-bottom: 0.35rem;
    }

    .table.tfc-grid-table tbody td {
        vertical-align: middle;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
        border-color: var(--tfc-border);
    }

    /* zebra + hover */
    .table.tfc-grid-table tbody tr:nth-child(even) {
        background-color: color-mix(in srgb, var(--tfc-primary-soft) 10%, #ffffff 90%);
    }

    .table.tfc-grid-table tbody tr:hover {
        background-color: color-mix(in srgb, var(--tfc-primary-soft) 40%, #ffffff 60%);
    }

/* small status pill */
.tfc-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.tfc-status-pill--pending {
    background-color: color-mix(in srgb, var(--tfc-warning) 15%, #ffffff 85%);
    color: var(--tfc-warning);
}

.tfc-status-pill--approved {
    background-color: color-mix(in srgb, var(--tfc-success) 15%, #ffffff 85%);
    color: var(--tfc-success);
}

.tfc-status-pill--rejected {
    background-color: color-mix(in srgb, var(--tfc-danger) 15%, #ffffff 85%);
    color: var(--tfc-danger);
}

/* action dropdown cell */
.tfc-grid-actions {
    white-space: nowrap;
}

/* ==============
   PAGINATION
   ============== */

.tfc-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.tfc-pagination-info {
    color: var(--tfc-text-muted);
}

.tfc-pagination .page-link {
    border-radius: 999px !important;
    border-color: transparent;
    color: var(--tfc-text);
    font-size: 0.8rem;
    padding: 0.25rem 0.55rem;
}

    .tfc-pagination .page-link:hover {
        background-color: color-mix(in srgb, var(--tfc-primary-soft) 60%, transparent);
    }

.tfc-pagination .page-item.active .page-link {
    background-color: var(--tfc-primary);
    border-color: var(--tfc-primary);
    color: #fff;
}

.tfc-pagination .page-item.disabled .page-link {
    color: var(--tfc-text-muted);
}

/* ==============
   AUTH (LOGIN / REGISTER) LAYOUT
   ============== */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.75rem;
    background: radial-gradient(circle at top, color-mix(in srgb, var(--tfc-primary-soft) 40%, var(--tfc-bg) 60%), var(--tfc-bg));
}

.auth-card-wrapper {
    width: 100%;
    max-width: 430px;
}

.auth-card {
    border-radius: 0.75rem;
    border: 1px solid var(--tfc-border);
    background: var(--tfc-surface);
}

    .auth-card .card-body {
        padding: 1.25rem 1.4rem;
    }

    /* headings */
    .auth-card h2 {
        font-size: 1.2rem;
        font-weight: 600;
    }

    /* forms compact but readable */
    .auth-card .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.15rem;
    }

    .auth-card .form-control,
    .auth-card .form-select {
        font-size: 0.85rem;
        padding: 0.35rem 0.6rem;
    }

    .auth-card .mb-3 {
        margin-bottom: 0.6rem !important;
    }

    .auth-card .btn-primary,
    .auth-card .tfc-btn-primary {
        width: 100%;
        padding: 0.42rem 0.75rem;
        font-size: 0.9rem;
    }


/* Wrapper */
.tfc-search-select {
    position: relative;
}

/* Button (select jaisa) */
.tfc-search-select__btn {
    text-align: left;
    width: 100%;
    cursor: pointer;
    display: block;
    padding-right: 2rem; /* arrow ke liye space */
}

    /* Arrow indicator (optional) */
    .tfc-search-select__btn::after {
        content: "";
        position: absolute;
        right: 1rem;
        top: 50%;
        width: 0;
        height: 0;
        border-left: .3rem solid transparent;
        border-right: .3rem solid transparent;
        border-top: .35rem solid #6c757d; /* bootstrap text-muted */
        transform: translateY(-50%);
    }

/* Dropdown panel */
.tfc-search-select__menu {
    position: absolute;
    z-index: 1050;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: .15rem;
    background-color: #fff;
    border-radius: .375rem;
    border: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    padding: .5rem;
}

/* Search box */
.tfc-search-select__input {
    font-size: .85rem;
}

/* List area */
.tfc-search-select__list {
    max-height: 220px;
    overflow-y: auto;
    margin-top: .25rem;
}

/* Options */
.tfc-search-select__option {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: .25rem .5rem;
    font-size: .875rem;
    cursor: pointer;
    border-radius: .25rem;
}

    .tfc-search-select__option:hover,
    .tfc-search-select__option:focus {
        background-color: #f1f3f5;
    }

/* Small helper text */
.tfc-search-select__empty {
    font-size: .8rem;
    padding: .25rem .5rem;
}
