:root {
    --color-bg: #f4f6f8;
    --color-surface: #ffffff;
    --color-text: #1a2332;
    --color-muted: #5c6b7a;
    --color-primary: #1e5eff;
    --color-primary-dark: #1649cc;
    --color-border: #d8dee6;
    --color-error: #b42318;
    --color-error-bg: #fef3f2;
    --color-success: #067647;
    --color-success-bg: #ecfdf3;
    --radius: 10px;
    --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
    --sidebar-bg: #0f172a;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: rgba(255, 255, 255, 0.72);
    --sidebar-text-active: #ffffff;
    --dashboard-bg: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.main-content {
    padding: 2.5rem 0 4rem;
}

.site-footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: 1.5rem 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.main-content .card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 480px;
    margin: 0 auto;
}

.main-content .card-wide {
    max-width: 720px;
}

.main-content .card h1,
.hero h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.main-content .card p,
.hero p {
    color: var(--color-muted);
    margin-top: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

select,
textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(30, 94, 255, 0.2);
    border-color: var(--color-primary);
}

.main-content .btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: var(--color-primary);
    color: #fff;
}

.main-content .btn:hover {
    background: var(--color-primary-dark);
}

.main-content .btn-block {
    width: 100%;
}

.main-content .btn-small {
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
}

.main-content .btn-secondary {
    background: #fff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.main-content .btn-secondary:hover {
    background: #f8fafc;
}

.main-content .btn-danger {
    background: #b42318;
}

.main-content .btn-danger:hover {
    background: #912018;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid #fecdca;
}

.alert-success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid #abefc6;
}

.error-list {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
    color: var(--color-error);
}

.form-footer {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Dashboard layout */
.dashboard-body {
    background: var(--dashboard-bg);
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #111827 0%, var(--sidebar-bg) 100%);
    color: var(--sidebar-text);
    padding: 1.5rem 1.25rem;
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #fff;
    margin-bottom: 2rem;
}

.sidebar-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.sidebar-brand-text {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-label {
    display: block;
    margin: 0 0 0.75rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.85rem;
    border-radius: 12px;
    color: var(--sidebar-text);
    font-size: 0.94rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link svg {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    opacity: 0.82;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--sidebar-text-active);
}

.sidebar-link.is-active {
    background: rgba(59, 130, 246, 0.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22);
}

.sidebar-link.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-sublink {
    margin-left: 0.35rem;
    padding-left: 1.15rem;
    font-size: 0.9rem;
}

.sidebar-badge {
    margin-left: auto;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.sidebar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.sidebar-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-meta strong {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-meta span {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.52);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout {
    display: block;
    text-align: center;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    font-weight: 500;
}

.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.75rem 2rem 1.25rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.topbar-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.status-pill--active {
    background: #ecfdf3;
    color: #067647;
    box-shadow: inset 0 0 0 1px #abefc6;
}

.status-pill--pending {
    background: #fffaeb;
    color: #b54708;
    box-shadow: inset 0 0 0 1px #fedf89;
}

.status-pill--suspended {
    background: #fef3f2;
    color: #b42318;
    box-shadow: inset 0 0 0 1px #fecdca;
}

.dashboard-content {
    padding: 1.5rem 2rem 2.5rem;
}

.dashboard-content .alert {
    margin-bottom: 1.25rem;
}

.dashboard-welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 1.85rem;
    margin-bottom: 1.5rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.dashboard-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #3b82f6;
}

.dashboard-welcome h2 {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.dashboard-welcome-copy p:last-child {
    margin: 0;
    max-width: 42rem;
    color: #64748b;
}

.dashboard-welcome-meta {
    flex-shrink: 0;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.stat-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 14px;
    flex-shrink: 0;
}

.stat-card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.stat-card-icon--blue {
    background: #eff6ff;
    color: #2563eb;
}

.stat-card-icon--violet {
    background: #f5f3ff;
    color: #7c3aed;
}

.stat-card-icon--amber {
    background: #fffbeb;
    color: #d97706;
}

.stat-card-icon--green {
    background: #ecfdf3;
    color: #059669;
}

.stat-label {
    margin: 0 0 0.15rem;
    font-size: 0.82rem;
    color: #64748b;
}

.stat-value {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-note {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.panel {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    padding: 1.35rem 1.5rem 1.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.panel-tag {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.panel-tag--muted {
    background: #f1f5f9;
    color: #64748b;
}

.detail-list {
    margin: 0;
}

.detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-row dt {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: #94a3b8;
}

.detail-row dd {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.roadmap-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.roadmap-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.roadmap-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.roadmap-list strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.92rem;
}

.roadmap-list p {
    margin: 0;
    font-size: 0.84rem;
    color: #64748b;
}

.page-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
    letter-spacing: -0.03em;
}

.page-subtitle {
    margin: 0;
    color: #64748b;
}

.toolbar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 220px));
}

.empty-state {
    padding: 3rem 2rem;
    text-align: center;
    background: #fff;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    border-radius: 18px;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
}

.empty-state p {
    margin: 0 0 1.25rem;
    color: #64748b;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.inventory-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.inventory-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
}

.inventory-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inventory-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
    font-size: 0.9rem;
}

.inventory-card-body {
    padding: 1.1rem 1.2rem 1.25rem;
}

.inventory-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.inventory-category {
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-status {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.inventory-status--active {
    background: #ecfdf3;
    color: #067647;
}

.inventory-status--draft {
    background: #f1f5f9;
    color: #64748b;
}

.inventory-status--archived {
    background: #fffaeb;
    color: #b54708;
}

.inventory-card-body h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.inventory-card-body h3 a {
    color: inherit;
}

.inventory-card-body p {
    margin: 0 0 0.85rem;
    color: #64748b;
    font-size: 0.88rem;
}

.inventory-card-actions {
    display: flex;
    gap: 1rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.panel-form {
    max-width: 760px;
}

.form-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h3,
.danger-zone h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.form-help {
    margin: -0.25rem 0 1rem;
    color: #64748b;
    font-size: 0.88rem;
}

.input-prefix {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

.input-prefix span {
    color: #64748b;
    font-weight: 600;
}

.input-prefix input {
    border: none;
    padding-left: 0;
    padding-right: 0;
}

.input-prefix:focus-within {
    outline: 2px solid rgba(30, 94, 255, 0.2);
    border-color: var(--color-primary);
}

.input-prefix--short {
    max-width: 240px;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.image-thumb {
    position: relative;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.image-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.image-thumb-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
}

.image-delete-form {
    padding: 0.65rem;
}

.danger-zone {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #fee4e2;
}

.danger-zone p {
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.88rem;
}

.inventory-detail {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
}

.inventory-detail-gallery {
    grid-column: 1 / -1;
}

.inventory-detail-main {
    border-radius: 18px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.inventory-detail-main img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.inventory-detail-thumbs {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.inventory-detail-thumbs img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.inventory-detail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    color: #94a3b8;
}

.inventory-description {
    color: #334155;
    line-height: 1.7;
}

@media (max-width: 1100px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: none;
    }

    .dashboard-topbar,
    .dashboard-content {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome {
        flex-direction: column;
    }

    .dashboard-welcome-meta {
        align-self: flex-start;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .dashboard-welcome h2 {
        font-size: 1.35rem;
    }

    .page-toolbar,
    .toolbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .inventory-detail {
        grid-template-columns: 1fr;
    }

    .stat-grid--compact {
        grid-template-columns: 1fr;
    }
}
