:root {
    --cm-primary: #7c3aed;
    --cm-primary-dark: #6d28d9;
}

body {
    font-family: 'Inter', sans-serif;
}

.devanagari-text,
.devanagari-text * {
    font-family: 'Noto Sans Devanagari', 'Mukta', sans-serif;
}

.text-primary {
    color: var(--cm-primary) !important;
}

.btn-primary {
    background-color: var(--cm-primary);
    border-color: var(--cm-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--cm-primary-dark);
    border-color: var(--cm-primary-dark);
}

.btn-outline-primary {
    color: var(--cm-primary);
    border-color: var(--cm-primary);
}

.btn-outline-primary:hover {
    background-color: var(--cm-primary);
    border-color: var(--cm-primary);
}

.bg-gradient {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 50%, #fdf2f8 100%);
}

.hero-card {
    background: #fff;
    border: 1px solid #ece7ff;
}

.hero-preview {
    background: linear-gradient(180deg, #faf5ff, #ffffff);
    min-height: 220px;
}

.category-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.08) !important;
}

.category-card .card-img-top {
    height: 180px;
    object-fit: cover;
    background: #f3f4f6;
}

.template-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.08) !important;
}

.template-card .card-img-top,
.template-card-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: #f3f4f6;
}

.template-detail-media {
    background: #f8fafc;
    line-height: 0;
}

.template-detail-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.template-detail-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cm-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.admin-wrapper {
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    z-index: 1030;
}

.admin-sidebar-brand {
    min-height: 72px;
}

.admin-sidebar-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.65rem;
    background: rgba(124, 58, 237, 0.25);
    color: #c4b5fd;
    font-size: 1.1rem;
}

.admin-sidebar-nav .nav-link {
    border-radius: 0.65rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

.admin-sidebar-nav .nav-link.active {
    background: rgba(124, 58, 237, 0.35);
    color: #fff !important;
    font-weight: 600;
}

.admin-sidebar-footer .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
}

.admin-sidebar-footer .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-header {
    min-height: 64px;
}

.admin-page-body {
    min-height: calc(100vh - 64px);
}

.admin-icon-rail {
    width: 64px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.5rem;
    flex-shrink: 0;
}

.admin-icon-rail-brand,
.admin-icon-rail-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 1.25rem;
}

.admin-icon-rail-brand:hover,
.admin-icon-rail-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-editor-body .admin-editor-content {
    padding-top: 0.5rem;
}

.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
}

.admin-content {
    background: #f8fafc;
    min-height: 100vh;
}

.admin-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.admin-thumb-lg {
    width: 120px;
    height: 80px;
    object-fit: cover;
}

.auth-body {
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

@media (max-width: 991.98px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        min-height: auto;
        position: static;
    }

    .admin-sidebar-nav {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .admin-sidebar-nav .nav-link {
        flex: 1 1 auto;
        justify-content: center;
        min-width: calc(50% - 0.25rem);
    }

    .admin-sidebar-footer {
        display: none;
    }
}
