/**
 * CartResQ Admin Dashboard Styles
 * Complete styling for the dashboard, stat cards, charts, and all elements
 */

/* Base Styles */
.cartresq-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: #f8fafc;
    min-height: 100vh;
    padding: 20px;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.dashboard-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

.stat-card:active {
    transform: translateY(0);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.stat-card.total-carts::before { background: linear-gradient(90deg, #10b981, #059669); }
.stat-card.abandoned-carts::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-card.recovered-carts::before { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.stat-card.recovery-rate::before { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    text-align: center;
}

.stat-card .stat-content {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.chart-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-container {
    position: relative;
    height: 250px;
    margin-bottom: 1.5rem;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

.legend-color.active { background: #10b981; }
.legend-color.abandoned { background: #f59e0b; }
.legend-color.recovered { background: #3b82f6; }

.threshold-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #0369a1;
    font-size: 0.875rem;
}

.chart-actions {
    text-align: center;
}

.chart-actions .button {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-actions .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(16 185 129 / 0.4);
}

.chart-actions .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chart-actions .button .dashicons {
    font-size: 1.1rem;
}

/* Dashboard Options */
.dashboard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Make Store Info card span full width */
.option-card.store-info {
    grid-column: 1 / -1;
}

.option-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

.option-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-card p {
    margin: 0 0 1rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

.option-card .btn {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.option-card .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(59 130 246 / 0.4);
    color: white;
}

/* Store Info */
.store-info-list {
    margin-top: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.info-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.info-value {
    color: #6b7280;
    font-size: 0.875rem;
}

.info-value a {
    color: #3b82f6;
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

/* Recent Carts Section */
.recent-carts-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.recent-carts-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Users Table */
.users-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

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

.users-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.users-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.users-table tr:hover {
    background: #f9fafb;
}

.users-table tr:last-child td {
    border-bottom: none;
}

.no-users {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-style: italic;
}

/* API Keys Page Styles */
.cartresq-api-page {
    max-width: 800px;
    margin: 0 auto;
}

.cartresq-admin-page {
    max-width: 1200px;
    margin: 0 auto;
}

.api-keys-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.api-keys-card h2 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-keys-form {
    margin-bottom: 2rem;
}

.form-row {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-row input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #f8fafc;
    color: #6b7280;
    font-family: 'Courier New', monospace;
    padding-right: 3rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-row .copy-button:hover {
    background: #1d4ed8;
}

.form-row .copy-button .dashicons {
    font-size: 1rem;
}

.api-keys-info-card {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #0369a1;
}

.api-keys-info-card .info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.api-keys-info-card h3 {
    margin: 0 0 1rem 0;
    color: #0369a1;
}

.api-keys-info-card p {
    margin: 0 0 0.5rem 0;
    line-height: 1.6;
}

.api-keys-info-card .info-note {
    font-style: italic;
    opacity: 0.8;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #bae6fd;
}

/* Reports Page Styles */
.cartresq-date-filter {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.cartresq-date-filter h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cartresq-date-filter form {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.cartresq-date-filter select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 150px;
}

.cartresq-date-filter .button {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cartresq-date-filter .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(59 130 246 / 0.4);
}

.date-range-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 1rem;
    color: #0369a1;
    font-size: 0.875rem;
}

.cartresq-reports-summary {
    margin-bottom: 2rem;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.report-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    text-align: center;
    transition: all 0.3s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

.report-card h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.report-card .report-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.report-card p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.cartresq-reports-chart {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.cartresq-reports-chart h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cartresq-reports-export {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.cartresq-reports-export h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.export-buttons .button {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.export-buttons .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(16 185 129 / 0.4);
    color: white;
}

/* Logs Page Styles */
.cartresq-logs-summary {
    margin-bottom: 2rem;
}

.log-summary-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.log-summary-card h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.log-summary-content p {
    margin: 0 0 0.5rem 0;
    color: #6b7280;
}

.log-summary-content p:last-child {
    margin-bottom: 0;
}

.log-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.log-status.status-idle {
    background: #fef3c7;
    color: #92400e;
}

.log-status.status-syncing {
    background: #dbeafe;
    color: #1e40af;
}

.log-status.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.log-status.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.cartresq-logs-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cartresq-logs-controls .button {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cartresq-logs-controls .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(59 130 246 / 0.4);
}

.cartresq-logs-controls .button:nth-child(2) {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.cartresq-logs-controls .button:nth-child(3) {
    background: linear-gradient(135deg, #10b981, #059669);
}

.cartresq-logs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.no-logs-message {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.no-logs-message p {
    margin: 0 0 0.5rem 0;
}

.no-logs-message p:last-child {
    margin-bottom: 0;
    font-style: italic;
}

/* Settings Page Styles */
.cartresq-settings-page {
    max-width: 1000px;
    margin: 0 auto;
}

.settings-overview-banner {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-overview-banner .banner-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.settings-overview-banner .banner-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.settings-overview-banner .banner-content p {
    margin: 0;
    opacity: 0.9;
    line-height: 1.6;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.settings-section h2 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.settings-form {
    margin-bottom: 2rem;
}

.settings-form .form-row {
    margin-bottom: 1.5rem;
}

.settings-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.settings-form input[type="text"],
.settings-form input[type="number"],
.settings-form input[type="email"],
.settings-form select,
.settings-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.settings-form input[type="text"]:focus,
.settings-form input[type="number"]:focus,
.settings-form input[type="email"]:focus,
.settings-form select:focus,
.settings-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.settings-form input[type="checkbox"] {
    margin-right: 0.5rem;
}

.settings-form .checkbox-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.settings-form .checkbox-row label {
    margin-bottom: 0;
    margin-left: 0.5rem;
    cursor: pointer;
}

.settings-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.settings-actions .button {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-actions .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(16 185 129 / 0.4);
}

.settings-actions .button-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.settings-actions .button-secondary:hover {
    box-shadow: 0 4px 12px rgb(107 114 128 / 0.4);
}

/* Help and Support Page Styles */
.cartresq-help-page {
    max-width: 1200px;
    margin: 0 auto;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.help-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.help-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

.help-card h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.help-card .card-icon {
    color: #8b5cf6;
    font-size: 1.5rem;
}

.help-card ol, .help-card ul {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.help-card li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.help-card p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.help-card p:last-child {
    margin-bottom: 0;
}

.help-card a {
    color: #3b82f6;
    text-decoration: none;
}

.help-card a:hover {
    text-decoration: underline;
}

.help-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.help-section h2 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.help-content {
    line-height: 1.7;
    color: #374151;
}

.help-content h3 {
    color: #1e293b;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.125rem;
}

.help-content p {
    margin: 0 0 1rem 0;
}

.help-content ul, .help-content ol {
    margin: 0 0 1rem 1.5rem;
}

.help-content li {
    margin-bottom: 0.5rem;
}

.help-content code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #dc2626;
}

.help-content .highlight-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #0369a1;
}

.help-content .warning-box {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #92400e;
}

.help-content .success-box {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #065f46;
}

.api-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.api-section h2 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-form {
    margin-bottom: 2rem;
}

.form-row {
    margin-bottom: 1rem;
}

.form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-row input[type="text"],
.form-row input[type="password"],
.form-row select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.form-row input[type="text"]:focus,
.form-row input[type="password"]:focus,
.form-row select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.api-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.api-actions .button {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.api-actions .button-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.api-actions .button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(16 185 129 / 0.4);
}

.api-actions .button-secondary {
    background: #6b7280;
    color: white;
}

.api-actions .button-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.api-actions .button-danger {
    background: #ef4444;
    color: white;
}

.api-actions .button-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Key Display */
.key-display {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.key-display input {
    background: transparent;
    border: none;
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #374151;
    padding: 0;
}

.key-display input:focus {
    outline: none;
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: #1d4ed8;
}

.copy-button.copied {
    background: #10b981;
}

/* Status Messages */
.status-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.status-message.success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.status-message.error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.status-message.info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

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

.rotating {
    animation: rotate 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .cartresq-dashboard {
        padding: 10px;
    }
    
    .dashboard-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-header p {
        font-size: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    .stat-card .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.25rem;
    }
    
    .dashboard-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.5rem;
        min-height: 80px;
    }
    
    .stat-card .stat-icon {
        font-size: 1.25rem;
    }
    
    .stat-card .stat-number {
        font-size: 1rem;
    }
    
    .chart-container {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .chart-legend {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .api-actions {
        flex-direction: column;
    }
    
    .api-actions .button {
        width: 100%;
        text-align: center;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .settings-overview-banner {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
}