/* Forms dashboard and legacy template cards */
/* Forms dashboard polish */
.subin-forms-page {
    --subin-forms-ink: #172033;
    --subin-forms-muted: #64748b;
    --subin-forms-soft: #f8fbff;
    --subin-forms-line: #d9e4f2;
    --subin-forms-blue: #3467e8;
    --subin-forms-blue-soft: #eaf2ff;
    --subin-forms-green: #2f8f4e;
    --subin-forms-green-soft: #edf9ef;
    --subin-forms-amber: #b7791f;
    --subin-forms-amber-soft: #fff8e8;
    --subin-forms-red: #c24646;
    --subin-forms-red-soft: #fff1f1;
}

.subin-forms-page .subin-admin-hero {
    margin-bottom: 26px;
    border-color: rgba(52, 103, 232, 0.12);
    background:
        radial-gradient(circle at 92% 12%, rgba(52, 103, 232, 0.11), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f7fbff 58%, #eef5ff 100%);
    box-shadow: 0 24px 54px rgba(30, 48, 80, 0.08);
}

.subin-forms-page .subin-admin-hero h1 {
    color: var(--subin-forms-ink);
    letter-spacing: -0.035em;
}

.subin-forms-page .subin-admin-hero p {
    max-width: 760px;
    color: var(--subin-forms-muted);
}

.subin-forms-page .subin-admin-tabs {
    margin: 8px 0 28px;
    padding: 0 2px;
    border-bottom-color: var(--subin-forms-line);
    gap: 22px;
}

.subin-forms-page .subin-admin-tab {
    position: relative;
    padding: 12px 0 14px;
    border-bottom: 0;
    color: #4b5565;
    font-weight: 800;
}

.subin-forms-page .subin-admin-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: transparent;
    transition: background-color 0.16s ease, transform 0.16s ease;
    transform: scaleX(0.35);
}

.subin-forms-page .subin-admin-tab:hover,
.subin-forms-page .subin-admin-tab:focus,
.subin-forms-page .subin-admin-tab.is-active,
.subin-forms-page .subin-admin-tab.active {
    color: var(--subin-forms-blue);
}

.subin-forms-page .subin-admin-tab.is-active::after,
.subin-forms-page .subin-admin-tab.active::after {
    background: var(--subin-forms-blue);
    transform: scaleX(1);
}

.subin-forms-page .subin-section-header {
    margin-bottom: 18px;
}

.subin-forms-page .subin-section-header h2,
.subin-forms-page h2 {
    color: var(--subin-forms-ink);
    letter-spacing: -0.025em;
}

.subin-forms-page .subin-section-header p {
    color: var(--subin-forms-muted);
}

.subin-forms-page .subin-form-list {
    grid-template-columns: repeat(3, minmax(360px, 1fr));
    align-items: stretch;
    gap: 16px;
}

.subin-forms-page .subin-form-card {
    position: relative;
    display: flex;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    padding: 0;
    border: 1px solid rgba(174, 194, 220, 0.72);
    border-radius: 18px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, rgba(52, 103, 232, 0.24), rgba(255, 255, 255, 0.4)) border-box;
    box-shadow: 0 18px 44px rgba(26, 44, 72, 0.07);
}

.subin-forms-page .subin-form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 4px;
    border-radius: 0;
    background: linear-gradient(90deg, #3467e8, #65a2ff 48%, #c7dcff);
    opacity: 0.88;
    pointer-events: none;
}

.subin-forms-page .subin-form-main {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    gap: 14px;
    padding: 20px 20px 26px;
    box-sizing: border-box;
}

.subin-forms-page .subin-form-main > * {
    position: relative;
    z-index: 1;
}

.subin-forms-page .subin-card-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    min-width: 0;
    margin-bottom: 0;
}

.subin-forms-page .subin-card-top__content,
.subin-forms-page .subin-title-line,
.subin-forms-page .subin-meta {
    min-width: 0;
}

.subin-forms-page .subin-title-line {
    gap: 10px;
}

.subin-forms-page .subin-form-card__title {
    font-size: 17px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.subin-forms-page .subin-meta {
    margin: 5px 0 0;
    gap: 8px;
    color: #6b778c;
    font-size: 12px;
    font-weight: 650;
}

.subin-forms-page .subin-meta span + span::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 8px 2px 0;
    border-radius: 50%;
    background: #b8c5d8;
}

