/* Main App Container */
.fg-app {
    font-family: 'Segoe UI', sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.fg-head {
    background: #166534;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #14532d;
}

.fg-head h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.fg-cnt {
    background: #14532d;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: bold;
}

.fg-search {
    padding: 15px;
    background: #f0fdf4;
    border-bottom: 1px solid #e2e8f0;
}

.fg-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    /* Fix for padding overflow */
}

/* Table */
.fg-tbl {
    width: 100%;
    border-collapse: collapse;
}

.fg-tbl th {
    background: #f0fdf4;
    text-align: left;
    padding: 12px;
    font-size: 12px;
    text-transform: uppercase;
    color: #166534;
    cursor: pointer;
    border-bottom: 2px solid #bbf7d0;
}

.fg-tbl td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #2d3748;
}

.fg-thumb {
    height: 35px;
    border-radius: 3px;
}

.c-badge {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.cb-A {
    background: #fee2e2;
    color: #991b1b;
}

.cb-B {
    background: #dbeafe;
    color: #1e40af;
}

.cb-C {
    background: #dcfce7;
    color: #166534;
}

.cb-D {
    background: #ffedd5;
    color: #9a3412;
}

.cb-HHT {
    background: #f3e8ff;
    color: #6b21a8;
}

.fg-pg {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    border-top: 1px solid #e2e8f0;
}

.fg-btn {
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
    color: #166534;
}

.fg-btn:disabled {
    opacity: 0.5;
}

.fg-view-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: #166534;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
}

.fg-view-btn:hover {
    background-color: #14532d;
    color: #fff;
}

/* Mobile Cards */
@media screen and (max-width: 768px) {
    .fg-tbl thead {
        display: none;
        /* Hide headers */
    }

    .fg-tbl,
    .fg-tbl tbody,
    .fg-tbl tr,
    .fg-tbl td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        /* Fix width issues */
    }

    .fg-tbl tr {
        margin-bottom: 15px;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
        padding: 10px;
    }

    .fg-tbl td {
        text-align: right;
        padding: 8px 10px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .fg-tbl td:last-child {
        border-bottom: none;
    }

    /* Simulate Label using CSS counter or explicit labels? 
       For dynamic cols, simple labels are hard in pure CSS without data-attrs.
       Let's stick to a clean look where the value is obvious, or use pseudo-elements if we had data-label.
    */
}