/* Authentication and User Portal Styles */

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-brand {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand:hover {
    color: #ecf0f1;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Main content */
.main-content {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

/* Flash messages */
.flash-messages {
    max-width: 600px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Authentication forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.auth-card p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox {
    margin: 0;
}

.checkbox-label {
    margin: 0;
    cursor: pointer;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-full {
    width: 100%;
}

.error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Dashboard styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.service-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-configured {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-enabled {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-disabled {
    background-color: #f8d7da;
    color: #721c24;
}

.service-info {
    text-align: left;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.service-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.account-info {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.account-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

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

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

.info-item label {
    font-weight: 500;
    color: #2c3e50;
}

/* Settings styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.settings-header {
    text-align: center;
    margin-bottom: 2rem;
}

.settings-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.settings-header p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.settings-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.form-description {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.form-description a {
    color: #3498db;
    text-decoration: none;
}

.form-description a:hover {
    text-decoration: underline;
}

.form-help {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 2rem;
}

.settings-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.settings-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.settings-info ul {
    list-style-type: none;
    padding: 0;
}

.settings-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

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

/* Bulk Notifications Styles */
.bulk-notifications-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.bulk-notifications-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.bulk-notification-stats {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.user-stats-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.user-stat-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background-color: white;
    border-radius: 4px;
    font-size: 0.875rem;
}

.user-email {
    font-weight: 500;
    margin-right: 0.5rem;
}

.user-service {
    color: #7f8c8d;
    margin-right: 0.5rem;
}

.user-status {
    margin-left: auto;
    font-size: 0.75rem;
}

.bulk-notification-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.notification-results {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.bulk-results-summary {
    margin-bottom: 1rem;
}

.bulk-results-summary h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.bulk-results-details {
    margin-top: 1rem;
}

.bulk-results-details h5 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.bulk-results-details ul {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.bulk-results-details li {
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.result-success {
    color: #155724;
}

.result-error {
    color: #721c24;
}

/* Additional button styles for bulk notifications */
.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

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

.btn-warning:hover {
    background-color: #e0a800;
}

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

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

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.footer a {
    color: #3498db;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Regex Configuration Styles */
.form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.regex-input {
    background-color: #f8f9fa;
    font-weight: 500;
}

.regex-help {
    margin-bottom: 8px;
}

.regex-help-link {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.regex-help-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
    text-decoration: none;
}

.regex-tips {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.regex-tips h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 16px;
}

.tips-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.tips-list li {
    margin-bottom: 6px;
    font-size: 14px;
    color: #6c757d;
}

.tips-list strong {
    font-family: 'Courier New', Monaco, monospace;
    background-color: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    color: #495057;
}

.common-patterns {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    font-size: 14px;
    color: #6c757d;
}

.common-patterns code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Monaco, monospace;
    color: #495057;
    margin: 0 4px;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .service-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .info-item {
        flex-direction: column;
        gap: 0.25rem;
    }
}