:root {
    --s1-primary: #0d3b66;
    --s1-primary-hover: #0a2f52;
    --s1-accent: #f4a261;
    --s1-bg: #f4f6f9;
    --s1-border: #e2e6ea;
}
body {
    background: var(--s1-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2b2f36;
}
.topnav {
    background: linear-gradient(90deg, var(--s1-primary), #14497c);
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.topnav .brand-badge {
    display: inline-block;
    width: 34px; height: 34px; line-height: 34px;
    background: var(--s1-accent);
    color: #fff;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    letter-spacing: 1px;
}
.topnav .nav-link { color: rgba(255,255,255,.85) !important; font-weight: 500; }
.topnav .nav-link:hover,
.topnav .nav-link.active { color: #fff !important; }
.topnav .nav-link.active {
    background: rgba(255,255,255,.12);
    border-radius: 6px;
}
.bg-login {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d3b66 0%, #14497c 50%, #1d5a94 100%);
}
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card { width: 100%; max-width: 420px; border: none; border-radius: 14px; }
.login-logo {
    display: inline-block;
    width: 64px; height: 64px; line-height: 64px;
    background: var(--s1-primary);
    color: #fff;
    font-weight: 700; font-size: 22px;
    text-align: center;
    border-radius: 16px;
    letter-spacing: 2px;
}
.card { border: 1px solid var(--s1-border); border-radius: 10px; }
.card-header { background: #fff; border-bottom: 1px solid var(--s1-border); font-weight: 600; }
.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--s1-border);
    font-weight: 600;
    font-size: .88rem;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #4a5568;
}
.table tbody tr { transition: background .1s ease; }
.table tbody tr:hover { background: #fafbfc; cursor: pointer; }
.table td { vertical-align: middle; font-size: .94rem; }
.badge { font-weight: 500; padding: .4em .6em; font-size: .78rem; }
.btn-primary {
    background: var(--s1-primary);
    border-color: var(--s1-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--s1-primary-hover);
    border-color: var(--s1-primary-hover);
}
.filters-bar {
    background: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    margin-bottom: 16px;
}
.filters-bar .form-select, .filters-bar .form-control { font-size: .9rem; }
.form-label { font-weight: 500; font-size: .92rem; margin-bottom: .3rem; }
.form-control:focus, .form-select:focus {
    border-color: var(--s1-primary);
    box-shadow: 0 0 0 .18rem rgba(13,59,102,.18);
}
.required-mark { color: #dc3545; }
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.photo-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #eef0f3;
}
.photo-grid a, .photo-cell .photo-item {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #eef0f3;
}
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; display: block; }
.photo-grid a:hover img { transform: scale(1.05); }
.photo-cell .photo-del {
    position: absolute;
    top: 6px;
    right: 6px;
    margin: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity .15s ease;
}
.photo-cell:hover .photo-del,
.photo-cell:focus-within .photo-del { opacity: 1; }
.photo-cell .photo-del .btn {
    padding: .15rem .35rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
@media (hover: none) {
    .photo-cell .photo-del { opacity: 1; }
}
.empty-state { text-align: center; padding: 60px 20px; color: #6c757d; }
.empty-state i { font-size: 48px; color: #cbd5e0; margin-bottom: 12px; }
@media (max-width: 768px) {
    .table { font-size: .85rem; }
    .hide-mobile { display: none !important; }
}
.field-readonly { background: #f0f2f5 !important; color: #6c757d !important; }
.field-section {
    background: #fff;
    border: 1px solid var(--s1-border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
}
.field-section-title {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f2f5;
}