/**
 * AGM User Dashboard Styles
 * Responsive and modern dashboard interface for API key management
 */

/* Dashboard Container */
.agm-dashboard {
    max-width: 1200px;
    min-width: 1150px; /* Wider to match conversion history tab */
    width: 100%; /* Ensure full width utilization */
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Dashboard Header */
.agm-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid #e9ecef;
}

.agm-dashboard-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.agm-dashboard-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

/* Navigation Tabs */
.agm-dashboard-nav {
    margin-bottom: 30px;
}

.agm-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.agm-tab {
    flex: 1;
    border-right: 1px solid #e9ecef;
}

.agm-tab:last-child {
    border-right: none;
}

.agm-tab a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.agm-tab.active a,
.agm-tab a:hover {
    color: #007cba;
    background: #f8f9fa;
    border-bottom-color: #007cba;
}

/* Tab Content */
.agm-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
    min-height: 600px; /* Consistent minimum height for all tabs */
    width: 100%; /* Ensure full width */
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Overview Tab */
.agm-overview {
    display: grid;
    gap: 30px;
    min-width: 100%; /* Ensure consistent width */
    box-sizing: border-box;
}

.agm-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force 4 columns to match conversion history */
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    min-width: 1100px; /* Ensure minimum width to match conversion history */
}

.agm-stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.agm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.agm-stat-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    opacity: 0.8;
}

.agm-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.agm-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
}

/* Quick Actions */
.agm-quick-actions {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agm-quick-actions h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.agm-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Recent Activity */
.agm-recent-activity {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agm-recent-activity h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.agm-activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.agm-activity-item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* API Keys Tab */
.agm-keys-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ensure consistent width */
    box-sizing: border-box;
    min-width: 1100px; /* Match conversion history width */
}

.agm-keys-header h3 {
    margin: 0;
    color: #2c3e50;
}

.agm-keys-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%; /* Consistent width */
    box-sizing: border-box;
    min-height: 400px; /* Taller to match conversion history */
    min-width: 1100px; /* Match conversion history width */
}

.agm-key-item {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

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

.agm-key-info h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.agm-key-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.agm-key-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.agm-key-status.active {
    background: #d4edda;
    color: #155724;
}

.agm-key-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.agm-key-actions {
    display: flex;
    gap: 10px;
}

.agm-key-value {
    font-family: monospace;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin: 10px 0;
    position: relative;
}

.agm-key-value.masked {
    cursor: pointer;
}

/* Usage Statistics */
.agm-usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%; /* Consistent width */
    box-sizing: border-box;
}

.agm-usage-filters {
    display: flex;
    gap: 15px;
}

.agm-usage-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Force 2 columns for consistent width */
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
    min-width: 1100px; /* Match conversion history width */
}

.agm-chart-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agm-chart-container h4 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
}

.agm-usage-summary {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    min-height: 200px;
    min-width: 1100px; /* Match conversion history width */
}

/* Documentation */
.agm-docs-section {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    min-height: 200px;
    min-width: 1100px; /* Match conversion history width */
}

.agm-docs-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.agm-docs-block {
    margin: 20px 0;
}

.agm-docs-block h4 {
    margin-bottom: 10px;
    color: #495057;
}

.agm-code-block {
    display: block;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    border-left: 4px solid #007cba;
    margin: 10px 0;
    overflow-x: auto;
    word-wrap: break-word; /* Responsive code blocks */
    white-space: pre-wrap; /* Preserve formatting but allow wrapping */
    max-width: 100%; /* Prevent overflow on mobile */
}

.agm-endpoint {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin: 15px 0;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.agm-endpoint-header {
    background: #f8f9fa;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.agm-method {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.agm-method-get {
    background: #d1ecf1;
    color: #0c5460;
}

.agm-method-post {
    background: #d4edda;
    color: #155724;
}

.agm-endpoint-path {
    font-family: monospace;
    font-weight: 500;
}

.agm-endpoint p {
    padding: 15px;
    margin: 0;
    color: #6c757d;
}

.agm-code-examples {
    display: grid;
    gap: 20px;
}

.agm-code-example h4 {
    margin-bottom: 10px;
    color: #495057;
}

.agm-code-example pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 0;
    max-width: 100%;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Buttons */
.agm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.agm-btn-primary {
    background: #007cba;
    color: #fff;
}

.agm-btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.agm-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.agm-btn-secondary:hover {
    background: #545b62;
}

.agm-btn-success {
    background: #28a745;
    color: #fff;
}

.agm-btn-success:hover {
    background: #1e7e34;
}

.agm-btn-danger {
    background: #dc3545;
    color: #fff;
}

.agm-btn-danger:hover {
    background: #c82333;
}

.agm-btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Form Elements */
.agm-form-group {
    margin-bottom: 20px;
}

.agm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.agm-form-group input,
.agm-form-group select,
.agm-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.agm-form-group input:focus,
.agm-form-group select:focus,
.agm-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.agm-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Modal */
.agm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.agm-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.agm-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.agm-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agm-modal-header h4 {
    margin: 0;
    color: #2c3e50;
}

.agm-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agm-modal-close:hover {
    color: #495057;
}

.agm-modal-body {
    padding: 25px;
}

/* Loading States */
.agm-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.agm-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top-color: #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Error States */
.agm-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
    margin: 10px 0;
}

.agm-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 4px;
    border-left: 4px solid #28a745;
    margin: 10px 0;
}

/* Login Required */
.agm-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agm-login-required a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.agm-login-required a:hover {
    text-decoration: underline;
}

