/* Design Upgrade CSS */

/* Glassmorphism Card Style */
.card-style {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    /* Remove transition for transform/box-shadow since hover effect is removed
    transition: transform 0.3s ease, box-shadow 0.3s ease; */
}

/* Hover effect removed to stabilize layout
.card-style:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
} 
*/

/* Gradient Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4A00E0 0%, #8E2DE2 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
    background: #ccc !important;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: linear-gradient(119deg, #11998e 0%, #38ef7d 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: linear-gradient(119deg, #EB3349 0%, #F45C43 100%) !important;
    border: none !important;
}

/* Selectable Cards (Wizard) */
.wizard-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 2px solid transparent;
    overflow: hidden;
}

.wizard-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.wizard-card.border-primary {
    border-color: #8E2DE2 !important;
    box-shadow: 0 0 0 4px rgba(142, 45, 226, 0.2) !important;
}

.wizard-card .card-overlay {
    background: rgba(0, 0, 0, 0.55) !important;
}

.wizard-card.selectable-mini::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.52) 55%, rgba(0, 0, 0, 0.38) 100%);
}

.wizard-card.selectable-mini .card-body {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
}

.wizard-card.selectable-mini .card-title,
.wizard-card.selectable-mini .text-sm {
    color: #fff !important;
}

.wizard-settings-stack {
    border: 1px solid #dee2e6;
    padding: 1rem;
}

.wizard-settings-section + .wizard-settings-section {
    border-top: 1px solid #e5ebf7;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

.wizard-settings-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.wizard-settings-section-title h6 {
    margin: 0;
    color: #1A2142;
    font-weight: 700;
}

.template-readonly-html {
    min-height: 220px;
    padding: 18px;
    border: 1px solid #dce3f4;
    border-radius: 8px;
    background: #ffffff;
    color: #24304f;
    overflow-x: auto;
}

.template-readonly-html > *:first-child {
    margin-top: 0;
}

.template-readonly-html > *:last-child {
    margin-bottom: 0;
}

.template-readonly-html img {
    max-width: 100%;
    height: auto;
}

.template-readonly-loading,
.template-readonly-empty {
    color: #6b7898;
    font-style: italic;
}

/* Sidebar Improvements */
.sidebar-nav-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05);
}

.sidebar-nav ul .nav-item a.active {
    background: rgba(142, 45, 226, 0.1);
    color: #4A00E0;
    border-radius: 8px;
}

.sidebar-nav ul .nav-item a.active .icon {
    color: #4A00E0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}

/* Table Improvements */
.table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    color: #8898aa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 12px 24px;
    border-bottom: 1px solid #e9ecef;
    border-top: none;
}

.table tbody tr {
    background: white;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #fbfbfb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 1;
    position: relative;
}

