/* Admin CSS for MasterAI */

/* Dashboard Header */
.masterai-dashboard h1 {
    font-weight: 700;
    color: #1d2327;
    margin-bottom: 20px;
}

/* Welcome Panel */
.masterai-welcome-panel {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #72aee6;
    margin-top: 20px;
    padding: 30px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.masterai-welcome-panel h2 {
    margin-top: 0;
    font-size: 24px;
    font-weight: 600;
}

.about-description {
    font-size: 16px;
    color: #50575e;
    margin-bottom: 30px !important;
}

.masterai-welcome-panel-column-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.masterai-welcome-panel-column h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.masterai-welcome-panel-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.masterai-welcome-panel-column li {
    margin-bottom: 10px;
}

.masterai-welcome-panel-column a {
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.masterai-welcome-icon {
    margin-right: 8px;
    color: #72aee6;
}

/* Buttons */
.masterai-button-hero {
    display: block;
    text-align: center;
    margin-bottom: 10px !important;
    font-size: 16px !important;
    padding: 10px 20px !important;
    height: auto !important;
    line-height: normal !important;
}

/* Info Box */
.masterai-info-box {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
}

.masterai-info-box-icon {
    margin-right: 15px;
    font-size: 30px;
    color: #2271b1;
}

.masterai-info-box-icon .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
}

.masterai-info-box-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Launch Checklist */
.masterai-launch-checklist {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 20px;
    margin-top: 20px;
}

.masterai-progress-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.masterai-progress-bar {
    width: 100%;
    /* height: 20px; */
    /* background: #f0f0f1; */
    border-radius: 10px;
    margin-right: 15px;
}

.masterai-progress-fill {
    height: 100%;
    background: #2271b1;
    transition: width 0.3s ease;
}

.masterai-progress-text {
    white-space: nowrap;
    font-weight: 600;
}

.masterai-checklist-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.masterai-checklist-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1;
}

.masterai-checklist-item:last-child {
    border-bottom: none;
}

.masterai-checklist-item .dashicons {
    margin-right: 10px;
    font-size: 20px;
}

.masterai-checklist-item.completed .dashicons {
    color: #46b450;
}

.masterai-checklist-item.pending .dashicons {
    color: #d63638;
}

.masterai-checklist-item .checklist-label {
    flex-grow: 1;
    font-size: 14px;
}

.masterai-checklist-item.completed .checklist-label {
    text-decoration: line-through;
    color: #8c8f94;
}

.action-button {
    margin-left: 10px;
}

/* Demo Content Page */
.masterai-demo-content-box {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 20px;
    margin-top: 20px;
}

