/* Editor Styles */

/* Editor Main Layout */
.editor-main {
    background: #f5f5f7;
    min-height: calc(100vh - 80px);
    padding: 40px 0;
}

/* Editor Header */
.editor-header {
    text-align: center;
    margin-bottom: 40px;
}

.editor-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.editor-title-section {
    flex: 1;
    text-align: left;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-outline {
    background: transparent;
    border: 1px solid #667eea;
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

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

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.editor-title {
    font-size: 36px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.editor-subtitle {
    font-size: 18px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Editor Controls */
.editor-controls {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e7;
}

.control-group {
    margin-bottom: 24px;
}

.control-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.control-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.control-input,
.control-textarea,
.control-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.control-input:focus,
.control-textarea:focus,
.control-select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.control-textarea {
    resize: vertical;
    min-height: 80px;
}

.control-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Editor Interface */
.editor-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.editor-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e7;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e7;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible;
}

.action-button {
    min-width: 80px;
    height: 32px;
    border: none;
    background: #e5e5e7;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    color: #6b7280;
    position: relative;
    padding: 0 8px;
    white-space: nowrap;
}

.action-button:hover {
    background: #d1d5db;
    color: #1d1d1f;
    transform: translateY(-1px);
}

.button-text {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    color: inherit;
}

.action-button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1d1d1f;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.action-button[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1d1d1f;
    margin-bottom: 3px;
    z-index: 1000;
}

/* Markdown Editor */
.markdown-editor {
    width: 100%;
    height: 600px;
    padding: 24px;
    border: none;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #1d1d1f;
    background: white;
    resize: none;
    outline: none;
}

.markdown-editor:focus {
    outline: none;
}

/* Preview Content */
.preview-content {
    padding: 24px;
    height: 600px;
    overflow-y: auto;
    background: white;
    font-size: 16px;
    line-height: 1.8;
    color: #1d1d1f;
}

.preview-content h1,
.preview-content h2,
.preview-content h3,
.preview-content h4,
.preview-content h5,
.preview-content h6 {
    color: #1d1d1f;
    font-weight: 600;
    margin: 24px 0 16px 0;
    line-height: 1.3;
}

.preview-content h1 {
    font-size: 32px;
    border-bottom: 2px solid #e5e5e7;
    padding-bottom: 8px;
}

.preview-content h2 {
    font-size: 24px;
}

.preview-content h3 {
    font-size: 20px;
}

.preview-content p {
    margin-bottom: 16px;
    color: #374151;
}

.preview-content ul,
.preview-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.preview-content li {
    margin-bottom: 8px;
    color: #374151;
}

.preview-content strong {
    font-weight: 600;
    color: #1d1d1f;
}

.preview-content em {
    font-style: italic;
}

.preview-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    color: #e11d48;
}

.preview-content pre {
    background: #f3f4f6;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.preview-content pre code {
    background: none;
    padding: 0;
    color: #1d1d1f;
}

.preview-content blockquote {
    border-left: 4px solid #007aff;
    padding-left: 16px;
    margin: 16px 0;
    color: #6b7280;
    font-style: italic;
}

.preview-content hr {
    border: none;
    height: 1px;
    background: #e5e5e7;
    margin: 24px 0;
}

.preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 16px 0;
    display: block;
}

.preview-content img[src*="Zdjecia/"] {
    border: 2px solid #e5e5e7;
    transition: border-color 0.3s ease;
}

.preview-content img[src*="Zdjecia/"]:hover {
    border-color: #007aff;
}

/* Editor Actions */
.editor-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: #007aff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Status Message */
.status-message {
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
    display: none;
}

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

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

.status-message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    display: block;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e5e7;
    background: #f8f9fa;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    color: #6b7280;
}

.modal-close:hover {
    background: #e5e5e7;
    color: #1d1d1f;
}