.subin-forms-page .subin-card-top .subin-btn-primary {
    align-self: start;
    min-width: auto;
    max-width: 220px;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(52, 103, 232, 0.2);
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subin-forms-page .subin-shortcode-row {
    grid-row: 2;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid #dce8f7;
    border-radius: 12px;
    background: #f8fbff;
}

.subin-forms-page .subin-shortcode-label {
    color: #627189;
    font-size: 11px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.subin-forms-page .subin-shortcode-pill {
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid #c9d8ea;
    border-radius: 9px;
    background: #ffffff;
    color: #1f2937;
    font-size: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.subin-forms-page .subin-copy-shortcode {
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
}

.subin-forms-page .subin-form-auto-reply-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -2px 0 12px;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #f8fafc;
}

.subin-forms-page .subin-form-auto-reply-line__label {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.subin-forms-page .subin-form-auto-reply-line__template,
.subin-forms-page .subin-form-auto-reply-line__empty,
.subin-forms-page .subin-form-auto-reply-line__missing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}

.subin-forms-page .subin-form-auto-reply-line__template {
    max-width: 360px;
    border: 1px solid #d8e2ee;
    background: #ffffff;
    color: #172033;
}

.subin-forms-page .subin-form-auto-reply-line__template span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subin-forms-page .subin-form-auto-reply-line__template:hover,
.subin-forms-page .subin-form-auto-reply-line__template:focus {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: none;
}

.subin-forms-page .subin-form-auto-reply-line__empty {
    border: 1px dashed #cbd5e1;
    background: #ffffff;
    color: #64748b;
}

.subin-forms-page .subin-form-auto-reply-line__empty:hover,
.subin-forms-page .subin-form-auto-reply-line__empty:focus {
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: none;
}

.subin-forms-page .subin-form-auto-reply-line__missing {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.subin-forms-page .subin-form-auto-reply-line--inside {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-color: #eef2f7;
    background: #f8fafc;
}

.subin-forms-page .subin-card-grid {
    grid-row: 3;
    align-self: start;
    grid-template-columns: 1fr;
    gap: 12px;
}

.subin-forms-page .subin-form-card .subin-panel {
    min-height: 0;
    padding: 14px 16px;
    border-color: rgba(196, 212, 234, 0.9);
    border-radius: 14px;
    background:
        radial-gradient(circle at 96% 8%, rgba(52, 103, 232, 0.08), transparent 28%),
        #fbfdff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.subin-forms-page .subin-form-card .subin-panel-title,
.subin-forms-page .subin-form-card .subin-panel-title-row h4 {
    color: var(--subin-forms-ink);
    font-size: 14px;
    letter-spacing: -0.015em;
}

.subin-forms-page .subin-form-card .subin-panel-title-row {
    gap: 12px;
}

.subin-forms-page .subin-form-card .subin-setup-list {
    gap: 8px;
}

.subin-forms-page .subin-form-card .subin-setup-row {
    align-items: flex-start;
    gap: 9px;
    padding: 2px 0;
}

.subin-forms-page .subin-form-card .subin-setup-row .subin-dot {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    box-shadow: 0 0 0 4px rgba(52, 103, 232, 0.08);
}

.subin-forms-page .subin-form-card .subin-setup-row-success .subin-dot {
    background: #41a763;
    box-shadow: 0 0 0 4px rgba(65, 167, 99, 0.12);
}

.subin-forms-page .subin-form-card .subin-setup-row-warning .subin-dot {
    background: #d1862c;
    box-shadow: 0 0 0 4px rgba(209, 134, 44, 0.14);
}

.subin-forms-page .subin-form-card .subin-setup-row-muted .subin-dot {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.13);
}

.subin-forms-page .subin-form-card .subin-setup-row strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #273244;
    font-size: 13px;
    line-height: 1.35;
}

.subin-forms-page .subin-form-card .subin-setup-row span:not(.subin-dot):not(.subin-help) {
    color: #607086;
    font-size: 13px;
    line-height: 1.45;
}

.subin-forms-page .subin-form-card .subin-autoreply {
    min-height: 0;
}

.subin-forms-page .subin-form-card .subin-autoreply p {
    max-width: 760px;
    margin-bottom: 0;
    color: #5f6f86;
    font-size: 13px;
    line-height: 1.6;
}

.subin-forms-page .subin-form-card .subin-panel-title-row .subin-badge {
    margin-left: auto;
}

.subin-forms-page .subin-form-card .subin-template-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-color: #dce8f7;
    border-radius: 14px;
    background: #ffffff;
}

.subin-forms-page .subin-form-card .subin-info-row {
    grid-row: 4;
    align-self: end;
    gap: 8px;
    margin: auto 0 0;
    padding-top: 12px;
}

.subin-forms-page .subin-form-card .subin-info-pill {
    padding: 7px 10px;
    border-color: #dce8f7;
    border-radius: 999px;
    background: #ffffff;
    color: #5d6d83;
    font-size: 12px;
    box-shadow: 0 8px 18px rgba(30, 48, 80, 0.04);
}

.subin-forms-page .subin-form-card .subin-info-pill strong {
    color: #273244;
}

.subin-forms-page .subin-card-actions {
    grid-row: 5;
    align-self: end;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    margin: 0;
    padding: 12px 0 0;
    overflow: visible;
    border-top: 1px solid #e6eef8;
}

.subin-forms-page .subin-action-chip {
    min-height: 30px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f9fbff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: none;
}

.subin-forms-page .subin-card-actions .subin-action-chip {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    transform: none;
    vertical-align: middle;
}

.subin-forms-page .subin-action-chip:hover,
.subin-forms-page .subin-action-chip:focus {
    border-color: #abc5ef;
    background: #eef5ff;
    color: #2557c7;
}

.subin-forms-page .subin-action-chip-warning {
    border-color: #f2d48b;
    background: var(--subin-forms-amber-soft);
    color: var(--subin-forms-amber);
}

.subin-forms-page .subin-action-chip-danger {
    margin-left: 0;
    border-color: #f0b7b7;
    background: var(--subin-forms-red-soft);
    color: var(--subin-forms-red);
}

.subin-forms-page .subin-action-chip-danger:hover,
.subin-forms-page .subin-action-chip-danger:focus {
    border-color: #de8b8b;
    background: #ffe7e7;
    color: #a53636;
}

.subin-forms-page .subin-form-card .subin-badge {
    border-radius: 999px;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .subin-forms-page .subin-card-top {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .subin-forms-page .subin-card-top .subin-btn-primary {
        grid-column: 2;
        justify-self: start;
        max-width: 100%;
    }
}

@media (max-width: 780px) {
    .subin-forms-page .subin-form-main {
        padding: 22px 18px 20px;
    }

    .subin-forms-page .subin-card-top .subin-btn-primary {
        justify-self: stretch;
        text-align: center;
    }

    .subin-forms-page .subin-shortcode-row {
        width: auto;
    }
}

@media (max-width: 1280px) {
    .subin-forms-page .subin-form-list {
        grid-template-columns: repeat(2, minmax(360px, 1fr));
    }
}

@media (max-width: 860px) {
    .subin-forms-page .subin-form-list {
        grid-template-columns: 1fr;
    }
}

/* Auto-reply templates library polish */
.subin-forms-page .subin-auto-reply-manager {
    display: grid;
    gap: 18px;
}

.subin-forms-page .subin-auto-reply-manager__header {
    align-items: center;
    margin-bottom: 0;
    padding: 16px 18px;
    border: 1px solid rgba(196, 212, 234, 0.72);
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.subin-forms-page .subin-auto-reply-manager__header p {
    margin: 0;
    color: #64748b;
}

.subin-forms-page .subin-auto-reply-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.subin-forms-page .subin-auto-reply-card {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    min-height: 100%;
    padding: 18px;
    border: 1px solid rgba(196, 212, 234, 0.82);
    border-radius: 18px;
    background:
        radial-gradient(circle at 96% 8%, rgba(52, 103, 232, 0.08), transparent 28%),
        #ffffff;
    box-shadow: 0 18px 42px rgba(26, 44, 72, 0.07);
}

.subin-forms-page .subin-auto-reply-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, #3467e8, #74a7ff 54%, #d9e8ff);
}

.subin-forms-page .subin-auto-reply-card__preview {
    position: relative;
    z-index: 1;
    align-self: start;
    overflow: hidden;
    min-height: 132px;
    border: 1px solid #dbe7f6;
    border-radius: 14px;
    background: #eef4fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.subin-forms-page .subin-auto-reply-card__preview .subin-template-mini-preview {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.subin-forms-page .subin-auto-reply-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 12px;
}

.subin-forms-page .subin-auto-reply-card__main {
    display: grid;
    gap: 10px;
}

.subin-forms-page .subin-auto-reply-card__title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.subin-forms-page .subin-auto-reply-card h3 {
    margin: 0;
    color: #172033;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.subin-forms-page .subin-auto-reply-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

.subin-forms-page .subin-auto-reply-card__subject,
.subin-forms-page .subin-auto-reply-summary__item {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #dce8f7;
    border-radius: 12px;
    background: #f8fbff;
}

.subin-forms-page .subin-auto-reply-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.subin-forms-page .subin-auto-reply-summary__item span,
.subin-forms-page .subin-auto-reply-variables__label,
.subin-forms-page .subin-template-used-by__label {
    color: #65738a;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.subin-forms-page .subin-auto-reply-summary__item strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subin-forms-page .subin-template-used-by,
.subin-forms-page .subin-auto-reply-variables {
    padding: 10px 12px;
    border: 1px solid #e2ebf6;
    border-radius: 12px;
    background: #fbfdff;
}

.subin-forms-page .subin-template-used-by--empty {
    color: #64748b;
}

.subin-forms-page .subin-template-used-by__chips,
.subin-forms-page .subin-auto-reply-variables__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
    min-width: 0;
}

.subin-forms-page .subin-template-used-by__chip,
.subin-forms-page .subin-template-used-by__more,
.subin-forms-page .subin-auto-reply-variables code {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #d8e2ee;
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}

.subin-forms-page .subin-template-used-by__chip,
.subin-forms-page .subin-template-used-by__more {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subin-forms-page .subin-template-used-by__chip:hover,
.subin-forms-page .subin-template-used-by__chip:focus {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: none;
}

.subin-forms-page .subin-template-used-by__more {
    background: #eef3f8;
    color: #64748b;
}

.subin-forms-page .subin-auto-reply-variables code {
    border-color: #d7e9ff;
    background: #eef6ff;
    color: #1e3a8a;
}

.subin-forms-page .subin-auto-reply-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e6eef8;
}

.subin-forms-page .subin-auto-reply-card__actions .subin-action-chip,
.subin-forms-page .subin-auto-reply-card__actions .button {
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

@media (max-width: 1500px) {
    .subin-forms-page .subin-auto-reply-card-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .subin-forms-page .subin-auto-reply-manager__header,
    .subin-forms-page .subin-auto-reply-card,
    .subin-forms-page .subin-auto-reply-card__title-row,
    .subin-forms-page .subin-auto-reply-summary {
        grid-template-columns: 1fr;
    }

    .subin-forms-page .subin-auto-reply-card__preview {
        min-height: 170px;
    }
}

/* Forms dashboard icons and accents */
.subin-forms-page .subin-card-top__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: #eef5ff;
	color: #2563eb;
	font-size: 16px;
	line-height: 1;
}

.subin-forms-page .subin-card-top__icon::before {
	width: auto;
	height: auto;
	font-size: inherit;
	line-height: 1;
}

.subin-forms-page .subin-admin-tab.subin-admin-tab--active {
	color: #3467e8;
}

.subin-forms-page .subin-admin-tab.subin-admin-tab--active::after {
	background: #3467e8;
	transform: scaleX(1);
}

.subin-forms-page .subin-form-card--active .subin-card-top__icon {
	background: #ecf8ee;
	color: #2f7d3b;
}

.subin-forms-page .subin-form-card--inactive .subin-card-top__icon {
	background: #f1f5f9;
	color: #64748b;
}

.subin-forms-page .subin-form-card--active::before {
	background: linear-gradient(90deg, #41a763, #80d99a 54%, #dff7e6);
}

.subin-forms-page .subin-form-card--inactive::before {
	background: linear-gradient(90deg, #94a3b8, #cbd5e1 54%, #eef2f7);
}

.subin-forms-page .subin-auto-reply-status-block {
    display: grid;
    gap: 14px;
    max-width: 760px;
}