.masterai-demo-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.demo-option {
    background: #f6f7f7;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

.demo-option h4 {
    margin-top: 0;
}

/* Settings Page */
.masterai-color-field {
    width: 100px;
}

/* Legal Pages Widget */
.masterai-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 0;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.masterai-legal-actions {
    display: flex;
    align-items: center;
}

/*
.masterai-quick-stats replaced by .masterai-daily-snapshot
*/
/* Daily Snapshot */
.masterai-daily-snapshot {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.masterai-daily-snapshot h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.masterai-date-badge {
    font-size: 0.7em;
    background: #f0f0f1;
    color: #646970;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: normal;
}

.masterai-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.masterai-snapshot-card {
    background: #f6f7f7;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.masterai-snapshot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    background: #fff;
    border: 1px solid #f0f0f1;
}

.snapshot-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #2271b1;
    /* WP Blue */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.masterai-snapshot-card.sales-card .snapshot-icon {
    color: #00a32a;
    background: #e6f8ea;
}

/* Green */
.masterai-snapshot-card.orders-card .snapshot-icon {
    color: #d63638;
    background: #fbeaea;
}

/* Red/Pink */
.masterai-snapshot-card.product-card .snapshot-icon {
    color: #dba617;
    background: #fdf5d5;
}

/* Gold */

.snapshot-content {
    display: flex;
    flex-direction: column;
}

.snapshot-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.snapshot-value {
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.2;
}

.snapshot-value.product-name {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.snapshot-meta {
    font-size: 12px;
    color: #8c8f94;
    margin-top: 2px;
}

/* Dashboard Layout (New) */
.masterai-dashboard-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
}

.masterai-layout-main {
    flex: 3;
    /* 75% width */
    min-width: 0;
}

.masterai-layout-side {
    flex: 1;
    /* 25% width */
    min-width: 300px;
}

/* Adjustments for grid items */
.masterai-layout-main .masterai-welcome-panel,
.masterai-layout-main .masterai-info-box,
.masterai-layout-main .masterai-legal-pages-widget,
.masterai-layout-main .masterai-enhancements-widget {
    margin-top: 20px;
}

/* Remove top margin for first item */
.masterai-layout-main .masterai-welcome-panel {
    margin-top: 0;
}

.masterai-layout-side .masterai-launch-checklist,
.masterai-layout-side .masterai-daily-snapshot {
    margin-top: 20px;
}

/* Remove top margin for first item in sidebar */
.masterai-layout-side .masterai-launch-checklist {
    margin-top: 0;
}

/* Fix Snapshot Grid in Sidebar */
.masterai-layout-side .masterai-snapshot-grid {
    grid-template-columns: 1fr;
    /* Stack vertically in sidebar */
    gap: 15px;
}

/* Compact Welcome Panel */
.masterai-welcome-panel {
    padding-bottom: 20px;
}

.about-description {
    margin-bottom: 20px !important;
}

/* Responsive */
@media screen and (max-width: 1080px) {
    .masterai-dashboard-layout {
        flex-direction: column;
    }

    .masterai-layout-side .masterai-snapshot-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Back to 3 columns when stacked mobile */
    }
}

@media screen and (max-width: 600px) {
    .masterai-layout-side .masterai-snapshot-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

/* Dashboard Tabs */
.masterai-feature-tabs {
    margin-top: 20px;
}

.masterai-tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #c3c4c7;
}

.masterai-tabs-nav li {
    margin-bottom: -1px;
    margin-right: 5px;
}

.masterai-tabs-nav li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #2271b1;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-bottom-color: #c3c4c7;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    outline: none;
    box-shadow: none;
}

.masterai-tabs-nav li.active a {
    background: #f0f0f1;
    border-bottom-color: #f0f0f1;
    color: #1d2327;
    cursor: default;
}

.masterai-tabs-nav li a:hover {
    background: #fff;
}

.masterai-tabs-nav li.active a:hover {
    background: #f0f0f1;
}

.masterai-tab-content {
    display: none;
}

.masterai-tab-content.active {
    display: block;
}

/* Tab Content Spacing */
.masterai-tab-content .masterai-card,
.masterai-tab-content .masterai-demo-content-box {
    margin-top: 0 !important;
    border-top: 0;
    border-radius: 0 4px 4px 4px;
}

/* Welcome Panel Redesign */
.masterai-welcome-hero {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f1;
}

.masterai-welcome-hero .masterai-button-hero {
    display: inline-block;
    font-size: 16px;
    padding: 10px 25px;
    height: auto;
    margin-top: 10px;
}

.masterai-welcome-grid-bottom {
    display: flex;
    gap: 30px;
}

.masterai-welcome-actions-col {
    flex: 1;
    /* Left side */
}

.masterai-welcome-preview-col {
    flex: 1.2;
    /* Right preview side (slightly wider) */
}

.masterai-action-group {
    margin-bottom: 25px;
}

.masterai-action-group h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1d2327;
}

.masterai-action-group ul {
    margin: 0;
    padding-left: 28px;
    /* Align with text start */
}

.masterai-action-group li {
    margin-bottom: 8px;
}

.masterai-action-group a {
    text-decoration: none;
    font-size: 14px;
    color: #2271b1;
}

