.crm-container {
    display: flex;
    min-height: calc(100vh - 180px);
    background: #0a0a0a;
    padding: 0;
    margin: 0;
    margin-top: 80px;
}

.crm-sidebar {
    width: 250px;
    background: #1a1a1a;
    border-right: 1px solid #333;
    padding: 30px 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.crm-sidebar h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 30px 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ff3366;
}

.crm-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.crm-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    color: #aaa;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.crm-nav-item:hover {
    background: #222;
    color: #fff;
}

.crm-nav-item.active {
    background: #222;
    color: #ff3366;
    border-left-color: #ff3366;
}

.crm-nav-item svg {
    flex-shrink: 0;
}

.crm-main {
    flex: 1;
    padding: 40px;
    padding-top: 20px;
    overflow-y: auto;
}

.crm-section {
    display: none;
}

.crm-section.active {
    display: block;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h1 {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

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

.stat-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #ff3366;
    font-size: 32px;
    font-weight: 700;
}

.users-table-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

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

.users-table thead {
    background: #222;
}

.users-table th {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    padding: 15px 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333;
}

.users-table td {
    color: #ddd;
    font-size: 14px;
    padding: 15px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.users-table tbody tr:hover {
    background: #222;
}

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

.user-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.user-status.active {
    background: rgba(46, 213, 115, 0.1);
    color: #2ed573;
}

.user-status.inactive {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

.tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.tier-badge.free {
    background: rgba(136, 136, 136, 0.1);
    color: #888;
}

.tier-badge.premium {
    background: rgba(255, 51, 102, 0.1);
    color: #ff3366;
}

.action-btn {
    background: #333;
    border: 1px solid #444;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #444;
    border-color: #555;
}

.view-full-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ff3366;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.view-full-btn:hover {
    background: #e62958;
    transform: translateY(-1px);
}

.scraped-content-preview {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 40px;
}

.preview-description {
    color: #aaa;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.preview-stat {
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-stat-label {
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-stat-value {
    color: #ff3366;
    font-size: 28px;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .crm-container {
        flex-direction: column;
    }
    
    .crm-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .crm-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .section-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .crm-main {
        padding: 20px;
    }
    
    .section-header h1 {
        font-size: 24px;
    }
    
    .section-stats {
        grid-template-columns: 1fr;
    }
    
    .users-table-container {
        overflow-x: auto;
    }
    
    .users-table {
        min-width: 800px;
    }
}

/* Scraped Content Section Styles */
.scraped-content-layout {
    display: flex;
    gap: 20px;
}

.scraped-filters {
    width: 280px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-container {
    position: relative;
}

.dropdown-search {
    width: 100%;
    padding: 10px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.dropdown-search:focus {
    outline: none;
    border-color: #ff3366;
    background: #333;
}

.dropdown-search.default-selected {
    color: #888;
    font-style: italic;
}

.dropdown-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

.dropdown-list.show {
    display: block;
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #333;
    color: #ff3366;
}

.dropdown-item[data-value=""] {
    color: #888;
    font-style: italic;
}

.filter-action-btn {
    width: 100%;
    padding: 10px 16px;
    background: #444;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.filter-action-btn.primary {
    background: #ff3366;
}

.filter-action-btn.primary:hover {
    background: #e62958;
}

.filter-action-btn.secondary {
    background: #666;
}

.filter-action-btn.secondary:hover {
    background: #777;
}

.filter-action-btn.warning {
    background: #ff6b35;
}

.filter-action-btn.warning:hover {
    background: #ff8555;
}

.scraped-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scraped-stats-bar {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px 20px;
}

.files-count {
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

.files-count span {
    color: #ff3366;
    font-weight: 700;
    font-size: 16px;
}

.scraped-table-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    min-height: 500px;
    max-height: 600px;
    overflow-y: auto;
}

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

.scraped-table thead {
    background: #222;
    position: sticky;
    top: 0;
    z-index: 10;
}

.scraped-table th {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 15px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333;
}

.scraped-table td {
    color: #ddd;
    font-size: 14px;
    padding: 12px;
    border-bottom: 1px solid #2a2a2a;
}

.scraped-table tbody tr:hover {
    background: #222;
}

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

.scraped-table .website-col {
    color: #ff3366;
    font-weight: 500;
    max-width: 250px;
    word-break: break-all;
}

.scraped-table .ai-model-col {
    color: #fff;
}

.scraped-table .owner-col {
    color: #aaa;
}

.scraped-table .content-length-col {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.scraped-table .scraped-at-col {
    color: #aaa;
    font-size: 13px;
    white-space: nowrap;
}

.scraped-table .actions-col {
    white-space: nowrap;
}

.scraped-action-btn {
    background: #444;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 5px;
}

.scraped-action-btn:hover {
    transform: translateY(-1px);
}

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

.scraped-action-btn.view {
    background: #ff3366;
}

.scraped-action-btn.view:hover {
    background: #ff4477;
    box-shadow: 0 2px 8px rgba(255, 51, 102, 0.3);
}

.scraped-action-btn.download {
    background: #28a745;
}

.scraped-action-btn.download:hover {
    background: #34ce57;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Content viewer modal */
.content-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
}

.content-modal-content {
    background: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
}

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

.content-modal-title {
    color: #ff3366;
    font-size: 20px;
    font-weight: 700;
    word-break: break-all;
}

.content-modal-close {
    background: #666;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.content-modal-close:hover {
    background: #777;
}

.content-modal-body {
    color: #ddd;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    background: #0a0a0a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
    max-height: 500px;
    overflow-y: auto;
}

@media (max-width: 1200px) {
    .scraped-content-layout {
        flex-direction: column;
    }
    
    .scraped-filters {
        width: 100%;
        position: relative;
        top: 0;
    }
    
    .filter-group {
        display: inline-block;
        width: calc(33.333% - 14px);
        margin-right: 20px;
        vertical-align: top;
    }
    
    .filter-action-btn {
        width: calc(25% - 8px);
        display: inline-block;
        margin-right: 10px;
    }
}

@media (max-width: 768px) {
    .filter-group {
        width: 100%;
        margin-right: 0;
    }
    
    .filter-action-btn {
        width: 100%;
        margin-right: 0;
    }
    
    .scraped-table-container {
        overflow-x: auto;
    }
    
    .scraped-table {
        min-width: 800px;
    }
    
    .content-modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* User Comments Section Styles */
.section-description {
    color: #aaa;
    font-size: 15px;
    margin: 10px 0 0 0;
    font-weight: 400;
}

.message-box {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.success-message {
    background-color: rgba(46, 213, 115, 0.1);
    border: 1px solid #2ed573;
    color: #2ed573;
}

.error-message {
    background-color: rgba(255, 51, 102, 0.1);
    border: 1px solid #ff3366;
    color: #ff3366;
}

.loading-text {
    text-align: center;
    color: #888;
    padding: 40px;
    font-size: 16px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
}

.comment-header-left h3 {
    color: #fff;
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
}

.comment-meta {
    color: #aaa;
    font-size: 14px;
}

.comment-user-email {
    color: #ff3366;
    font-weight: 600;
}

.comment-original {
    background-color: rgba(66, 133, 244, 0.1);
    border-left: 3px solid #4285F4;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.comment-original-text {
    color: #fff;
    line-height: 1.6;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.comment-original-date {
    color: #888;
    font-size: 13px;
}

.comment-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.thread-message {
    padding: 14px;
    border-radius: 6px;
    position: relative;
}

.thread-message-admin {
    background-color: rgba(255, 51, 102, 0.1);
    border-left: 3px solid #ff3366;
    margin-left: 20px;
}

.thread-message-user {
    background-color: rgba(46, 213, 115, 0.1);
    border-left: 3px solid #2ed573;
    margin-right: 20px;
}

.thread-message-text {
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.5;
    word-wrap: break-word;
}

.thread-message-meta {
    font-size: 12px;
    color: #888;
}

.thread-label {
    font-weight: 600;
    margin-right: 4px;
}

.thread-label-admin {
    color: #ff3366;
}

.thread-label-user {
    color: #2ed573;
}

.admin-response-form {
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 16px;
}

.admin-response-form h4 {
    margin: 0 0 12px 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.admin-response-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-family: 'Noto Sans', sans-serif;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.admin-response-form textarea:focus {
    outline: none;
    border-color: #ff3366;
}

.admin-response-button {
    padding: 10px 20px;
    background-color: #ff3366;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-response-button:hover {
    background-color: #e62958;
    transform: translateY(-1px);
}

.admin-response-button:disabled {
    background-color: #666;
    cursor: not-allowed;
    transform: none;
}

.no-comments {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-comments h3 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 24px;
}

@media (max-width: 768px) {
    .comment-header {
        flex-direction: column;
    }
    
    .thread-message-admin {
        margin-left: 10px;
    }
    
    .thread-message-user {
        margin-right: 10px;
    }
}

/* System Messages Section Styles */
.system-messages-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-top: 20px;
}

.system-message-form-container {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
    height: fit-content;
}

.system-message-form-container h2 {
    color: #fff;
    font-size: 20px;
    margin: 0 0 20px 0;
}

.system-message-form-container .form-group {
    margin-bottom: 20px;
}

.system-message-form-container label {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.system-message-form-container input[type="text"],
.system-message-form-container textarea,
.system-message-form-container select {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-family: 'Noto Sans', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

.system-message-form-container input[type="text"]:focus,
.system-message-form-container textarea:focus,
.system-message-form-container select:focus {
    outline: none;
    border-color: #ff3366;
}

.system-message-form-container textarea {
    resize: vertical;
    min-height: 150px;
}

.system-message-form-container select[multiple] {
    min-height: 140px;
    padding: 8px;
}

.system-message-form-container select[multiple] option {
    padding: 8px;
    margin: 2px 0;
    border-radius: 4px;
}

.system-message-form-container select[multiple] option:checked {
    background: linear-gradient(#ff3366, #ff3366);
    color: #fff;
}

.form-help-text {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.send-message-button {
    width: 100%;
    padding: 14px 24px;
    background-color: #ff3366;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.send-message-button:hover {
    background-color: #e62958;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.send-message-button:disabled {
    background-color: #666;
    cursor: not-allowed;
    transform: none;
}

.system-messages-history {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
}

.system-messages-history h2 {
    color: #fff;
    font-size: 20px;
    margin: 0 0 20px 0;
}

.messages-table-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #333;
    border-radius: 6px;
}

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

.messages-table thead {
    background-color: #222;
    position: sticky;
    top: 0;
    z-index: 10;
}

.messages-table th {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 14px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333;
}

.messages-table td {
    color: #ddd;
    font-size: 14px;
    padding: 14px 12px;
    border-bottom: 1px solid #2a2a2a;
}

.messages-table tbody tr:hover {
    background-color: #222;
}

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

.message-subject-cell {
    color: #ff3366;
    font-weight: 600;
}

.message-tiers-cell {
    color: #aaa;
    font-size: 13px;
}

.tier-tag {
    display: inline-block;
    padding: 3px 8px;
    background-color: rgba(255, 51, 102, 0.2);
    border-radius: 4px;
    margin-right: 4px;
    margin-bottom: 4px;
    font-size: 11px;
    color: #ff3366;
    font-weight: 600;
}

.message-date-cell {
    color: #aaa;
    font-size: 13px;
    white-space: nowrap;
}

.message-action-btn {
    background: #444;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
}

.message-action-btn:hover {
    background: #555;
    transform: translateY(-1px);
}

.message-action-btn.view {
    background: #4285F4;
}

.message-action-btn.view:hover {
    background: #5a95ff;
}

.message-action-btn.delete {
    background: #ff4757;
}

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

/* Message Modal for viewing full content */
.message-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
}

.message-modal-content {
    background: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80%;
    overflow-y: auto;
}

.message-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.message-modal-title {
    color: #ff3366;
    font-size: 22px;
    font-weight: 700;
}

.message-modal-close {
    background: #666;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.message-modal-close:hover {
    background: #777;
}

/* Contact Messages Table */
.contact-messages-table-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

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

.contact-messages-table thead {
    background: #222;
}

.contact-messages-table th {
    padding: 16px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-messages-table tbody tr {
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.2s;
}

.contact-messages-table tbody tr:hover {
    background: #222;
}

.contact-messages-table tbody tr:last-child {
    border-bottom: none;
}

.contact-messages-table td {
    padding: 16px;
    color: #ddd;
    font-size: 14px;
    vertical-align: top;
}

.contact-name-cell {
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.contact-email-cell {
    color: #ff3366;
    white-space: nowrap;
}

.contact-date-cell {
    color: #aaa;
    white-space: nowrap;
    font-size: 13px;
}

.contact-message-cell {
    max-width: 500px;
    line-height: 1.6;
    word-wrap: break-word;
}

/* Email Testing Section */
.email-testing-controls {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.email-testing-controls .form-group {
    flex: 1;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-testing-controls label {
    color: #ddd;
    font-size: 14px;
    font-weight: 500;
}

.email-testing-controls input[type="email"] {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.email-testing-controls input[type="email"]:focus {
    outline: none;
    border-color: #ff3366;
    background: #121212;
}

.secondary-button {
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.secondary-button:hover {
    background: #444;
    border-color: #555;
}

.email-templates-table-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

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

.email-templates-table thead {
    background: #222;
}

.email-templates-table th {
    padding: 16px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.email-templates-table tbody tr {
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.2s;
}

.email-templates-table tbody tr:hover {
    background: #222;
}

.email-templates-table tbody tr:last-child {
    border-bottom: none;
}

.email-templates-table td {
    padding: 16px;
    color: #ddd;
    font-size: 14px;
}

.template-name {
    font-weight: 500;
    color: #fff;
}

.template-description {
    color: #aaa;
}

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

.status-badge.active {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border: 1px solid #2ed573;
}

.status-badge.pending {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
    border: 1px solid #ffaa00;
}

.send-test-btn {
    background: #ff3366;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.send-test-btn:hover {
    background: #e62958;
    transform: translateY(-1px);
}

.send-test-btn:active {
    transform: translateY(0);
}

.send-test-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
}

/* Email Testing Section */
.email-testing-controls {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.email-testing-controls .form-group {
    flex: 1;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-testing-controls label {
    color: #ddd;
    font-size: 14px;
    font-weight: 500;
}

.email-testing-controls input[type="email"] {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.email-testing-controls input[type="email"]:focus {
    outline: none;
    border-color: #ff3366;
    background: #121212;
}

.secondary-button {
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.secondary-button:hover {
    background: #444;
    border-color: #555;
}

.email-templates-table-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

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

.email-templates-table thead {
    background: #222;
}

.email-templates-table th {
    padding: 16px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.email-templates-table tbody tr {
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.2s;
}

.email-templates-table tbody tr:hover {
    background: #222;
}

.email-templates-table tbody tr:last-child {
    border-bottom: none;
}

.email-templates-table td {
    padding: 16px;
    color: #ddd;
    font-size: 14px;
}

.template-name {
    font-weight: 500;
    color: #fff;
}

.template-description {
    color: #aaa;
}

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

.status-badge.active {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border: 1px solid #2ed573;
}

.status-badge.pending {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
    border: 1px solid #ffaa00;
}

.send-test-btn {
    background: #ff3366;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.send-test-btn:hover {
    background: #e62958;
    transform: translateY(-1px);
}

.send-test-btn:active {
    transform: translateY(0);
}

.send-test-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
}

.message-modal-body {
    color: #ddd;
    line-height: 1.8;
    font-size: 15px;
}

.message-modal-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #888;
    font-size: 13px;
}

@media (max-width: 1200px) {
    .system-messages-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .messages-table-container {
        overflow-x: auto;
    }
    
    .messages-table {
        min-width: 600px;
    }
    
    .message-modal-content {
        width: 95%;
        padding: 20px;
    }
}