/**
 * Growffinity CRM Admin Styles
 */

.growffinity-admin-wrap {
    max-width: 1200px;
    margin: 20px 0;
}

.growffinity-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
    margin-bottom: 30px;
}

.growffinity-card-header {
    padding: 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px 4px 0 0;
}

.growffinity-card-header h2 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 24px;
}

.growffinity-card-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.growffinity-card-body {
    padding: 30px;
}

.growffinity-form .form-group {
    margin-bottom: 25px;
}

.growffinity-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
}

.growffinity-form input[type="email"],
.growffinity-form input[type="password"],
.growffinity-form input[type="text"] {
    width: 100%;
    max-width: 400px;
}

.growffinity-form .description {
    margin: 5px 0 0 0;
    color: #666;
}

.form-actions {
    margin-top: 30px;
}

.button-hero .dashicons {
    margin-right: 5px;
    vertical-align: middle;
}

.growffinity-notice {
    margin-top: 20px;
    padding: 15px;
    border-left: 4px solid #00a0d2;
    background: #f0f6fc;
    border-radius: 3px;
}

.growffinity-notice.error {
    border-left-color: #dc3232;
    background: #fef7f7;
}

.growffinity-notice.success {
    border-left-color: #46b450;
    background: #f7fcf7;
}

.growffinity-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Features Section */
.growffinity-features {
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    border: 1px solid #ccd0d4;
    margin-bottom: 30px;
}

.growffinity-features h2 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
}

.feature-item .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.feature-item h3 {
    margin: 10px 0;
    font-size: 18px;
}

.feature-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Connected State */
.growffinity-connected .status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.growffinity-connected .status-indicator .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.status-text {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.connection-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-weight: 600;
    color: #555;
}

.info-row .value {
    color: #23282d;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.sync-info {
    background: #f0f6fc;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #00a0d2;
    margin-bottom: 25px;
}

.sync-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.sync-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-info .dashicons {
    color: #46b450;
}

.disconnect-section {
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Stats Section */
.growffinity-stats {
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    border: 1px solid #ccd0d4;
}

.growffinity-stats h2 {
    margin-top: 0;
    text-align: center;
}

.upgrade-cta {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    color: white;
}

.upgrade-cta p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

.upgrade-cta .button-primary {
    background: white;
    border-color: white;
    color: #667eea;
    font-weight: 600;
}

.upgrade-cta .button-primary:hover {
    background: #f5f5f5;
    border-color: #f5f5f5;
}

/* Loading State */
.button.loading {
    opacity: 0.6;
    pointer-events: none;
}

.button.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 782px) {
    .growffinity-card-body {
        padding: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .button {
        width: 100%;
    }
}
