body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.card small {
    color: var(--muted);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(17, 24, 39, 0.05);
    color: var(--text);
}

.tag-active,
.tag-live {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.tag-draft {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.tag-sold {
    background: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.15);
}

.alert-error {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid label span {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
    width: 100%;
    padding: 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid var(--border);
    font: inherit;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.table-actions form {
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    border: 1px dashed var(--border);
    border-radius: 1.25rem;
    color: var(--muted);
}

.inventory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.inventory-filters input,
.inventory-filters select {
    padding: 0.6rem 0.9rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border);
    font: inherit;
}

.progress {
    position: relative;
    width: 100%;
    height: 0.65rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
    overflow: hidden;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: #2563eb;
    border-radius: inherit;
}

.modal-shell {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1000;
}

.modal-shell.is-visible {
    display: flex;
}

.modal-dialog {
    width: 90vw;
    max-width: 1200px;
    height: 90vh;
    max-height: 90vh;
    background: #fff;
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
}

.modal-header,
.modal-footer {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    flex-shrink: 0;
}

.modal-footer {
    border-bottom: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.4);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    min-height: 0;
}

.modal-body::-webkit-scrollbar {
    width: 10px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.6);
    border-radius: 999px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.6);
    border-radius: 999px;
}

.modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.7) rgba(226, 232, 240, 0.6);
}

.modal-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.modal-form .modal-body {
    flex: 1;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #475569;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

body.modal-open {
    overflow: hidden;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--muted);
}

.gallery-field {
    border: 1px dashed var(--border);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-field input[type="file"] {
    padding: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.gallery-empty {
    margin: 0;
    color: var(--muted);
}

.gallery-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: #fff;
    cursor: grab;
}

.gallery-thumb {
    width: 90px;
    height: 70px;
    overflow: hidden;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.gallery-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.gallery-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.button--icon {
    padding: 0.35rem 0.55rem;
    font-size: 0.85rem;
}

.button--danger {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.4);
}

.inventory-thumb {
    width: 90px;
    height: 70px;
    border-radius: 0.75rem;
    object-fit: cover;
    border: 1px solid var(--border);
    display: block;
}

.inventory-thumb--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.15);
}
