
.i18n-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.i18n-stat {
    background: #fff;
    border: 1px solid rgba(26,73,120,.12);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15,38,64,.05);
}
.i18n-stat strong {
    display: block;
    font-size: 28px;
    color: #12304f;
}
.i18n-stat span {
    color: #607086;
    font-weight: 700;
}
.i18n-stat.warning strong {
    color: #9a6500;
}
.i18n-card {
    margin-bottom: 18px;
}
.i18n-filter,
.i18n-add {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.i18n-filter input[type="text"],
.i18n-add input[type="text"] {
    min-width: 280px;
    flex: 1;
}
.i18n-filter select {
    min-width: 260px;
}
.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.i18n-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.i18n-table-wrap {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid rgba(26,73,120,.12);
    border-radius: 14px;
}
.i18n-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.i18n-table th,
.i18n-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(26,73,120,.10);
    vertical-align: top;
}
.i18n-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f5f8fc;
    color: #12304f;
    text-align: left;
}
.i18n-table textarea {
    width: 100%;
    min-width: 240px;
    resize: vertical;
    border-radius: 10px;
    border: 1px solid rgba(26,73,120,.18);
    padding: 8px;
    font-family: inherit;
}
.key-cell code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.row-warning {
    background: #fffaf0;
}
.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}
.badge.ok {
    background: #e9f8ef;
    color: #1f7a3a;
}
.badge.warn {
    background: #fff2cf;
    color: #9a6500;
}
.actions-cell {
    min-width: 150px;
}
.actions-cell form {
    display: inline-block;
    margin: 0 4px 4px 0;
}
.btn.small {
    padding: 7px 10px;
    font-size: 13px;
}
.btn.danger {
    background: #b42318;
    color: #fff;
}
.muted-card {
    color: #607086;
}
@media (max-width: 900px) {
    .i18n-stats {
        grid-template-columns: 1fr;
    }
    .i18n-filter,
    .i18n-add {
        align-items: stretch;
    }
}


/* v27.1b cleanup */
.i18n-table {
    table-layout: fixed;
}

.i18n-table th:nth-child(1),
.i18n-table td:nth-child(1) {
    width: 25%;
}

.i18n-table th:nth-child(2),
.i18n-table td:nth-child(2),
.i18n-table th:nth-child(3),
.i18n-table td:nth-child(3),
.i18n-table th:nth-child(4),
.i18n-table td:nth-child(4) {
    width: 19%;
}

.i18n-table .status-col,
.i18n-table td:nth-child(5) {
    width: 96px;
    min-width: 96px;
    text-align: center;
    white-space: nowrap;
}

.i18n-table .actions-col,
.i18n-table td:nth-child(6) {
    width: 142px;
    min-width: 142px;
    white-space: nowrap;
}

.i18n-table td {
    background-clip: padding-box;
}

.i18n-table textarea {
    min-width: 0;
    width: 100%;
    min-height: 48px;
    line-height: 1.35;
}

.key-cell code {
    display: inline-block;
    max-width: 100%;
    background: #eef5ff;
    border: 1px solid rgba(26,73,120,.12);
    border-radius: 8px;
    padding: 3px 8px;
    white-space: normal;
    word-break: break-word;
}

.actions-cell {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: stretch;
}

.actions-cell form {
    display: block;
    width: 100%;
    margin: 0;
}

.actions-cell .btn {
    width: 100%;
}

.badge.warn {
    max-width: 76px;
    justify-content: center;
    white-space: nowrap;
}

.i18n-table-wrap {
    max-height: 68vh;
}

.admin-grid .admin-card,
.grid .admin-card {
    min-height: 86px;
}

/* Make accidental bare links in admin page look less broken if any remain */
.page-head + a[href*="translations"],
.card + a[href*="translations"] {
    display: none;
}


/* v27.1c admin card placement fix */
.clean-admin-grid,
.admin-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 18px;
    align-items: stretch;
    margin-top: 18px;
}

.clean-admin-grid .admin-card,
.admin-grid .admin-card {
    display: block;
    min-height: 78px;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid rgba(26,73,120,.12);
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15,38,64,.05);
}

.clean-admin-grid .admin-card-title,
.admin-grid .admin-card-title {
    color: #0f4f8f;
    font-weight: 800;
    margin-bottom: 6px;
}

.clean-admin-grid .admin-card-desc,
.admin-grid .admin-card-desc {
    color: #607086;
}

/* Hide only broken translation link if it is not inside a grid */
body > a[href*="translations"],
main > a[href*="translations"]:not(.admin-card),
.content > a[href*="translations"]:not(.admin-card) {
    display: none !important;
}

@media (max-width: 1200px) {
    .clean-admin-grid,
    .admin-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}
@media (max-width: 900px) {
    .clean-admin-grid,
    .admin-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}
@media (max-width: 620px) {
    .clean-admin-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }
}


/* v27.1d final admin translations card fix
   The translations tile now uses the same classes as every other tile:
   .card.admin-search-card
*/
#adminCardGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 18px;
    align-items: stretch;
}

#adminCardGrid > .card.admin-search-card {
    min-height: 76px;
    height: auto;
}

/* Hide accidental old translation links if ever cached in template */
#adminCardGrid > a.admin-card[href*="translations"],
a.admin-card[href*="translations"] {
    display: none !important;
}


/* v27.1e: Vertalingen kaart altijd zichtbaar binnen beheer-grid */
#adminCardGrid > a.card.admin-search-card[href*="admin_translations"],
#adminCardGrid > a.card.admin-search-card[data-search*="vertalingen"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