.modal-content {
    padding: 32px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* Fix header positioning in modal preview */
.modal-content .header {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
}

/* Image styles in modal preview */
.modal-content img[src*="Zdjecia/"] {
    border: 2px solid #e5e5e7;
    transition: border-color 0.3s ease;
}

.modal-content img[src*="Zdjecia/"]:hover {
    border-color: #007aff;
}

/* Active Navigation Link */
.nav-link.active {
    color: #007aff;
    font-weight: 600;
}

.mobile-nav-link.active {
    color: #007aff;
    font-weight: 600;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .editor-main {
        padding: 20px 0;
    }
    
    .editor-title {
        font-size: 28px;
    }
    
    .editor-subtitle {
        font-size: 16px;
    }
    
    .editor-controls {
        padding: 24px 20px;
        margin-bottom: 24px;
    }
    
    .control-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .control-group {
        margin-bottom: 20px;
    }
    
    .editor-interface {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .markdown-editor,
    .preview-content {
        height: 400px;
    }
    
    .panel-header {
        padding: 16px 20px;
    }
    
    .panel-title {
        font-size: 16px;
    }
    
    .markdown-editor,
    .preview-content {
        padding: 20px;
    }
    
    .editor-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-container {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-content {
        padding: 20px;
        max-height: calc(95vh - 80px);
    }
}

@media (max-width: 480px) {
    .editor-main {
        padding: 16px 0;
    }
    
    .editor-title {
        font-size: 24px;
    }
    
    .editor-subtitle {
        font-size: 14px;
    }
    
    .editor-controls {
        padding: 20px 16px;
        margin-bottom: 20px;
    }
    
    .control-group {
        margin-bottom: 16px;
    }
    
    .control-input,
    .control-textarea,
    .control-select {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .editor-interface {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .markdown-editor,
    .preview-content {
        height: 350px;
        padding: 16px;
    }
    
    .panel-header {
        padding: 12px 16px;
    }
    
    .panel-title {
        font-size: 15px;
    }
    
    .action-button {
        min-width: 60px;
        height: 28px;
        padding: 0 6px;
        gap: 4px;
    }
    
    .button-text {
        font-size: 11px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .modal-container {
        margin: 5px;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-content {
        padding: 16px;
    }
}

/* Tablet Responsive Design */
@media (min-width: 769px) and (max-width: 1024px) {
    .editor-interface {
        gap: 20px;
    }
    
    .markdown-editor,
    .preview-content {
        height: 500px;
    }
    
    .control-row {
        gap: 20px;
    }
}

/* Print Styles */
@media print {
    .editor-main {
        background: white;
        padding: 0;
    }
    
    .editor-controls,
    .editor-actions,
    .status-message {
        display: none;
    }
    
    .editor-interface {
        grid-template-columns: 1fr;
    }
    
    .panel-header {
        display: none;
    }
    
    .markdown-editor {
        display: none;
    }
    
    .preview-content {
        height: auto;
        overflow: visible;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .action-button,
    .modal-container {
        transition: none;
    }
    
    .btn:hover,
    .action-button:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .control-input,
    .control-textarea,
    .control-select {
        border-color: #000;
    }
    
    .preview-content {
        color: #000;
    }
    
    .preview-content h1,
    .preview-content h2,
    .preview-content h3 {
        color: #000;
    }
}

/* Focus Styles */
.control-input:focus,
.control-textarea:focus,
.control-select:focus,
.btn:focus,
.action-button:focus {
    outline: 2px solid #007aff;
    outline-offset: 2px;
}

/* Loading States */
.markdown-editor:empty::before {
    content: "Wprowadź treść artykułu w formacie Markdown...";
    color: #9ca3af;
    font-style: italic;
}

.preview-content:empty::before {
    content: "Podgląd pojawi się tutaj...";
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    display: block;
    margin-top: 50%;
    transform: translateY(-50%);
}

/* Editor Tabs */
.editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: auto;
    flex-shrink: 0;
}

.tab-button:hover {
    color: #374151;
    background: #f9fafb;
}

.tab-button.active {
    color: #007aff;
    border-bottom-color: #007aff;
    background: #f0f9ff;
}

.tab-button svg {
    width: 16px;
    height: 16px;
}

/* Articles Tab Content */
.articles-tab-content {
    margin-top: 2rem;
}

.articles-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
}

.search-section {
    display: flex;
    justify-content: center;
}

.search-input-group {
    display: flex;
    max-width: 400px;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-button {
    padding: 0.75rem 1rem;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background: #0056b3;
}

.filters-section {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.filter-select:focus {
    border-color: #007aff;
}

/* Articles Table */
.articles-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.articles-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

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

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

.article-title-cell {
    font-weight: 500;
    color: #111827;
    max-width: 300px;
}

.article-title-cell a {
    color: inherit;
    text-decoration: none;
}

.article-title-cell a:hover {
    color: #007aff;
}

.article-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.article-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.article-status.published {
    background: #d1fae5;
    color: #065f46;
}

.article-status.draft {
    background: #fef3c7;
    color: #92400e;
}

.article-status.archived {
    background: #f3f4f6;
    color: #6b7280;
}

.article-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.article-views {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Action Buttons */
.article-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn.edit {
    background: #dbeafe;
    color: #1e40af;
}

.action-btn.edit:hover {
    background: #bfdbfe;
}

.action-btn.delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn.delete:hover {
    background: #fecaca;
}

.action-btn.view {
    background: #f0fdf4;
    color: #166534;
}

.action-btn.view:hover {
    background: #dcfce7;
}

.action-btn svg {
    width: 12px;
    height: 12px;
}

/* Loading and No Results */
.articles-status {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6b7280;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6b7280;
}

.no-results svg {
    color: #d1d5db;
}

.no-results h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

.no-results p {
    margin: 0;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .articles-controls {
        padding: 1rem;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .articles-table-container {
        overflow-x: auto;
    }
    
    .articles-table {
        min-width: 600px;
    }
    
    .article-actions {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
}

/* Editor Layout Fixes */
.editor-interface {
    display: flex !important;
    gap: 1rem;
    min-height: 500px;
}

.editor-panel {
    flex: 1 1 50% !important;
    min-width: 0; /* Prevents flex items from overflowing */
}

.editor-panel:first-child {
    flex: 1 1 50% !important;
}

.editor-panel:last-child {
    flex: 1 1 50% !important;
}

.markdown-editor {
    width: 100% !important;
    min-height: 400px;
    resize: vertical;
}

.preview-content {
    width: 100% !important;
    min-height: 400px;
    overflow-y: auto;
}

/* Force layout refresh after tab switch */
.editor-interface[style*="display: flex"] {
    display: flex !important;
}

.editor-interface[style*="display: none"] {
    display: none !important;
}

/* Offers Tab Content */
.offers-tab-content {
    margin-top: 2rem;
}

/* Editor Tab Content */
.editor-tab-content {
    margin-top: 2rem;
}

/* Hero Tab Content */
.hero-tab-content {
    margin-top: 2rem;
}

.hero-controls {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-header h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 24px;
    font-weight: 600;
}

.hero-header p {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 16px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-editor-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-help {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

.hero-preview {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-preview h4 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.hero-preview-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 32px;
    border: 2px dashed #d1d5db;
}

.hero-preview-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.hero-preview-title {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.hero-preview-subtitle {
    font-size: 20px;
    color: #6b7280;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.hero-preview-description {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.5;
}


@media (max-width: 768px) {
    .hero-preview-title {
        font-size: 28px;
    }
    
    .hero-preview-subtitle {
        font-size: 18px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
}

/* Add Offer Form */
.add-offer-form {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-container {
    padding: 20px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.form-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

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

.form-group.form-actions {
    justify-content: flex-end;
    align-items: flex-end;
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
    font-size: 0.875rem;
}

.form-input, .form-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary {
    background: #007aff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* File Input Styles */
.form-input[type="file"] {
    padding: 8px;
    border: 2px dashed #d1d5db;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-input[type="file"]:hover {
    border-color: #007aff;
    background: #f0f9ff;
}

.form-input[type="file"]:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* File Preview Styles */
.file-preview {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-preview img {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-remove-logo {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.btn-remove-logo:hover {
    background: #b91c1c;
}

/* Offer Logo Styles */
.offer-logo {
    max-width: 30px;
    max-height: 20px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.offer-insurer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.offers-controls {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.offers-header h3 {
    margin: 0 0 0.5rem 0;
    color: #1d1d1f;
    font-size: 1.5rem;
    font-weight: 600;
}

.offers-header p {
    margin: 0 0 1.5rem 0;
    color: #6b7280;
    font-size: 1rem;
}

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

.offers-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.offers-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

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

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

/* Ensure target customer cell is visible and styled */
.offer-target-customer {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 500;
    font-size: 0.9rem;
}

.offer-insurer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.offer-drag-handle {
    cursor: grab;
    color: #9ca3af;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.offer-drag-handle:hover {
    color: #6b7280;
    background-color: #f3f4f6;
}

.offer-drag-handle:active {
    cursor: grabbing;
}

.offer-insurer strong {
    color: #1d1d1f;
    font-size: 1rem;
}

.offer-type {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.offer-cashback {
    color: #059669;
    font-weight: 600;
    font-size: 1.1rem;
}

.offer-link-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-link-input {
    flex: 1;
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    display: none;
    min-width: 200px;
}

.offer-link-input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.btn-link-edit {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    color: #6b7280;
    transition: background-color 0.2s, color 0.2s;
}

.btn-link-edit:hover {
    background: #f3f4f6;
    color: #007aff;
}

.offer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #007aff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.offer-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

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

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

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

.status-expired {
    background: #fee2e2;
    color: #dc2626;
}

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

.btn-action {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    color: #007aff;
}

.btn-edit:hover {
    background: #e0f2fe;
}

.btn-delete {
    color: #dc2626;
}

.btn-delete:hover {
    background: #fee2e2;
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.modal-container {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.modal-title {
    margin: 0;
    color: #1d1d1f;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
}

.modal-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Drag and Drop Styles */
.offers-table tr.dragging {
    opacity: 0.5;
    background: #f3f4f6;
    transform: rotate(2deg);
}

.offers-table tr.drag-over {
    border-top: 2px solid #007aff;
}

.offers-table tr {
    transition: all 0.2s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .offers-controls {
        padding: 1rem;
    }
    
    .offers-actions {
        flex-direction: column;
    }
    
    .offers-table {
        font-size: 0.875rem;
    }
    
    .offers-table th,
    .offers-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .modal-container {
        margin: 1rem;
        max-width: none;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .offer-link-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .offer-link-input {
        min-width: 150px;
        width: 100%;
    }
}

/* Specific styles for offer modal */
#offerModal {
    display: none !important;
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

#offerModal.show {
    display: flex !important;
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Debug styles */
.debug-modal {
    border: 2px solid red !important;
    background: yellow !important;
}

/* Cashback Tab Styles */
.cashback-tab-content {
    padding: 0;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.cashback-controls {
    background: white;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.cashback-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.cashback-header p {
    margin: 0 0 20px 0;
    color: #64748b;
    font-size: 14px;
}

.cashback-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cashback-filters {
    background: white;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.search-container {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cashback-table-container {
    background: white;
    padding: 24px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

.loading-indicator svg {
    animation: spin 1s linear infinite;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cashback-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cashback-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.cashback-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

.cashback-table th.sortable:hover {
    background: #f1f5f9;
}

.sort-icon {
    margin-left: 4px;
    color: #94a3b8;
    font-size: 12px;
}

.cashback-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.cashback-table tr:hover {
    background: #f8fafc;
}

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

.actions-column {
    width: 120px;
    text-align: center;
}

/* Bank Account Column - Increased width and IBAN formatting */
.cashback-table th[data-column="bankAccount"],
.cashback-table td:nth-child(6) {
    width: 270px; /* Reduced by 10% from 300px to 270px */
    min-width: 270px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.cashback-table td:nth-child(6) {
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-btn {
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn.view {
    background: #dbeafe;
    color: #1e40af;
}

.action-btn.view:hover {
    background: #bfdbfe;
}

.action-btn.edit {
    background: #fef3c7;
    color: #d97706;
}

.action-btn.edit:hover {
    background: #fde68a;
}

.action-btn.delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn.delete:hover {
    background: #fecaca;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-new {
    background: #d1fae5;
    color: #059669;
}

.status-to_payout {
    background: #fef3c7;
    color: #d97706;
}

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

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.no-data-message svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-data-message p {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
}

.no-data-message small {
    font-size: 14px;
    opacity: 0.7;
}

/* Cashback Responsive Design */
@media (max-width: 768px) {
    .cashback-controls {
        padding: 16px;
    }
    
    .cashback-filters {
        padding: 16px;
    }
    
    .filter-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .cashback-table-container {
        padding: 16px;
    }
    
    .table-wrapper {
        font-size: 12px;
    }
    
    .cashback-table th,
    .cashback-table td {
        padding: 8px 12px;
    }
    
    /* Mobile styles for bank account column */
    .cashback-table th[data-column="bankAccount"],
    .cashback-table td:nth-child(6) {
        width: 180px; /* Reduced by 10% from 200px to 180px */
        min-width: 180px;
        font-size: 11px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .action-btn {
        font-size: 10px;
        padding: 4px 6px;
    }
}

/* Contacts Tab Styles */
.contacts-tab-content {
    padding: 0;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px; /* Reduced distance between tabs and content */
}

.contacts-controls {
    background: white;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.contacts-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.contacts-header p {
    margin: 0 0 20px 0;
    color: #64748b;
    font-size: 14px;
}

.contacts-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.contacts-filters {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e5e7;
}

.contacts-table-container {
    background: white;
    padding: 24px;
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.contacts-table th {
    background: #f8f9fa;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 16px 20px;
    border-bottom: 2px solid #e5e5e7;
    white-space: nowrap;
}

.contacts-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.contacts-table tr:hover {
    background: #f8f9fa;
}

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

.contacts-table .email-cell a {
    color: #007AFF;
    text-decoration: none;
}

.contacts-table .email-cell a:hover {
    text-decoration: underline;
}

.contacts-table .message-cell {
    max-width: 1200px; /* Increased by 400% from 300px to 1200px */
    word-wrap: break-word;
    width: 50%; /* Take up more space in the table */
}

.contacts-table .status-cell {
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.new {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.in-progress {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.completed {
    background: #d1fae5;
    color: #059669;
}

.contacts-table .date-cell {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

.contacts-table .actions-cell {
    text-align: center;
    width: 80px;
    padding: 8px;
}

.contacts-table .delete-contact-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: #dc2626;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.contacts-table .delete-contact-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
    transform: scale(1.1);
}

.contacts-table .delete-contact-btn:active {
    transform: scale(0.95);
}

.contacts-table .delete-contact-btn svg {
    width: 18px;
    height: 18px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.action-btn.edit {
    background: #e0f2fe;
    color: #0277bd;
}

.action-btn.edit:hover {
    background: #b3e5fc;
}

.action-btn.delete {
    background: #ffebee;
    color: #c62828;
}

.action-btn.delete:hover {
    background: #ffcdd2;
}

.status-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.status-select:hover {
    border-color: #9ca3af;
}

.status-select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.no-data-content {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-data-content svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-data-content p {
    font-size: 16px;
    margin: 0;
}

/* Responsive Design for Contacts */
@media (max-width: 768px) {
    .contacts-tab-content {
        padding: 16px;
    }
    
    .contacts-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .contacts-table-container {
        overflow-x: auto;
    }
    
    .contacts-table {
        min-width: 800px;
    }
    
    .contacts-table th,
    .contacts-table td {
        padding: 12px 8px;
    }
    
    .contacts-table .message-cell {
        max-width: 800px; /* Increased by 400% from 200px to 800px for mobile */
        width: 40%; /* Take up more space on mobile too */
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .action-btn {
        font-size: 10px;
        padding: 4px 6px;
    }
}

/* ===== IMAGES MANAGEMENT TAB ===== */

.images-tab-content {
    padding: 24px;
}

.images-controls {
    margin-bottom: 24px;
}

.images-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.images-header p {
    color: #86868b;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.images-actions {
    display: flex;
    gap: 50px;
    flex-wrap: nowrap;
    align-items: center;
}

.image-upload-form {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.image-upload-form h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1d1d1f;
}

.images-grid-container {
    position: relative;
    min-height: 400px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.image-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.image-card-header {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.image-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.image-card-body {
    height: 100px;
    overflow: hidden;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-thumbnail {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.image-card-footer {
    padding: 16px;
}

.image-info {
    margin-bottom: 12px;
}

.image-filename {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 4px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-size {
    font-size: 0.8rem;
    color: #86868b;
}

.image-url-container {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.image-url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    background: #f5f5f7;
    color: #1d1d1f;
}

.image-url-input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
}

.btn-copy-url {
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-copy-url:hover {
    background: #5568d3;
}

.btn-delete-image {
    width: 100%;
    padding: 10px;
    background: #ff3b30;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-delete-image:hover {
    background: #d6352a;
}

.loading-message,
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
    font-size: 1rem;
}

.loading-message {
    color: #667eea;
}

.empty-message {
    color: #86868b;
}

/* Responsive design for images grid */
@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .images-actions {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .images-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .image-card-footer {
        padding: 12px;
    }
    
    .image-url-container {
        flex-direction: column;
    }
    
    .image-url-input {
        font-size: 0.75rem;
    }
}
