/* ===================================
   MODULE-SPECIFIC STYLES
   Consistent styling across all modules
   =================================== */

/* Card Styles */
.module-card {
    background: var(--card-bg-1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color-1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.module-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

[data-theme="dark"] .module-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-theme="dark"] .module-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.module-card-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color-1);
}

.module-card-header h2 {
    color: var(--text-color-1);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.module-card-header h2 i {
    color: var(--primary-color-1);
}

/* Info Box */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    color: #1565c0;
}

[data-theme="dark"] .info-box {
    background: rgba(33, 150, 243, 0.15);
    border-left-color: #64b5f6;
    color: #90caf9;
}

.info-box i {
    color: #2196f3;
    margin-right: 0.5rem;
}

[data-theme="dark"] .info-box i {
    color: #64b5f6;
}

/* Channel Cards */
.channel-card {
    background: var(--card-bg-1);
    border: 2px solid var(--primary-color-1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.channel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 138, 137, 0.2);
}

.channel-card h3 {
    color: var(--text-color-1);
    margin-bottom: 0.5rem;
}

.channel-card p {
    color: var(--text-secondary-1);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Stat Cards */
.stat-card {
    background: var(--card-bg-1);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--primary-color-1);
}

[data-theme="dark"] .stat-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color-1);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-secondary-1);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.success {
    background: #d4edda;
    color: #155724;
}

[data-theme="dark"] .badge.success {
    background: rgba(40, 167, 69, 0.2);
    color: #6cff8f;
}

.badge.danger, .badge.failed {
    background: #f8d7da;
    color: #721c24;
}

[data-theme="dark"] .badge.danger,
[data-theme="dark"] .badge.failed {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b7a;
}

.badge.warning {
    background: #fff3cd;
    color: #856404;
}

[data-theme="dark"] .badge.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.badge.secondary {
    background: #e2e3e5;
    color: #383d41;
}

[data-theme="dark"] .badge.secondary {
    background: rgba(108, 117, 125, 0.2);
    color: #adb5bd;
}

.badge.primary {
    background: var(--primary-color-1);
    color: white;
}

.badge.pending {
    background: #d1ecf1;
    color: #0c5460;
}

[data-theme="dark"] .badge.pending {
    background: rgba(23, 162, 184, 0.2);
    color: #5dd5f3;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg-1);
}

.data-table thead {
    background: var(--primary-color-1);
    color: white;
}

[data-theme="dark"] .data-table thead {
    background: rgba(76, 138, 137, 0.8);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color-1);
    color: var(--text-color-1);
}

.data-table tbody tr:hover {
    background: var(--hover-bg, rgba(76, 138, 137, 0.05));
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: rgba(76, 138, 137, 0.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color-1);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color-1);
    border-radius: 8px;
    background: var(--card-bg-1);
    color: var(--text-color-1);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color-1);
    box-shadow: 0 0 0 3px rgba(76, 138, 137, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary-1);
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color-1);
    color: white;
}

.btn-primary:hover {
    background: #4ca8a6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 138, 137, 0.3);
}

.btn-secondary {
    background: var(--border-color-1);
    color: var(--text-color-1);
}

[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color-1);
}

.btn-secondary:hover {
    background: var(--text-secondary-1);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Modal Improvements */
.modal {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .modal {
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: var(--card-bg-1);
    border: 1px solid var(--border-color-1);
}

.modal-header {
    border-bottom: 1px solid var(--border-color-1);
}

.modal-header h2 {
    color: var(--text-color-1);
}

.modal-close {
    color: var(--text-secondary-1);
}

.modal-close:hover {
    color: var(--text-color-1);
}

/* Switch/Toggle Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

[data-theme="dark"] .slider {
    background-color: #555;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color-1);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Theme Toggle Container */
.theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--border-color-1);
    border-radius: 8px;
    padding: 0.25rem;
}

[data-theme="dark"] .theme-toggle-container {
    background: rgba(255, 255, 255, 0.1);
}

.theme-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary-1);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.theme-mode-btn:hover {
    color: var(--text-color-1);
    background: rgba(76, 138, 137, 0.1);
}

[data-theme="dark"] .theme-mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-mode-btn.active {
    background: var(--primary-color-1);
    color: white;
    box-shadow: 0 2px 4px rgba(76, 138, 137, 0.2);
}

.theme-mode-btn i {
    font-size: 0.9rem;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .module-card {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