.table td {
    vertical-align: middle;
    padding: 16px 24px;
    font-size: 0.9rem;
    color: #525f7f;
    border: none;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.status-badge.new {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.status-badge.active {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.status-badge.completed {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.status-badge.abandoned {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-badge.interrupted {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Action Buttons */
.btn-icon-only {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-icon-only:hover {
    background-color: #e9ecef;
    transform: scale(1.1);
}

/* Dashboard Stats Cards */
.stat-card {
    display: flex;
    align-items: center;
    padding: 30px;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.primary-gradient {
    background: linear-gradient(135deg, #4A00E0 0%, #8E2DE2 100%);
}

.success-gradient {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.warning-gradient {
    background: linear-gradient(135deg, #fce38a 0%, #f38181 100%);
}

.text-gray {
    color: #8898aa;
}

.btn-primary-outline {
    border: 1px solid #4A00E0;
    color: #4A00E0;
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s;
    background: transparent;
}


.btn-primary-outline:hover {
    background: #4A00E0;
    color: white;
}

/* Clickable Rows */
.clickable-row {
    cursor: pointer;
}

/* Secondary Icon Button (Chevron) */
.btn-icon-secondary {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #8898aa;
    transition: all 0.2s;
    background: transparent;
    border: 1px solid transparent;
}


.btn-icon-secondary:hover {
    color: #4A00E0;
    background-color: rgba(74, 0, 224, 0.1);
    transform: translateX(3px);
}

/* Filter Styles */
.filter-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    border: 1px solid #f0f2f5;
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4A00E0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.filter-title i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.form-control-modern,
.form-select-modern {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: all 0.2s;
    background-color: #fcfcfc;
    width: 100%;
}

.form-control-modern:focus,
.form-select-modern:focus {
    border-color: #4A00E0;
    box-shadow: 0 0 0 3px rgba(74, 0, 224, 0.1);
    background-color: white;
    outline: none;
}

.form-label-modern {
    font-size: 0.8rem;
    font-weight: 600;
    color: #525f7f;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8898aa;
    pointer-events: none;
}

/* Modern Header Design */
.title-wrapper {
    background: linear-gradient(135deg, #4A00E0 0%, #8E2DE2 100%);
    padding: 20px 30px;
    /* Reduced padding */
    border-radius: 16px;
    margin-bottom: 30px;
    margin-top: 20px;
    /* Added top margin */
    box-shadow: 0 10px 30px rgba(74, 0, 224, 0.15);
    position: relative;
    overflow: hidden;
    color: white;
}

.title-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 400;
}

/* Decorative background shapes */
.title-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.title-wrapper::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.title-wrapper .title h2 {
    color: #ffffff !important;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 1.75rem;
}

.breadcrumb-wrapper .breadcrumb .breadcrumb-item {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8) !important;
}

.breadcrumb-wrapper .breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s;
    text-decoration: none;
}

.breadcrumb-wrapper .breadcrumb .breadcrumb-item a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.breadcrumb-wrapper .breadcrumb .breadcrumb-item.active {
    color: #ffffff !important;
    font-weight: 700;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Plan theme colors and lock badges */
.plan-theme-free {
    --plan-color: #64748b;
    --plan-soft: #f1f5f9;
    --plan-border: #cbd5e1;
}

.plan-theme-standard {
    --plan-color: #2563eb;
    --plan-soft: #eff6ff;
    --plan-border: #bfdbfe;
}

.plan-theme-pro {
    --plan-color: #7c3aed;
    --plan-soft: #f5f3ff;
    --plan-border: #ddd6fe;
}

.plan-theme-enterprise {
    --plan-color: #d97706;
    --plan-soft: #fffbeb;
    --plan-border: #fde68a;
}

.plan-lock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 999px;
    border: 1px solid var(--plan-border, #d1d5db);
    background: var(--plan-soft, #f8fafc);
    color: var(--plan-color, #475569);
    font-size: 11px;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
}

.plan-lock-badge i {
    margin: 0;
    font-size: 12px;
    line-height: 1;
}

.sidebar-nav-wrapper .sidebar-nav ul .nav-item.nav-item-has-children ul li a .plan-lock-badge {
    margin-left: 6px !important;
}

.sidebar-nav-wrapper .sidebar-nav ul .nav-item.nav-item-has-children ul li a .plan-lock-badge i {
    margin: 0;
    font-size: 12px;
    line-height: 1;
}

.sidebar-nav-wrapper .sidebar-nav ul .nav-item.nav-item-has-children ul li .locked-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.35;
    color: #9aa4c2;
    cursor: not-allowed;
    user-select: none;
}

.sidebar-nav-wrapper .sidebar-nav ul .nav-item.nav-item-has-children ul li .locked-nav-link .plan-lock-badge {
    margin-left: 6px !important;
}

.sidebar-nav-wrapper .sidebar-nav ul .nav-item.nav-item-has-children ul li .locked-nav-link .plan-lock-badge i {
    margin: 0;
    font-size: 12px;
    line-height: 1;
}

.plan-tier-card {
    border: 1px solid #e5ebf7;
    border-top: 4px solid var(--plan-border, #d1d5db);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.plan-tier-card.plan-is-active {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
    border-color: var(--plan-border, #d1d5db);
}

.plan-tier-card .plan-tier-title {
    color: var(--plan-color, #1f2937);
}

.plan-vat-note {
    color: #7c86a2;
    font-size: 12px;
    font-weight: 600;
}

.plan-empty-action {
    display: block;
    min-height: 46px;
}

.plan-tier-card .plan-select-btn,
.plan-tier-card .plan-active-badge {
    width: 100%;
    min-height: 46px;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 24px;
}

.plan-active-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--plan-color, #2563eb);
}

.plan-tier-card .plan-active-badge {
    padding: 10px 20px;
    font-size: 14px;
    line-height: 24px;
}

.legal-content-card {
    padding: 32px 36px;
}

.faq-content-card {
    padding: 30px 34px;
}

.faq-doc {
    max-width: 1080px;
    color: #3d4968;
}

.faq-doc h1 {
    margin: 0 0 10px;
    color: #17213f;
    font-size: 1.95rem;
    line-height: 1.2;
    font-weight: 700;
}

.faq-doc > p {
    margin: 0 0 24px;
    color: #5b6683;
    font-size: 1rem;
    line-height: 1.7;
}

.faq-section {
    padding: 22px 0 8px;
    border-top: 1px solid #e8edff;
}

.faq-section:first-of-type {
    border-top: 0;
    padding-top: 4px;
}

.faq-section h3 {
    margin: 0 0 14px;
    color: #17213f;
    font-size: 1.28rem;
    line-height: 1.35;
    font-weight: 700;
}

.faq-item {
    padding: 16px 0;
    border-top: 1px solid #edf1fb;
}

.faq-section h3 + .faq-item {
    border-top: 0;
    padding-top: 4px;
}

.faq-accordion {
    overflow: hidden;
    border: 1px solid #e2e9f8;
    border-radius: 10px;
    background: #fff;
}

.faq-accordion-item + .faq-accordion-item {
    border-top: 1px solid #edf1fb;
}

.faq-question-button {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 0;
    background: #f9fbff;
    color: #24304f;
    font-size: 1.02rem;
    line-height: 1.45;
    font-weight: 700;
    text-align: left;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.faq-question-button:hover,
.faq-question-button:not(.collapsed) {
    background: #eef4ff;
    color: #2451d6;
}

.faq-question-button:focus {
    outline: 2px solid rgba(37, 99, 235, 0.25);
    outline-offset: -2px;
}

.faq-question-button::after {
    content: "+";
    flex: 0 0 auto;
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e8eefc;
    color: #3156c7;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

.faq-question-button:not(.collapsed)::after {
    content: "-";
    background: #3156c7;
    color: #fff;
}

.faq-answer {
    background: #fff;
}

.faq-answer-body {
    padding: 14px 18px 18px;
    border-top: 1px solid #edf1fb;
}

.faq-answer-body p {
    margin: 0;
    color: #4d5a78;
    font-size: 0.98rem;
    line-height: 1.7;
}

.faq-answer-body ul,
.faq-answer-body ol {
    margin: 8px 0 0 1.25rem;
    padding-left: 1rem;
}

.faq-answer-body li {
    margin: 0 0 6px;
    color: #4d5a78;
    line-height: 1.65;
}

.faq-item h4 {
    margin: 0 0 8px;
    color: #24304f;
    font-size: 1.03rem;
    line-height: 1.45;
    font-weight: 700;
}

.faq-item p {
    margin: 0;
    color: #4d5a78;
    font-size: 0.98rem;
    line-height: 1.7;
}

.faq-item ul,
.faq-item ol {
    margin: 8px 0 0 1.25rem;
    padding-left: 1rem;
}

.faq-item li {
    margin: 0 0 6px;
    color: #4d5a78;
    line-height: 1.65;
}

.legal-doc {
    max-width: 1080px;
    color: #3d4968;
    font-size: 1rem;
    line-height: 1.75;
}

.legal-doc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 18px;
}

.legal-doc-title {
    margin: 0;
    color: #17213f;
    font-size: 1.95rem;
    line-height: 1.2;
    font-weight: 700;
}

.legal-doc-updated {
    flex: 0 0 auto;
    margin-top: 7px;
    color: #74809d;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.legal-doc p {
    margin: 0 0 16px;
    color: #4d5a78;
    font-size: 1rem;
    line-height: 1.75;
}

.legal-doc strong {
    color: #283553;
    font-weight: 700;
}

.legal-section {
    padding: 22px 0 18px;
    border-top: 1px solid #e8edff;
}

.legal-section h3 {
    margin: 0 0 12px;
    color: #17213f;
    font-size: 1.32rem;
    line-height: 1.35;
    font-weight: 700;
}

.legal-doc ul,
.legal-doc ol {
    margin: 0 0 16px 1.35rem;
    padding-left: 1.1rem;
}

.legal-doc ul {
    list-style-type: disc;
}

.legal-doc ol {
    list-style-type: decimal;
}

.legal-doc li {
    margin: 0 0 9px;
    color: #4d5a78;
    line-height: 1.7;
}

.legal-doc > *:last-child,
.legal-section > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .title-wrapper {
        padding: 16px 18px;
        margin-top: 12px;
        margin-bottom: 18px;
        border-radius: 14px;
    }

    .title-wrapper .title h2 {
        font-size: 1.5rem;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table,
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
        width: 100%;
    }

    .mobile-card-table tr {
        background: #fff;
        border: 1px solid #e8edf7;
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    }

    .mobile-card-table td {
        border: 0;
        padding: 6px 0;
    }

    .mobile-card-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: #7b89a8;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .mobile-card-table td.text-end {
        text-align: left !important;
    }

    .mobile-card-table .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .legal-content-card {
        padding: 22px 18px;
    }

    .faq-content-card {
        padding: 22px 18px;
    }

    .faq-doc h1 {
        font-size: 1.55rem;
    }

    .faq-section h3 {
        font-size: 1.14rem;
    }

    .faq-item h4 {
        font-size: 1rem;
    }

    .faq-question-button {
        min-height: 52px;
        padding: 13px 14px;
        gap: 12px;
        font-size: 0.98rem;
    }

    .faq-answer-body {
        padding: 13px 14px 16px;
    }

    .legal-doc-title {
        font-size: 1.55rem;
    }

    .legal-doc-header {
        display: block;
    }

    .legal-doc-updated {
        margin-top: 8px;
        text-align: left;
        white-space: normal;
    }

    .legal-section h3 {
        font-size: 1.15rem;
    }
}

