.templates-dashboard-body {
    background: #1d1d1d;
    color: #fff;
    margin: 0;
    max-width: 100%;
}

.templates-dashboard {
    align-items: flex-start;
    background: #1d1d1d;
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 0 auto;
    max-width: 1200px;
    min-height: calc(100vh - 72px);
    padding: 24px 14px 48px;
    width: 100%;
}

.templates-main {
    max-width: 920px;
    text-align: left;
    width: 100%;
}

.templates-heading span {
    align-items: center;
    display: flex;
    gap: 10px;
}

.templates-heading h1 {
    font-size: 1.45rem;
    margin: 0;
}

.templates-heading i {
    color: #00cdbd;
    font-size: 1.35rem;
}

.templates-heading p {
    color: #aaa;
    font-size: .92rem;
    margin: 8px 0 22px;
}

.templates-alert {
    border: 1px solid;
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.templates-alert.success {
    background: rgba(20, 184, 132, .12);
    border-color: #14b884;
    color: #a8f3d8;
}

.templates-alert.error {
    background: rgba(239, 68, 68, .12);
    border-color: #ef4444;
    color: #fecaca;
}

.template-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-card {
    background: #252525;
    border: 1px solid #3d3d3d;
    border-radius: 13px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    overflow: hidden;
    transition: border-color .2s ease, transform .2s ease;
}

.template-card:hover {
    border-color: #5c5c5c;
    transform: translateY(-2px);
}

.template-card.is-active {
    border-color: #00cdbd;
    box-shadow: 0 0 0 1px rgba(0, 205, 189, .18), 0 12px 30px rgba(0, 0, 0, .24);
}

.template-preview {
    background: #e8e8e8;
    height: 220px;
    overflow: hidden;
    padding: 0 18px 17px;
}

.preview-navbar {
    align-items: center;
    background: #202020;
    display: flex;
    height: 38px;
    justify-content: space-between;
    margin: 0 -18px 10px;
    padding: 0 18px;
}

.preview-navbar span {
    background: #f3f3f3;
    border-radius: 2px;
    height: 9px;
    width: 62px;
}

.preview-navbar i,
.preview-navbar i::before,
.preview-navbar i::after {
    background: #fff;
    content: '';
    display: block;
    height: 2px;
    width: 16px;
}

.preview-navbar i::before { transform: translateY(-5px); }
.preview-navbar i::after { transform: translateY(3px); }

.preview-hero {
    background: linear-gradient(135deg, #858585, #333);
    border-radius: 6px 6px 0 0;
    height: 83px;
}

.preview-price {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 9px 0;
}

.preview-price i { background: #a7a7a7; height: 1px; width: 35px; }
.preview-price strong { background: #00cdbd; border-radius: 4px; height: 18px; width: 52px; }
.preview-button { background: #00cdbd; border-radius: 5px; height: 27px; }
.preview-options { display: grid; gap: 5px; grid-template-columns: repeat(3, 1fr); margin-top: 6px; }
.preview-options span { background: #fff; border: 1px solid #ddd; border-radius: 4px; height: 28px; }

.template-preview-neon {
    background: radial-gradient(circle at 50% 25%, rgba(var(--template-accent-rgb), .28), transparent 40%), #070709;
}

.template-preview-neon .preview-navbar {
    background: #030304;
    border-bottom: 1px solid var(--template-accent);
    box-shadow: 0 4px 14px rgba(var(--template-accent-rgb), .35);
}

.template-preview-neon .preview-hero {
    background: linear-gradient(135deg, var(--template-accent-deep), #08080a 60%, var(--template-accent-dark));
    border: 1px solid rgba(var(--template-accent-rgb), .55);
    box-shadow: inset 0 -16px 20px rgba(0, 0, 0, .65);
}

.template-preview-neon .preview-price i { background: var(--template-accent); box-shadow: 0 0 7px var(--template-accent); }
.template-preview-neon .preview-price strong,
.template-preview-neon .preview-button { background: linear-gradient(180deg, var(--template-accent-bright), var(--template-accent-dark)); box-shadow: 0 0 12px rgba(var(--template-accent-rgb), .55); }
.template-preview-neon .preview-options span { background: #0b0b0e; border-color: var(--template-accent); }

.template-card-content { padding: 18px; }

.template-name {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.template-name > span {
    align-items: center;
    display: flex;
    font-size: 1.05rem;
    font-weight: 600;
    gap: 8px;
}

.template-name > span i { color: #00cdbd; }
.template-preview-neon + .template-card-content .template-name > span i { color: var(--template-accent-bright); }

.template-name strong {
    background: rgba(0, 205, 189, .14);
    border: 1px solid rgba(0, 205, 189, .45);
    border-radius: 999px;
    color: #72e7dc;
    font-size: .72rem;
    padding: 4px 9px;
}

.template-card-content > p {
    color: #aaa;
    font-size: .86rem;
    line-height: 1.45;
    margin: 10px 0 18px;
    min-height: 50px;
}

.template-card button {
    align-items: center;
    background: #00cdbd;
    border: 0;
    border-radius: 7px;
    color: #082b28;
    cursor: pointer;
    display: flex;
    font-weight: 700;
    gap: 7px;
    justify-content: center;
    padding: 10px 14px;
    width: 100%;
}

.template-card button:disabled {
    background: #3c3c3c;
    color: #a7a7a7;
    cursor: default;
}

.templates-note {
    align-items: flex-start;
    background: #252525;
    border: 1px solid #3d3d3d;
    border-radius: 9px;
    color: #aaa;
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 13px 15px;
}

.templates-note i { color: #00cdbd; }
.templates-note p { font-size: .84rem; line-height: 1.45; margin: 0; }

@media (max-width: 760px) {
    .templates-dashboard { padding: 18px 10px 36px; }
    .template-grid { grid-template-columns: 1fr; }
    .template-preview { height: 205px; }
    .template-card-content > p { min-height: 0; }
}