/* Notifications */
.agm-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: #fff;
    font-weight: 500;
    z-index: 1001;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.agm-notification-success {
    background: #28a745;
}

.agm-notification-error {
    background: #dc3545;
}

.agm-notification-info {
    background: #007cba;
}

.agm-notification-warning {
    background: #ffc107;
    color: #212529;
}

.agm-notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    opacity: 0.8;
}

.agm-notification-close:hover {
    opacity: 1;
}

/* Empty State */
.agm-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.agm-empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Validation Messages */
.agm-validation-message {
    margin-top: 5px;
    font-size: 0.85rem;
}

/* Service Catalog */
.agm-service-catalog {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.agm-service-catalog h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.agm-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.agm-service-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.agm-service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #007cba;
}

.agm-service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.agm-service-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.agm-service-pricing {
    text-align: right;
}

.agm-token-cost {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #007cba;
}

.agm-free-tier {
    display: block;
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 500;
    margin-top: 2px;
}

.agm-service-description {
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.agm-service-meta {
    margin-bottom: 15px;
}

.agm-service-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.agm-service-stats span {
    font-size: 0.8rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
}

.agm-service-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Billing Section */
.agm-billing-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.agm-billing-section h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.agm-billing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.agm-billing-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.agm-billing-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agm-billing-card:hover::before {
    opacity: 1;
}

.agm-billing-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.agm-billing-amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
}

.agm-billing-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Documentation Enhancements */
.agm-docs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.agm-docs-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.agm-interactive-docs {
    padding: 25px;
}

.agm-docs-overview {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.agm-endpoint-card {
    margin: 15px 0;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.agm-endpoint-card .agm-endpoint-header {
    background: #f8f9fa;
    padding: 12px 15px;
}

.agm-endpoint-card p {
    padding: 15px;
    margin: 0;
    background: #fff;
}

.agm-service-doc {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.agm-service-doc h5 {
    margin-top: 0;
    color: #2c3e50;
}

.agm-markdown-docs {
    padding: 25px;
    background: #f8f9fa;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Code Examples Enhancements */
.agm-code-example {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent horizontal overflow */
}

.agm-code-example h4 {
    margin-bottom: 10px;
    color: #495057;
    font-size: 1rem;
}

.agm-code-example .agm-copy-code {
    position: absolute;
    top: 35px;
    right: 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.agm-code-example:hover .agm-copy-code {
    opacity: 1;
}

.agm-quick-reference {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    margin-bottom: 30px;
}

.agm-quick-reference h3,
.agm-quick-reference h4 {
    color: #fff;
}

.agm-quick-reference .agm-code-block {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    overflow-x: auto;
    max-width: 100%;
}

/* Select styling */
.agm-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
    color: #495057;
}

/* Desktop-specific fixes for consistent tab widths */
@media (min-width: 769px) {
    .agm-dashboard {
        min-width: 1150px !important; /* Match conversion history tab width */
    }
    
    .agm-tab-content {
        min-height: 600px !important; /* Consistent height on desktop only */
        min-width: 1100px; /* Ensure all tabs have same minimum width */
    }
    
    /* Force all grids to be consistent width */
    .agm-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        min-width: 1100px !important;
    }
    
    /* Ensure all major sections match conversion history width */
    .agm-keys-header,
    .agm-keys-list,
    .agm-usage-header,
    .agm-usage-charts,
    .agm-usage-summary,
    .agm-docs-section {
        min-width: 1100px !important;
    }
    
    /* Force usage charts to 2 columns for consistent width */
    .agm-usage-charts {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .agm-dashboard {
        padding: 15px;
        margin: 10px;
        min-width: auto; /* Remove desktop min-width on mobile */
        width: calc(100% - 20px); /* Account for margins */
    }
    
    .agm-dashboard-title {
        font-size: 2rem;
    }
    
    .agm-tabs {
        flex-direction: column;
    }
    
    .agm-tab {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .agm-tab:last-child {
        border-bottom: none;
    }
    
    .agm-stats-grid {
        grid-template-columns: 1fr;
        min-width: auto !important; /* Remove desktop constraints */
    }
    
    .agm-action-buttons {
        flex-direction: column;
    }
    
    .agm-keys-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .agm-key-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .agm-key-actions {
        justify-content: flex-start;
    }
    
    .agm-usage-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .agm-usage-charts {
        grid-template-columns: 1fr;
        min-width: auto !important; /* Remove desktop constraints */
    }
    
    /* Mobile responsive fixes for tab content */
    .agm-tab-content {
        min-height: auto; /* Remove fixed height on mobile */
        min-width: auto !important; /* Remove desktop min-width */
        padding: 10px;
    }
    
    /* Remove all desktop width constraints on mobile */
    .agm-keys-header,
    .agm-keys-list,
    .agm-usage-header,
    .agm-usage-summary,
    .agm-docs-section {
        min-width: auto !important;
        width: 100% !important;
    }
    
    .agm-code-block,
    .agm-code-example pre {
        font-size: 0.8rem; /* Smaller font on mobile */
        padding: 10px;
        overflow-x: auto;
    }
    
    .agm-form-actions {
        flex-direction: column;
    }
    
    .agm-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .agm-dashboard {
        padding: 10px;
        margin: 5px;
        min-width: auto; /* Remove desktop min-width on small mobile */
        width: calc(100% - 10px);
    }
    
    .agm-dashboard-title {
        font-size: 1.5rem;
    }
    
    .agm-stat-card {
        padding: 15px;
    }
    
    .agm-stat-icon {
        font-size: 2rem;
        margin-right: 15px;
    }
    
    .agm-stat-number {
        font-size: 1.5rem;
    }
}