* {
    box-sizing: border-box;
    margin: 0;
    font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
}
body {
    background: #f4f7fc;
    color: #1e2a3a;
}
.topbar {
    background: #1e466e;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.topbar h1 { font-size: 1.4rem; margin: 0; }
.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    padding-bottom: 4px;
}
.nav-links a.active, .nav-links a:hover { border-bottom: 2px solid #ffc107; }
.page-wrap {
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.8rem;
}
.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    border-left: 5px solid #1e466e;
    padding-left: 12px;
    margin-bottom: 1rem;
}
.meta-grid, .cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
    gap: 1rem;
}
.field label { display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 4px; color: #2c3e50; }
.field input, .field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 0.85rem;
}
.tbl-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}
th, td {
    border: 1px solid #ddd;
    padding: 6px 5px;
    vertical-align: middle;
}
th {
    background: #eef2f5;
    font-weight: 700;
}
input, select {
    width: 100%;
    min-width: 70px;
    padding: 4px;
    border: none;
    background: transparent;
}
input:focus { outline: 1px solid #1e466e; background: white; }
.btn {
    background: #e9ecef;
    border: none;
    padding: 6px 14px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary { background: #1e466e; color: white; }
.btn-success { background: #2c7a4d; color: white; }
.btn-danger { background: #b91c1c; color: white; }
.btn-remove {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    padding: 2px 8px;
}
.row-ctrl {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}
.status-msg { font-size: 0.8rem; color: #1e466e; }
.modal-overlay {
    display: none;
    position: fixed;
    top:0;left:0;width:100%;height:100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
}
.modal .icon {
    font-size: 3rem;
    background: #2c7a4d;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.cert-note { font-style: italic; font-size: 0.75rem; margin: 0.5rem 0; }
.download-banner {
    background: #eef2ff;
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
@media print {
    .topbar, .actions, .row-ctrl, .download-banner, .btn-remove, .modal-overlay, .nav-links, .btn {
        display: none !important;
    }
    .card { box-shadow: none; border: 1px solid #ccc; }
    body { background: white; }
}
