@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Base ─────────────────────────────────────────────────────────────────── */
.trw-wrap * {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* ── HERO SECTION ─────────────────────────────────────────────────────────── */
.trw-hero {
    padding: 60px 40px;
    text-align: center;
}

.trw-section-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--trw-label, #F97316);
    margin: 0 0 10px;
}

.trw-hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 40px;
    line-height: 1.2;
}

/* ── Category Cards ───────────────────────────────────────────────────────── */
.trw-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.trw-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 24px;
    text-align: left;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.trw-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.trw-card-icon {
    width: 36px;
    height: 36px;
    background: #eff6ff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--trw-accent, #2563EB);
    font-size: 16px;
}

.trw-card-icon svg,
.trw-card-icon i,
.trw-card-icon img,
.trw-card-icon span {
    color: var(--trw-accent, #2563EB) !important;
    fill: var(--trw-accent, #2563EB) !important;
    font-size: 16px !important;
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block;
}

.trw-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px;
}

.trw-card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 10px;
}

.trw-card-count {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 14px;
}

.trw-card-link {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--trw-accent, #2563EB) !important;
    text-decoration: none !important;
    transition: opacity 0.15s;
}

.trw-card-link:hover {
    opacity: 0.75;
}

/* ── TABLE SECTION ────────────────────────────────────────────────────────── */
.trw-table-section {
    padding: 60px 40px;
    max-width: 1180px;
    margin: 0 auto;
}

.trw-table-title {
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 32px;
}

/* ── Filters ──────────────────────────────────────────────────────────────── */
.trw-filters {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 24px;
}

.trw-search-wrap {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.trw-search-icon {
   position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    line-height: 0;
    z-index: 1;
}

.trw-wrap input#trw-search,
.trw-wrap .trw-input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}

.trw-input:focus {
    border-color: var(--trw-accent, #2563EB);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.trw-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trw-filter-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.trw-select {
    height: 42px;
    padding: 0 32px 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    min-width: 170px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.trw-select:focus {
    border-color: var(--trw-accent, #2563EB);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.trw-reset-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 16px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #64748b;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.15s;
    align-self: flex-end;
}

.trw-reset-btn:hover {
    background: var(--trw-accent, #2563EB);
    border-color: var(--trw-accent, #2563EB);
    color: #ffffff;
}

/* ── Table ────────────────────────────────────────────────────────────────── */
.trw-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.trw-table {
    width: 100%;
    border-collapse: collapse;
}

.trw-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.trw-table th {
    padding: 12px 18px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    white-space: nowrap;
}

.trw-table td {
    padding: 15px 18px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.trw-table tbody tr:last-child td {
    border-bottom: none;
    padding-bottom: 15px;
}

.trw-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    vertical-align: top;
}

.trw-table tbody tr:hover {
    background: #f8fafc;
}

.trw-doc-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #0f172a;
}

.trw-doc-icon {
    width: 28px;
    height: 28px;
    background: #fee2e2;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trw-doc-icon svg {
    color: #ef4444;
}

.trw-cert-badge {
    display: inline-block;
    font-size: 12px;
    color: #475569;
}

.trw-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--trw-label, #F97316) !important;
    text-decoration: none !important;
    background: #fff7ed;
    transition: background 0.15s, transform 0.15s;
}

.trw-download-btn:hover {
    background: #fed7aa;
    transform: translateY(1px);
}

.trw-no-results {
    text-align: center;
    padding: 48px;
    color: #94a3b8;
    font-size: 15px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .trw-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .trw-hero, .trw-table-section {
        padding: 30px 15px;
    }
    .trw-card-grid {
        grid-template-columns: 1fr;
    }
    .trw-hero-title {
        font-size: 26px;
    }
    .trw-table-wrap {
        overflow-x: auto;
    }
    .trw-filters {
        flex-direction: column;
    }
    .trw-search-wrap, .trw-select {
        width: 100%;
        min-width: unset;
    }
}