/* Gtraffio Public Styles */

#gtraffio-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f0f2f5;
    min-height: 500px;
    padding: 20px;
}

.gt-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.gt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.gt-header h2 {
    margin: 0;
    color: #1e293b;
}

.gt-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Metrics */
.gt-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gt-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gt-card h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

.gt-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gt-stat {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
}

.gt-sub {
    margin: 5px 0 0;
    font-size: 13px;
    color: #94a3b8;
}

.gt-up {
    color: #16a34a;
    font-weight: 500;
}

.gt-down {
    color: #dc2626;
    font-weight: 500;
}

.gt-top-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gt-top-list li {
    font-size: 14px;
    color: #334155;
    padding: 2px 0;
}

/* Charts */
.gt-charts-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gt-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gt-toggle button {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
}

.gt-toggle button:first-child {
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.gt-toggle button:last-child {
    border-radius: 0 6px 6px 0;
}

.gt-toggle button.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Table */
.gt-table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gt-table {
    width: 100%;
    border-collapse: collapse;
}

.gt-table th,
.gt-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.gt-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.gt-rank-up {
    color: #16a34a;
    font-size: 12px;
}

.gt-rank-down {
    color: #dc2626;
    font-size: 12px;
}

.gt-badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.gt-badge-green,
.gt-badge-recommended {
    background: #dcfce7;
    color: #166534;
}

.gt-badge-yellow,
.gt-badge-listed {
    background: #fef9c3;
    color: #854d0e;
}

.gt-badge-red,
.gt-badge-missing {
    background: #fee2e2;
    color: #991b1b;
}

.gt-btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #94a3b8;
}

/* Wizard */
.gt-wizard {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 700px;
    margin: 40px auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.gt-wizard-header {
    margin-bottom: 30px;
    text-align: center;
}

.gt-step {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gt-step input,
.gt-step select {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
}

.gt-step button {
    background: #2271b1;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.gt-step button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.gt-step button.secondary {
    background: #fff;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.gt-actions {
    display: flex;
    justify-content: space-between;
}

.gt-discovery-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.gt-btn-magic {
    flex: 1;
    background: linear-gradient(135deg, #6366f1, #a855f7) !important;
    color: white !important;
}

.gt-btn-spy {
    flex: 1;
    background: #334155 !important;
}

.gt-keyword-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 20px;
}

.gt-kw-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
}

/* Toolbox Overlay */
.gt-toolbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.gt-toolbox {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    min-width: 400px;
}

.gt-toolbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.gt-toolbox-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.gt-toolbox-actions button {
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-weight: 500;
}

.gt-toolbox-actions button:hover {
    background: #f8fafc;
}