*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    min-height: 100vh;
}

/* ── Header ── */
header {
    background: #0d0d0d;
    color: white;
    padding: 2rem 2.5rem;
    border-bottom: 3px solid #6DC52D;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-actions {
    display: flex;
    gap: 0.65rem;
    flex-shrink: 0;
}

.header-btn {
    padding: 0.5rem 1.1rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.header-btn--outline {
    background: transparent;
    color: #e2e8f0;
    border: 1.5px solid rgba(255,255,255,0.3);
}

.header-btn--outline:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.6);
    color: white;
}

.header-btn--filled {
    background: #6DC52D;
    color: #0d0d0d;
    border: 1.5px solid #6DC52D;
}

.header-btn--filled:hover {
    background: #5aad1f;
    border-color: #5aad1f;
}

.header-logo {
    height: 2.2rem;
    width: auto;
    display: block;
}

header p {
    color: #8892b0;
    margin-top: 0.3rem;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* ── Filter Bar ── */
.filters-bar {
    background: white;
    border-bottom: 1px solid #e1e4e8;
    padding: 0.85rem 2.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.filters-inner input[type="text"] {
    flex: 1;
    min-width: 220px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1a1a2e;
}

.filters-inner select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    color: #374151;
    cursor: pointer;
}

.filters-inner input:focus,
.filters-inner select:focus {
    outline: none;
    border-color: #6DC52D;
    box-shadow: 0 0 0 3px rgba(109,197,45,0.15);
}

#clear-filters {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: background 0.1s;
}

#clear-filters:hover { background: #e5e7eb; }

/* ── Main ── */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2.5rem 3rem;
}

.results-bar {
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── What's New ── */
.whats-new-section {
    background: #0d0d0d;
    border-radius: 12px;
    padding: 1.5rem 1.75rem 1.75rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid #222;
}

.whats-new-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: #6DC52D;
}

.whats-new-header {
    margin-bottom: 1.25rem;
}

.whats-new-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.02em;
}

.whats-new-sub {
    font-size: 0.8rem;
    color: #6DC52D;
    margin-top: 0.25rem;
}

.whats-new-section .card {
    background: #1a1c24;
    border-color: #2a2d38;
}

.whats-new-section .card:hover {
    box-shadow: 0 6px 20px rgba(109,197,45,0.2);
    border-color: #6DC52D;
    transform: translateY(-2px);
}

.whats-new-section .card-title   { color: #f1f5f9; }
.whats-new-section .card-summary { color: #94a3b8; }
.whats-new-section .meta-item    { color: #64748b; }
.whats-new-section .meta-item strong { color: #cbd5e1; }
.whats-new-section .card-actions { border-top-color: #2a2d38; }

.whats-new-section .btn-secondary {
    background: #2a2d38;
    color: #cbd5e1;
    border-color: #374151;
}

.whats-new-section .btn-secondary:hover { background: #374151; }

/* ── Grouped catalog ── */
.catalog-grouped { }

.type-group {
    margin-bottom: 2.75rem;
}

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #e1e4e8;
}

.group-header-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.group-accent {
    display: block;
    width: 4px;
    height: 1.35rem;
    background: #6DC52D;
    border-radius: 2px;
    flex-shrink: 0;
}

.group-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0d0d0d;
    letter-spacing: 0.01em;
}

.group-count {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Cards ── */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 10px;
    padding: 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: box-shadow 0.15s, transform 0.1s;
}

.card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.09);
    transform: translateY(-1px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.card-title {
    font-size: 0.975rem;
    font-weight: 600;
    color: #0f1117;
    line-height: 1.4;
}

/* ── Badges ── */
.badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.badge-kit     { background: #dbeafe; color: #1d4ed8; }
.badge-program { background: #d1fae5; color: #065f46; }
.badge-concept { background: #ede9fe; color: #5b21b6; }

/* ── Meta ── */
.card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.meta-item strong {
    color: #374151;
    font-weight: 600;
}

/* ── Summary ── */
.card-summary {
    font-size: 0.855rem;
    color: #4b5563;
    line-height: 1.6;
}

/* ── Tags ── */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

/* ── Actions ── */
.card-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.1s, opacity 0.1s;
    display: block;
}

.btn-primary {
    background: #6DC52D;
    color: #0d0d0d;
}

.btn-primary:hover { background: #5aad1f; }

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover { background: #e5e7eb; }

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(2px);
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    background: #0d0d0d;
    border-bottom: 3px solid #6DC52D;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.2rem;
}

.modal-header p {
    font-size: 0.8rem;
    color: #8892b0;
}

.modal-close {
    background: none;
    border: none;
    color: #8892b0;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.1s;
}

.modal-close:hover { color: white; }

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.modal-attachment-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 3px solid #6DC52D;
    border-radius: 6px;
    padding: 0.7rem 0.9rem;
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.5;
}

.attachment-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.modal-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.date-range-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.date-range-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-field input,
.modal-field textarea,
.modal-field select {
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #1a1a2e;
    width: 100%;
}

.modal-field textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

.modal-field input:focus,
.modal-field textarea:focus {
    outline: none;
    border-color: #6DC52D;
    box-shadow: 0 0 0 3px rgba(109,197,45,0.15);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.modal-btn-cancel {
    padding: 0.55rem 1.25rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s;
}

.modal-btn-cancel:hover { background: #e5e7eb; }

.modal-btn-submit {
    padding: 0.55rem 1.5rem;
    background: #6DC52D;
    border: none;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0d0d0d;
    cursor: pointer;
    transition: background 0.1s;
}

.modal-btn-submit:hover { background: #5aad1f; }

/* ── No Results ── */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    color: #9ca3af;
    font-size: 0.95rem;
}

.hidden { display: none; }

/* ── Responsive ── */
@media (max-width: 640px) {
    header { padding: 1.5rem 1.25rem; }
    .header-inner { flex-direction: column; align-items: flex-start; }
    .header-actions { width: 100%; }
    .header-btn { flex: 1; text-align: center; }
    .filters-bar { padding: 0.75rem 1.25rem; }
    .filters-inner { flex-direction: column; }
    .filters-inner input[type="text"],
    .filters-inner select,
    #clear-filters { width: 100%; }
    main { padding: 1rem 1.25rem 2rem; }
    .catalog-grid { grid-template-columns: 1fr; }
    .card-meta { grid-template-columns: 1fr; }
}
