.sabbir-photocard-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sabbir-photocard-box p {
    margin: 0;
}

.sabbir-badge-pro {
    display: inline-block;
    background: linear-gradient(135deg, #d60000, #7a0000);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 6px;
}

.sabbir-photocard-admin-page {
    max-width: 1380px;
}

.sabbir-admin-lead {
    max-width: 820px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 4px;
}

.sabbir-admin-workspace {
    display: grid;
    grid-template-columns: 1fr 390px;
    gap: 24px;
    align-items: start;
    margin-top: 18px;
}

.sabbir-photocard-settings {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 0 24px 24px;
}

.sabbir-admin-live-preview-card {
    position: sticky;
    top: 46px;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sabbir-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sabbir-preview-badge {
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.sabbir-canvas-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #e2e8f0;
    line-height: 0;
}

.sabbir-canvas-container canvas {
    width: 100%;
    height: auto;
    display: block;
}

.sabbir-admin-tabs {
    display: flex;
    gap: 6px;
    margin: 0 -24px 24px;
    padding: 14px 18px 0;
    border-bottom: 1px solid #dcdcde;
    overflow-x: auto;
}

.sabbir-admin-tab {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    color: #475569;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: -1px;
    padding: 13px 16px;
    white-space: nowrap;
}

.sabbir-admin-tab:hover {
    color: #111827;
    background: #f8fafc;
}

.sabbir-admin-tab.is-active {
    background: #ffffff;
    border-color: #dcdcde;
    color: #d60000;
    box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.04);
}

.sabbir-admin-panel[hidden] {
    display: none;
}

.sabbir-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.sabbir-text-grid {
    grid-template-columns: 2fr 1fr 1fr;
}

.sabbir-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #1f2937;
    font-weight: 700;
}

.sabbir-field span {
    font-size: 13px;
}

.sabbir-field input[type="text"],
.sabbir-field input[type="url"],
.sabbir-field select {
    border-radius: 8px;
    min-height: 40px;
}

.sabbir-field input[type="color"] {
    width: 100%;
    height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    padding: 4px;
}

.sabbir-field-wide {
    grid-column: span 2;
}

.sabbir-logo-settings {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.sabbir-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    border-radius: 14px;
    color: #64748b;
    overflow: hidden;
    padding: 18px;
    text-align: center;
}

.sabbir-logo-preview img {
    display: block;
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.sabbir-logo-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sabbir-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sabbir-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.sabbir-toggle-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    cursor: pointer;
    padding: 16px;
}

.sabbir-toggle-card input {
    margin-top: 3px;
}

.sabbir-toggle-card span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sabbir-toggle-card strong {
    color: #111827;
    font-size: 13.5px;
}

.sabbir-toggle-card small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.sabbir-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.sabbir-shortcode-hint {
    font-size: 12px;
    color: #64748b;
}

/* Editor Studio Metabox */
.sabbir-editor-preview-wrap {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #cbd5e1;
    line-height: 0;
}

.sabbir-editor-live-canvas {
    width: 100%;
    height: auto;
    display: block;
}

.sabbir-editor-no-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

.sabbir-studio-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sabbir-studio-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}

.sabbir-studio-field textarea,
.sabbir-studio-field select,
.sabbir-studio-field input[type="text"] {
    width: 100%;
    font-size: 12px;
    border-radius: 6px;
}

.sabbir-studio-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sabbir-photocard-download {
    min-height: 38px !important;
    font-weight: 700 !important;
}

.sabbir-photocard-settings-link {
    font-size: 12px;
    text-align: center;
    margin-top: 4px !important;
}

/* Frontend Download Button */
.sabbir-photocard-frontend {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    clear: both;
    margin: 12px auto;
    text-align: center;
}

.sabbir-photocard-front-button {
    appearance: none;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 42px;
    min-height: 42px !important;
    background: linear-gradient(135deg, var(--sabbir-primary, #d60000), var(--sabbir-secondary, #7a0000));
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(214, 0, 0, 0.24);
    color: #ffffff !important;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    padding: 0 22px !important;
    text-decoration: none;
    transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.sabbir-photocard-front-button-icon {
    width: 18px;
    height: 15px;
    fill: currentColor;
}

.sabbir-photocard-front-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(214, 0, 0, 0.32);
}

/* Format Grid */
.sabbir-format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 14px;
}

.sabbir-format-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 235px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    padding: 12px;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.sabbir-format-card:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.sabbir-format-card.is-selected {
    border-color: #d60000;
    box-shadow: 0 0 0 3px rgba(214, 0, 0, 0.14);
}

.sabbir-format-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sabbir-format-card strong {
    color: #111827;
    font-size: 13.5px;
}

.sabbir-format-card small {
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.45;
}

.sabbir-format-preview {
    position: relative;
    display: block;
    height: 100px;
    background: var(--top-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}

.sabbir-format-preview::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.sabbir-format-preview span:nth-child(1) {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 60px;
    height: 14px;
    background: var(--primary);
    border-radius: 999px;
}

.sabbir-format-preview span:nth-child(2) {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 32px;
    height: 38px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
}

.sabbir-format-preview span:nth-child(3) {
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 10px;
    height: 11px;
    background: var(--accent);
    border-radius: 999px;
}

.sabbir-swatch-row {
    display: flex;
    gap: 6px;
    margin-top: auto;
}

.sabbir-swatch-row i {
    display: block;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 999px;
}

@media (max-width: 1080px) {
    .sabbir-admin-workspace {
        grid-template-columns: 1fr;
    }

    .sabbir-admin-live-preview-card {
        position: static;
        max-width: 480px;
    }
}

@media (max-width: 782px) {
    .sabbir-text-grid,
    .sabbir-logo-settings {
        grid-template-columns: 1fr;
    }

    .sabbir-field-wide {
        grid-column: auto;
    }
}