/* Mock Browser Window for Preview */
.masterai-mock-browser {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.masterai-browser-bar {
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.masterai-fake-url {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    margin-left: 10px;
    flex-grow: 1;
    font-size: 11px;
    color: #646970;
    padding: 2px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masterai-browser-content {
    flex-grow: 1;
    position: relative;
    background: #f0f0f1;
}

.masterai-browser-content iframe {
    width: 200%;
    /* Scale trick */
    height: 200%;
    transform: scale(0.5);
    transform-origin: 0 0;
    border: 0;
    pointer-events: none;
    /* Disable interaction */
}

.masterai-preview-overlay-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    color: #2271b1;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    border: 1px solid #2271b1;
}

.masterai-preview-overlay-btn:hover {
    background: #2271b1;
    color: #fff;
    transform: translate(-50%, -55%);
}

@media screen and (max-width: 960px) {
    .masterai-welcome-grid-bottom {
        flex-direction: column;
    }
}

/* Premium UI */
.masterai-upgrade-btn {
    transition: all 0.2s ease;
}

.masterai-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* Modal */
.masterai-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.masterai-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 700px;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: fcModalSlideIn 0.3s ease-out;
}

@keyframes fcModalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.masterai-modal-header {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.masterai-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.masterai-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.masterai-close:hover {
    color: #333;
}

.masterai-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    /* Take remaining space */
    min-height: 0;
    /* Crucial for nested flex scrolling */
}

.masterai-plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.masterai-plan-card {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.masterai-plan-card:hover {
    border-color: #6c5ce7;
    background: #fdfcff;
}

.masterai-plan-card.active {
    border-color: #6c5ce7;
    background: #fdfcff;
    position: relative;
}

.masterai-license-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.masterai-license-input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.masterai-license-input-group input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}



/* UPI Section */
.masterai-upi-section {
    display: none;
    margin-top: 25px;
    padding: 20px;
    background: #fdfdfd;
    border: 1px dashed #00a32a;
    border-radius: 8px;
    text-align: center;
}

.masterai-upi-qr {
    margin: 15px 0;
}

.masterai-upi-qr img {
    border: 5px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.masterai-upi-claim-form {
    margin-top: 20px;
    text-align: left;
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.masterai-upi-claim-form h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.masterai-upi-claim-form .form-group {
    margin-bottom: 15px;
}

.masterai-upi-claim-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.masterai-already-paid-link {
    margin-top: 15px;
    display: block;
    font-size: 13px;
    color: #6c5ce7;
    text-decoration: none;
}

.masterai-already-paid-link:hover {
    text-decoration: underline;
}

/* Premium Theme Overrides */
.masterai-premium-active .masterai-welcome-panel {
    border-left-color: #10b981;
}

.masterai-premium-active .masterai-welcome-icon,
.masterai-premium-active .masterai-info-box-icon,
.masterai-premium-active .masterai-info-box-icon .dashicons,
.masterai-premium-active .masterai-tabs-nav li a {
    color: #059669;
}

.masterai-premium-active .masterai-progress-fill {
    background: #059669;
}

.masterai-premium-active .snapshot-icon {
    color: #059669;
}

/* Premium Buttons */
.masterai-premium-active .button-primary {
    background: #10b981 !important;
    border-color: #059669 !important;
    color: #fff !important;
    text-shadow: none !important;
}

.masterai-premium-active .button-primary:hover,
.masterai-premium-active .button-primary:focus {
    background: #059669 !important;
    border-color: #047857 !important;
}

/* Premium Secondary Buttons */
.masterai-premium-active .button-secondary,
.masterai-premium-active .masterai-header-actions .button-secondary {
    color: #059669 !important;
    border-color: #059669 !important;
}

.masterai-premium-active .button-secondary:hover,
.masterai-premium-active .button-secondary:focus,
.masterai-premium-active .masterai-header-actions .button-secondary:hover {
    color: #047857 !important;
    border-color: #047857 !important;
    background: #ecfdf5 !important;
}