/* Save Configuration Button */
.btn-save-config {
    background: linear-gradient(90deg, #10b981 0%, #667eea 100%) !important;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 1.08em;
    box-shadow: 0 2px 8px rgba(16,185,129,0.10);
    margin-bottom: 10px;
    margin-top: 10px;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-save-config:hover {
    background: linear-gradient(90deg, #059669 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 16px rgba(16,185,129,0.18);
}
/* Create New Application Button */
.btn-create-app {
    background: linear-gradient(90deg, #764ba2 0%, #667eea 100%) !important;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 1.08em;
    box-shadow: 0 2px 8px rgba(102,126,234,0.10);
    margin-bottom: 18px;
    margin-top: 10px;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-create-app:hover {
    background: linear-gradient(90deg, #5f2c82 0%, #49a09d 100%) !important;
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
}
/* OAuth App Card Action Buttons */
.btn-edit {
    background: linear-gradient(90deg, #10b981 0%, #22d3ee 100%) !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-weight: 500;
    margin-right: 6px;
    transition: background 0.2s;
}
.btn-edit:hover {
    background: linear-gradient(90deg, #059669 0%, #0ea5e9 100%) !important;
}

/* OAuth Help Modal */
#oauthHelpModal .modal-card {
    width: 90% !important;
    max-width: 1200px !important;
}

#oauthHelpModal .modal-card-body {
    color: #fff !important;
    background: #1a202c !important;
    text-align: left !important;
}

#oauthHelpModal .content {
    color: #fff !important;
    text-align: left !important;
}

#oauthHelpModal .content h4 {
    color: #667eea !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1rem !important;
    font-weight: 600 !important;
    font-size: 1.2em !important;
    text-align: left !important;
}

#oauthHelpModal .content h4:first-of-type {
    margin-top: 0 !important;
}

#oauthHelpModal .content p {
    color: #e2e8f0 !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
    text-align: left !important;
}

#oauthHelpModal .content ol {
    color: #e2e8f0 !important;
    padding-left: 0 !important;
    list-style: none !important;
    margin-left: 0 !important;
    text-align: left !important;
}

#oauthHelpModal .content ol > li {
    margin-bottom: 1.5rem !important;
    padding-left: 0 !important;
    text-align: left !important;
}

#oauthHelpModal .content ol > li > strong {
    color: #fff !important;
    font-size: 1.05em !important;
    display: block !important;
    margin-bottom: 0.5rem !important;
    text-align: left !important;
}

#oauthHelpModal .content ul {
    margin-top: 0.5rem !important;
    padding-left: 0 !important;
    list-style: none !important;
    margin-left: 1rem !important;
    text-align: left !important;
}

#oauthHelpModal .content ul > li {
    margin-bottom: 0.5rem !important;
    color: #cbd5e0 !important;
    line-height: 1.5 !important;
    text-align: left !important;
}

#oauthHelpModal .content strong {
    color: #fff !important;
}

#oauthHelpModal .content code {
    background: #2d2d2d !important;
    color: #a5f3fc !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    font-family: 'Courier New', monospace !important;
    font-size: 0.9em !important;
}

#oauthHelpModal .content li.url-code {
    font-family: 'Courier New', monospace !important;
    font-size: 0.8em !important;
    word-break: break-all !important;
    background: #2d2d2d !important;
    color: #a5f3fc !important;
    padding: 10px 12px !important;
    border-radius: 4px !important;
    display: block !important;
    margin: 0.5rem 0 0.5rem 1rem !important;
    border-left: 3px solid #667eea !important;
    text-align: left !important;
}

#oauthHelpModal .content pre {
    background: #0d1117 !important;
    padding: 18px !important;
    border-radius: 6px !important;
    color: #f8f8f2 !important;
    overflow-x: auto !important;
    font-size: 0.85em !important;
    margin: 1rem 0 !important;
    border: 1px solid #30363d !important;
    text-align: left !important;
}

#oauthHelpModal .content pre code {
    background: none !important;
    padding: 0 !important;
    color: #f8f8f2 !important;
}

/* Webhook Modal */
#webhookModal .modal-card-body {
    text-align: left !important;
}

#webhookModal .label,
#webhookModal .help {
    text-align: left !important;
}

