/* Console Login Styles */

.console-login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.console-login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.console-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.console-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.console-back-link:hover {
    color: #764ba2;
}

.console-logo h1 {
    color: #333;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.console-logo p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.console-login-form {
    margin-bottom: 1.5rem;
}

.console-login-form .form-group {
    margin-bottom: 1.5rem;
}

.console-login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: #667eea;
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

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

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    z-index: 1;
}

.password-toggle:hover {
    color: #764ba2;
}

.console-login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.console-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.console-login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.error-message, .success-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.console-login-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.console-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.console-link:hover {
    color: #764ba2;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .console-login-container {
        padding: 10px;
    }
    
    .console-login-card {
        padding: 1.5rem;
    }
    
    .console-logo h1 {
        font-size: 1.75rem;
    }
    
    .console-login-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
    .console-login-container {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .console-login-card {
        background: #1a1a1a;
        color: white;
    }
    
    .console-logo h1 {
        color: white;
    }
    
    .console-logo p {
        color: #ccc;
    }
    
    .console-login-form label {
        color: white;
    }
    
    .input-with-icon input {
        background: #2a2a2a;
        border-color: #444;
        color: white;
    }
    
    .input-with-icon input:focus {
        border-color: #667eea;
    }
}

/* Feed Settings Layout */
.setting-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    flex-direction: row !important;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.setting-item:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.setting-item input[type="checkbox"] {
    margin: 0 !important;
    flex-shrink: 0;
    order: 1 !important;
    margin-top: 0 !important;
    min-width: 16px;
    width: 16px;
}

.setting-content {
    flex: 1;
    order: 2 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px;
    flex-direction: column !important;
    min-width: 0;
    max-width: calc(100% - 28px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    width: calc(100% - 28px);
}

.setting-title {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin: 0 !important;
    margin-bottom: 2px !important;
    display: block !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    max-width: 100%;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.setting-content small {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0 !important;
    display: block !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments for settings */
@media (max-width: 768px) {
    .setting-item {
        padding: 10px;
    }
    
    .setting-content {
        max-width: calc(100% - 24px);
        width: calc(100% - 24px);
    }
    
    .setting-title {
        font-size: 0.85rem;
    }
    
    .setting-content small {
        font-size: 0.75rem;
    }
}

/* Template Selection Styles */
.template-selection {
    display: flex;
    gap: 12px;
    align-items: center;
}

.template-selection select {
    flex: 1;
}

.template-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-top: 8px;
    justify-content: center;
    width: 100%;
}

.template-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.template-btn i {
    font-size: 0.9rem;
}

.create-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-top: 8px;
    justify-content: center;
    width: 100%;
}

.create-template-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.create-template-btn i {
    font-size: 0.9rem;
}

/* Template Preview Styles */
.template-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid #e9ecef;
}

.preview-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.preview-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.preview-header p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.preview-content {
    margin-bottom: 1.5rem;
}

.preview-post {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.post-time {
    color: #666;
}

.post-status {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.preview-post h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.preview-post p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.preview-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.preview-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Radio button styles for template selection */
.setting-item input[type="radio"] {
    margin: 0 !important;
    flex-shrink: 0;
    order: 1 !important;
    margin-top: 0 !important;
    min-width: 16px;
    width: 16px;
}

/* Responsive adjustments for template selection */
@media (max-width: 768px) {
    .template-selection {
        flex-direction: column;
        align-items: stretch;
    }
    
    .template-btn {
        justify-content: center;
    }
    
    .preview-features {
        justify-content: center;
    }
}

/* API Keys Responsive Styles */
.api-keys-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-key-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.api-key-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.key-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.key-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.key-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-badge, .type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #28a745;
    color: white;
}

.status-badge.inactive {
    background: #6c757d;
    color: white;
}

.type-badge.success {
    background: #28a745;
    color: white;
}

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

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

.type-badge.secondary {
    background: #6c757d;
    color: white;
}

.key-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 1rem 0;
}

.key-meta {
    margin-bottom: 1rem;
}

.key-id {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.key-id strong {
    color: #333;
    font-size: 0.9rem;
}

.key-id code {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #333;
    border: 1px solid #e9ecef;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #5a6fd8;
}

.key-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.key-stats span {
    font-size: 0.8rem;
    color: #666;
}

.key-stats strong {
    color: #333;
}

.key-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.key-actions .action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
}

.key-actions .action-btn:not(.danger) {
    background: #667eea;
    color: white;
}

.key-actions .action-btn:not(.danger):hover {
    background: #5a6fd8;
}

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

.key-actions .action-btn.danger:hover {
    background: #c82333;
}

/* Responsive adjustments for API keys */
@media (max-width: 768px) {
    .api-key-item {
        padding: 1rem;
    }
    
    .key-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .key-header h3 {
        font-size: 1rem;
    }
    
    .key-badges {
        width: 100%;
        justify-content: flex-start;
    }
    
    .key-id {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .key-id code {
        word-break: break-all;
        width: 100%;
        max-width: 100%;
    }
    
    .key-actions {
        justify-content: stretch;
    }
    
    .key-actions .action-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .api-key-item {
        padding: 0.75rem;
    }
    
    .key-header h3 {
        font-size: 0.95rem;
    }
    
    .status-badge, .type-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .key-description {
        font-size: 0.85rem;
    }
    
    .key-stats span {
        font-size: 0.75rem;
    }
    
    .key-actions .action-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .key-actions .action-btn i {
        font-size: 0.8rem;
    }
}

/* Form responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
}

/* Empty state responsive */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    color: #333;
}

.empty-state p {
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 480px) {
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state i {
        font-size: 2.5rem;
    }
    
    .empty-state h3 {
        font-size: 1.1rem;
    }
    
    .empty-state p {
        font-size: 0.85rem;
    }
} 

/* Console Header Styles */
.console-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.console-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.console-logo {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.console-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin: 0;
    line-height: 1.2;
}

.console-subtitle {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    margin: 0;
}

.console-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.user-info i {
    color: #667eea;
    font-size: 1.2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid #dc3545;
}

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

/* Responsive adjustments for console header */
@media (max-width: 768px) {
    .console-header-content {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    
    .console-logo h1 {
        font-size: 1.3rem;
    }
    
    .console-subtitle {
        font-size: 0.75rem;
    }
    
    .console-user-menu {
        gap: 0.5rem;
    }
    
    .user-info {
        font-size: 0.8rem;
    }
    
    .user-info i {
        font-size: 1rem;
    }
    
    .back-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .console-header-content {
        padding: 0 0.5rem;
        gap: 0.25rem;
    }
    
    .console-logo h1 {
        font-size: 1.1rem;
    }
    
    .console-subtitle {
        font-size: 0.7rem;
    }
    
    .user-info {
        font-size: 0.75rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-info span {
        display: none;
    }
    
    .back-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        min-width: 60px;
    }
    
    .back-btn span {
        display: none;
    }
}

@media (max-width: 360px) {
    .console-header-content {
        padding: 0 0.25rem;
    }
    
    .console-logo h1 {
        font-size: 1rem;
    }
    
    .console-subtitle {
        font-size: 0.65rem;
    }
    
    .back-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        min-width: 50px;
    }
} 