* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #f5f7fb;
    color: #111827;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.topbar {
    background: #0f172a;
    color: #e5e7eb;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.6);
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #38bdf8;
}

.brand-title {
    font-weight: 600;
    letter-spacing: .03em;
}

.topbar nav a {
    margin-left: 16px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.main-content {
    padding: 24px 0 40px;
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card img.thumb {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 8px;
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #e0f2fe;
    color: #1d4ed8;
    margin-bottom: 4px;
}

.badge.format-digital {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge.format-estatico {
    background: #fef3c7;
    color: #92400e;
}

.badge-category {
    background: #ecfeff;
    color: #0f766e;
}

.price-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
}

.price-strong {
    font-weight: 600;
    color: #111827;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}

.btn-primary {
    background: #2563eb;
    color: #f9fafb;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

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

.btn-sm {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Forms */
.form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    max-width: 640px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.form-row label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #4b5563;
}

.form-row input,
.form-row textarea,
.form-row select {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    outline: none;
    background: #f9fafb;
}

.form-row textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
    background: #ffffff;
}

/* Layout */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-title h1,
.section-title h2 {
    font-size: 1.3rem;
}

.section-title p {
    font-size: 0.9rem;
    color: #6b7280;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.8rem;
}

.chip {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
}

/* Admin */
.admin-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
}

.admin-sidebar {
    background: #0f172a;
    border-radius: 16px;
    padding: 16px;
    color: #e5e7eb;
    height: fit-content;
}

.admin-sidebar h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.admin-sidebar a {
    display: block;
    padding: 6px 0;
    font-size: 0.9rem;
    color: #e5e7eb;
    opacity: 0.9;
}

.admin-sidebar a:hover {
    opacity: 1;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.table th,
.table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 6px;
    text-align: left;
}

.table th {
    color: #6b7280;
    font-weight: 500;
}

.badge-soft {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #f3f4f6;
    color: #4b5563;
}

.badge-soft.success {
    background: #dcfce7;
    color: #166534;
}

.badge-soft.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.footer {
    margin-top: 40px;
    padding: 16px 0 24px;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}

/* Messages */
.alert {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
}