.btn-delete {
    background: linear-gradient(90deg, #ef4444 0%, #f59e42 100%) !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-delete:hover {
    background: linear-gradient(90deg, #b91c1c 0%, #f59e42 100%) !important;
}
/* Info alert for empty states */
.alert-info {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    padding: 16px 20px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 1.05em;
    text-align: center;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
    letter-spacing: 0.01em;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.container-wide {
    background: #1a202c;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 90%;
    width: 100%;
    text-align: center;
}

.container-wide h1 {
    color: #ffffff;
}

.container-wide .subtitle {
    color: #cbd5e0;
}

.container-wide .info-box {
    background: #2d3748;
    border-left-color: #667eea;
}

.container-wide .info-box h3 {
    color: #a0aec0;
}

.container-wide .info-box p {
    color: #cbd5e0;
}

.container-wide .footer {
    border-top-color: #4a5568;
    color: #718096;
}

/* Dark theme for nested elements in wide container */
.container-wide .info-box > div {
    background: #1a202c !important;
}

.container-wide .info-box h4 {
    color: #a0aec0 !important;
}

.stats-summary {
    margin-top: 1rem;
    padding: 10px;
    background: #2d3748 !important;
    border-radius: 4px;
    font-size: 0.9em;
    color: #cbd5e0 !important;
}

.stats-summary strong {
    color: #e2e8f0 !important;
}

/* Table styling for dark mode */
.container-wide table {
    color: #cbd5e0;
}

.container-wide table th {
    color: #ffffff !important;
}

.container-wide table td {
    color: #cbd5e0;
}

.container-wide table td strong {
    color: #e2e8f0;
}

.container-wide .info-box label {
    color: #cbd5e0 !important;
}

.container-wide .info-box input[type="text"] {
    background: #2d3748 !important;
    color: #cbd5e0 !important;
    border-color: #4a5568 !important;
}

.container-wide .info-box input[type="text"]::placeholder {
    color: #718096 !important;
}

.container-wide .info-box button {
    background: #4a5568 !important;
    color: #a0aec0 !important;
}

/* Dark theme for regular container */
.container-dark {
    background: #1a202c;
}

.container-dark h1 {
    color: #ffffff;
}

.container-dark .subtitle {
    color: #cbd5e0;
}

.container-dark .info-box {
    background: #2d3748;
    border-left-color: #667eea;
}

.container-dark .info-box h3 {
    color: #a0aec0;
}

.container-dark .info-box p {
    color: #cbd5e0;
}

.container-dark .feature-list li {
    color: #cbd5e0;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: white;
}

.info-box {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
    border-radius: 4px;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.info-box p {
    color: #ffffff;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    margin: 20px 0;
}

.feature-list li {
    padding: 10px 0;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.feature-list li:before {
    content: "✓";
    color: #667eea;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2em;
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #a0aec0;
    font-size: 0.9em;
}

/* Callback page styles */
.loader {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Partner Dashboard Styles */
.dashboard-highlight {
    background: linear-gradient(135deg, #4a148c 0%, #311b92 100%) !important;
    color: #ffffff;
    border: none !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.dashboard-highlight h3 {
    color: #ffffff !important;
}

.dashboard-highlight p {
    color: #ffffff !important;
}

.dashboard-highlight .feature-list li {
    color: #ffffff !important;
}

.dashboard-highlight .feature-list li:before {
    color: #ffffff !important;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    background: #9147ff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #7c3aed;
}

.btn-logout {
    background: #dc3545;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 8px;
    color: white;
    transition: background 0.3s ease;
}

.btn-logout:hover {
    background: #c82333;
}

/* Header Layout */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Utility & component classes to replace inline styles in PHP templates */
.center-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2rem;
}
.zero-margin { margin: 0 !important; }
.btn-light { margin-top: 1rem; background: #ffffff; color: #1a202c; display: inline-block; font-weight: bold; }
.btn-small { padding: 0.5rem 1rem; }
.bg-primary { background: #667eea !important; }
.bg-success { background: #10b981 !important; }
.whitelisted-badge { margin-top: 0.5rem; color: #48bb78; }

.app-card { background: #1a202c; padding: 15px; border-radius: 8px; margin-bottom: 1rem; }

.input-disabled { width: 100%; padding: 10px; border: 1px solid #e2e8f0; border-radius: 4px; background: #1a202c; color: #ffffff; }
.label-white { display: block; margin-bottom: 5px; color: #ffffff; font-weight: 500; }
.btn-disabled { padding: 10px 20px; background: #cbd5e0; color: #ffffff; border: none; border-radius: 4px; cursor: not-allowed; font-weight: 500; }

.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-top: 1rem; }
.analytics-card { padding: 20px; border-radius: 8px; color: white; text-align: center; }
.analytics-value { font-size: 2em; font-weight: bold; }
.analytics-label { font-size: 0.9em; margin-top: 5px; }
.analytics-gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.analytics-gradient-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.analytics-gradient-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

/* Metric cards used on stats page */
.metric-card { 
    background: #1a202c; 
    padding: 20px; 
    border-radius: 8px; 
    color: #ffffff;
}
.border-primary { border-left: 4px solid #667eea; }
.border-success { border-left: 4px solid #48bb78; }
.border-danger { border-left: 4px solid #ef4444; }
.border-warning { border-left: 4px solid #f59e0b; }
.border-indigo { border-left: 4px solid #8b5cf6; }
.border-pink { border-left: 4px solid #ec4899; }
.mt-10 { margin-top: 10px; }

/* Alert styles */
.alert-preview { background: #fff3cd; border-left: 4px solid #ffc107; }
.alert-preview h3 { color: #856404; }
.alert-preview p { color: #856404; }

/* App card specifics */
.app-card h4 { color: #667eea; margin-bottom: 10px; font-size: 1em; }
.app-card p { color: #ffffff; font-size: 0.9em; margin: 5px 0; }
.status-active { color: #48bb78; }

/* Analytics note */
.analytics-note { margin-top: 1rem; color: #a0aec0; font-size: 0.9em; }

/* Table dark helper */
.table-dark { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.table-sm { font-size: 0.85em; }
.table-dark thead tr { background: #1a202c; border-bottom: 2px solid #e2e8f0; }
.table-dark th { padding: 12px; text-align: left; color: #ffffff; font-weight: 600; }
.table-dark td { padding: 12px; color: #ffffff; }
.table-dark .center { text-align: center; }
.table-dark .nowrap { white-space: nowrap; }
.domain-icon { color: #667eea; margin-right: 8px; }

/* Recent activity specific */
.time-col { padding: 10px; color: #ffffff; white-space: nowrap; }
.service-col { padding: 10px; color: #ffffff; }
.domain-col { padding: 10px; color: #ffffff; font-size: 0.9em; }
.user-col { padding: 10px; color: #ffffff; }
.status-col { padding: 10px; text-align: center; }

.service-twitch { color: #9147ff; }
.service-discord { color: #5865F2; }

.status-success { background: #d1fae5; color: #065f46; padding: 4px 8px; border-radius: 4px; font-weight: 600; font-size: 0.85em; }
.status-failed { background: #fee2e2; color: #991b1b; padding: 4px 8px; border-radius: 4px; font-weight: 600; font-size: 0.85em; }

/* Webhook helpers */
.input-light { width: 100%; padding: 10px; border: 1px solid #e2e8f0; border-radius: 4px; background: #ffffff; color: #1a202c; }
.flex-wrap-gap { display: flex; gap: 10px; flex-wrap: wrap; }
.checkbox-label { display: flex; align-items: center; gap: 5px; color: #ffffff; }
.info-text-white { margin-bottom: 1rem; color: #ffffff; }
.rate-high { color: #48bb78; font-weight: 600; }
.rate-medium { color: #f59e0b; font-weight: 600; }
.rate-low { color: #ef4444; font-weight: 600; }
.table-row { border-bottom: 1px solid #4a5568; }
.mb-15 { margin-bottom: 15px; }
.mb-10 { margin-bottom: 10px; }

.metrics-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 15px; 
    margin-top: 1rem; 
}
.metric-label { 
    color: #a0aec0; 
    font-size: 0.9em; 
    margin-bottom: 8px;
    font-weight: 500;
}
.metric-value { 
    font-size: 2em; 
    font-weight: bold; 
}

/* Light table styles (used on stats page) */
.table-light { 
    width: 100%; 
    border-collapse: collapse; 
    background: #1a202c;
}
.table-light thead tr { 
    background: #2d3748; 
    border-bottom: 2px solid #4a5568; 
}
.table-light th { 
    padding: 12px; 
    text-align: left; 
    color: #ffffff;
    font-weight: 600;
}
.table-light td { 
    padding: 12px; 
    color: #e2e8f0;
}
.table-light .center { text-align: center; }
.table-light strong {
    color: #ffffff;
}

/* Error table header */
.table-error thead tr { 
    background: #742a2a; 
    border-bottom: 2px solid #9b2c2c; 
}
.table-error th {
    color: #ffffff;
}
.table-error td {
    color: #e2e8f0;
}
.table-error {
    background: #1a202c;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.value-dark { color: #ffffff; }
.value-green { color: #48bb78; }
.value-red { color: #ef4444; }
.value-warning { color: #f59e0b; }
.value-indigo { color: #8b5cf6; }
.value-pink { color: #ec4899; }
.fw-600 { font-weight: 600; }
.text-danger { color: #fc8181; }
.mt-1rem { margin-top: 1rem; }
.error-icon { color: #dc3545; font-size: 3rem; margin-bottom: 1rem; }
.redirect-note { margin-top: 2rem; font-size: 0.9rem; opacity: 0.7; }
.mt-2rem { margin-top: 2rem; }
