/**
 * OZD Advanced Analytics — Frontend Styles
 */

.ozd-analytics {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
}

.ozd-track-indicator {
    position: fixed;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 180, 120, 0.12);
    border: 1px solid rgba(0, 180, 120, 0.25);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    color: #008840;
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
    z-index: 99999;
}

.ozd-track-indicator .ozd-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #00c853;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.ozd-analytics-live {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.ozd-analytics-live__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.ozd-analytics-live__title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.ozd-analytics-live__filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ozd-analytics-live__filter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ozd-analytics-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e2e8e4;
    border-radius: 10px;
    overflow: hidden;
}

.ozd-analytics-table th {
    background: #f8faf9;
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ozd-analytics-table td {
    padding: 12px 14px;
    border-top: 1px solid #e2e8e4;
    font-size: 14px;
}

.ozd-analytics-table tr:hover {
    background: #f8faf9;
}

.ozd-analytics-table .stat-number {
    font-weight: 600;
    color: #111;
}

.ozd-form {
    background: #fff;
    border: 1px solid #e2e8e4;
    border-radius: 10px;
    padding: 20px;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #008840;
    color: #fff;
}

.btn-primary:hover {
    background: #006b33;
}

.btn-secondary {
    background: #e2e8e4;
    color: #374151;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    border-color: #008840;
    color: #008840;
}

.ozd-flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.ozd-flash-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.ozd-flash-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ozd-flash-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ozd-flash-info {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #075985;
}

@media (max-width: 768px) {
    .ozd-analytics-live__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ozd-analytics-live__stats {
        grid-template-columns: 1fr;
    }

    .ozd-analytics-table {
        overflow-x: auto;
    }
}

.ozd-chart-placeholder {
    height: 200px;
    background: #f8faf9;
    border: 1px solid #e2e8e4;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
}

.ozd-text-small {
    font-size: 12px;
    color: #6b7280;
}


.ozd-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.ozd-form input[type="text"],
.ozd-form input[type="number"],
.ozd-form select,
.ozd-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111;
    background: #fff;
    transition: border-color 0.2s;
}

.ozd-form input:focus,
.ozd-form select:focus,
.ozd-form textarea:focus {
    outline: none;
    border-color: #008840;
    box-shadow: 0 0 0 3px rgba(0, 136, 64, 0.12);
}

.ozd-form .row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ozd-form .col {
    flex: 1;
    min-width: 200px;
}

.ozd-form .actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: flex-end;
}


.ozd-analytics-live__filter:hover,
.ozd-analytics-live__filter.active {
    border-color: #008840;
}

.ozd-analytics-live__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ozd-analytics-live__stat {
    background: #f8faf9;
    border: 1px solid #e2e8e4;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ozd-analytics-live__stat-label {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ozd-analytics-live__stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111;
}

.ozd-analytics-live__stat-change {
    font-size: 13px;
    color: #6b7280;
}

.ozd-analytics-live__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ozd-analytics-live__card {
    background: #fff;
    border: 1px solid #e2e8e4;
    border-radius: 10px;
    padding: 18px;
}

.ozd-analytics-live__card-title {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
}

.ozd-analytics-funnel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.ozd-analytics-funnel__step {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ozd-analytics-funnel__step-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.ozd-analytics-funnel__step-bar {
    height: 12px;
    border-radius: 6px;
    background: #e2e8e4;
    overflow: hidden;
}

.ozd-analytics-funnel__step-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #008840, #00c853);
    transition: width 0.6s ease;
}
