/* InsideApps Custom Styles */

:root {
  --primary-color: #a3d9ff;
  --secondary-color: #ffcad4;
  --accent-color: #f3c4fb;
  --light-bg: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --success-color: #b5ead7;
  --warning-color: #ffdac1;
  --danger-color: #ffcad4;
  --info-color: #c7ceea;
  --error-bg: #fff5f5;
  --error-text: #ff8a8a;
  --error-border: #ffc2c2;
  
  /* Light status colors */
  --light-success-bg: #e8f7f3;
  --light-success-text: #5cb894;
  --light-danger-bg: #fff0f0;
  --light-danger-text: #ff8a8a;
  --light-warning-bg: #fff8f0;
  --light-warning-text: #ffaa5b;
  --light-info-bg: #eef2ff;
  --light-info-text: #8a9af7;
}

/* Dashboard Cards */
.icon-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.icon-card:hover {
  transform: translateY(-5px);
}

.icon-card .icon {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 15px;
}

.icon-card .icon.purple {
  background-color: var(--primary-color);
  color: #6a5acd;
}

.icon-card .icon.success {
  background-color: var(--success-color);
  color: #2e8b57;
}

.icon-card .icon.primary {
  background-color: var(--info-color);
  color: #4169e1;
}

.icon-card .icon.orange {
  background-color: var(--warning-color);
  color: #ff7f50;
}

/* Tables */
.card-style {
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.table {
  color: var(--text-color);
}

.table thead th {
  background-color: var(--light-bg);
  border-bottom: 2px solid var(--primary-color);
  color: var(--text-color);
  font-weight: 600;
}

.table tbody tr:hover {
  background-color: rgba(163, 217, 255, 0.1);
}

/* Status Buttons */
.status-btn {
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.status-btn.success-btn {
  background-color: var(--success-color);
  color: #2e8b57;
}

.status-btn.danger-btn {
  background-color: var(--danger-color);
  color: #8b0000;
}

/* Light Status Buttons */
.status-light-btn {
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid transparent;
}

.status-light-btn.success-btn {
  background-color: var(--light-success-bg);
  color: var(--light-success-text);
  border-color: rgba(92, 184, 148, 0.2);
  border-radius: 30px;
}

.status-light-btn.danger-btn {
  background-color: var(--light-danger-bg);
  color: var(--light-danger-text);
  border-color: rgba(255, 138, 138, 0.2);
  border-radius: 30px;
}

.status-light-btn.warning-btn {
  background-color: var(--light-warning-bg);
  color: var(--light-warning-text);
  border-color: rgba(255, 170, 91, 0.2);
  border-radius: 30px;
}

.status-light-btn.info-btn {
  background-color: var(--light-info-bg);
  color: var(--light-info-text);
  border-color: rgba(138, 154, 247, 0.2);
  border-radius: 30px;
}

/* Special inactive status button */
.inactive-status-btn {
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
  background-color: var(--light-danger-bg);
  color: var(--light-danger-text);
  border: 1px solid rgba(255, 138, 138, 0.2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Alert Styles */
.alert {
  border-radius: 20px;
  border: none;
}

.alert-danger {
  background-color: var(--error-bg);
  color: var(--error-text);
  border-left: 4px solid var(--error-border);
}

.alert .alert-icon {
  font-size: 24px;
  margin-right: 10px;
}

/* Action Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #333;
}

.btn-primary:hover {
  background-color: #8bc4ff;
  border-color: #8bc4ff;
  color: #333;
}

.btn-action {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #333;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-action:hover {
  background-color: #e5b3f0;
  border-color: #e5b3f0;
  transform: translateY(-2px);
}

/* Section Title */
.title h2 {
  color: var(--primary-color);
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
  font-size: 28px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.title h2:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 70px;
  height: 3px;
  background: var(--accent-color);
}

/* Primary Title */
.primary-title {
  color: var(--primary-color) !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 3px rgba(0,0,0,0.1);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
}

.primary-title:after {
  width: 100px !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color)) !important;
}

/* Text Primary Emphasis */
.text-primary-emphasis {
  color: var(--primary-color) !important;
  font-weight: 700;

}

/* User List Action Button */
.user-list-action {
  display: inline-block;
  background-color: var(--accent-color);
  color: #333;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 15px;
}

.user-list-action:hover {
  background-color: #e5b3f0;
  transform: translateY(-2px);
  color: #333;
  text-decoration: none;
}

/* Retry Button */
#retry-button {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 5px 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#retry-button:hover {
  background-color: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Error Message Container */
#dashboard-error {
  border-radius: 20px;
  background-color: var(--error-bg);
  border: none;
  box-shadow: 0 4px 10px rgba(255, 138, 138, 0.1);
  position: relative;
  overflow: hidden;
  padding: 15px 20px;
}

#dashboard-error:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--error-border);
  border-radius: 4px;
}

#dashboard-error h5 {
  color: var(--error-text);
  font-weight: 600;
}

#dashboard-error p {
  color: var(--error-text);
  opacity: 0.9;
}

/* Notification Filter Styles - Part 1 */
.notification-filter-container {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.notification-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.notification-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-title {
  color: #333;
  font-weight: 600;
  margin: 0;
  font-size: 1.5rem;
}

.notification-body {
  padding: 1.5rem;
}

/* Filter Form Styles */
.filter-form {
  margin-bottom: 2rem;
}

.filter-header {
  margin-bottom: 1rem;
}

.filter-title {
  color: #666;
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0;
}

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

.filter-item {
  margin-bottom: 1rem;
}

.search-item {
  grid-column: span 2;
}

.action-item {
  display: flex;
  align-items: flex-end;
}

/* Notification Filter Styles - Part 2 */
.filter-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #555;
}

.filter-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background-color: #f9f9f9;
  transition: all 0.2s;
}

.filter-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(163, 217, 255, 0.25);
  outline: none;
}

.date-input-group, .search-input-group {
  display: flex;
  gap: 0.5rem;
}

.today-btn, .search-btn, .reset-btn, .apply-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.today-btn {
  background-color: #f0f0f0;
  color: #555;
}

.today-btn:hover {
  background-color: #e0e0e0;
}

.search-btn {
  background-color: var(--primary-color);
  color: #333;
}

.search-btn:hover {
  background-color: #8bc4ff;
}

.reset-btn {
  background-color: #f0f0f0;
  color: #555;
}

.reset-btn:hover {
  background-color: #e0e0e0;
}

.apply-btn {
  background-color: var(--primary-color);
  color: #333;
}

.apply-btn:hover {
  background-color: #8bc4ff;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.records-count {
  margin: 0;
  font-weight: 500;
  color: #555;
}

.records-badge {
  background-color: var(--light-success-bg);
  color: var(--light-success-text);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

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

.view-toggle {
  display: flex;
  gap: 0.25rem;
}

.view-btn {
  background-color: #f0f0f0;
  border: none;
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn.active {
  background-color: var(--primary-color);
  color: #333;
}

/* Pagination */
.pagination-wrapper {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn {
  background-color: #f0f0f0;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: #555;
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

.pagination-btn:hover:not([disabled]) {
  background-color: var(--primary-color);
  color: #333;
}

.pagination-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.pagination-info {
  padding: 0.5rem 1rem;
  background-color: #f9f9f9;
  border-radius: 6px;
  color: #555;
  font-weight: 500;
}

/* Table Styles */
#table-view table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#table-view th {
  background-color: #f5f5f5;
  color: #555;
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  border-bottom: 2px solid var(--primary-color);
}

#table-view td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

#table-view tr:last-child td {
  border-bottom: none;
}

#table-view tr:hover td {
  background-color: rgba(163, 217, 255, 0.1);
}

/* Card View */
#card-view .card {
  transition: transform 0.2s;
  border-radius: 8px;
}

#card-view .card:hover {
  transform: translateY(-3px);
}

#card-view .card-header {
  padding: 1rem;
  border-radius: 8px 8px 0 0;
}

#card-view .card-body {
  padding: 1rem;
}

#card-view .card-footer {
  padding: 1rem;
  background-color: transparent;
}

/* ========================================
   CHANNEL MANAGEMENT STYLES
   ======================================== */

/* Channel List Styles */
.channel-list-card {
    border-radius: 20px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
    margin-top: 2rem;
}

.channel-list-card .notification-header {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Channel Cards */
.channel-card {
    border-radius: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.channel-card:nth-child(1) { animation-delay: 0.1s; }
.channel-card:nth-child(2) { animation-delay: 0.2s; }
.channel-card:nth-child(3) { animation-delay: 0.3s; }
.channel-card:nth-child(4) { animation-delay: 0.4s; }
.channel-card:nth-child(5) { animation-delay: 0.5s; }
.channel-card:nth-child(6) { animation-delay: 0.6s; }

/* Channel Card Header */
.channel-card-header {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f8ff 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem;
    border-radius: 15px 15px 0 0 !important;
}

.channel-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #e8f2ff 0%, #f0f8ff 100%);
    border: 2px solid #d1ecf1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    font-size: 1.2rem;
}

.channel-name {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
}

.channel-code {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.channel-type-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

/* Channel Details List */
.channel-details {
    border-radius: 0;
}

.channel-details .list-group-item {
    border: none;
    border-bottom: 1px solid #f8f9fa;
    padding: 0.875rem 0;
    background: transparent;
}

.channel-details .list-group-item:last-child {
    border-bottom: none;
}

.detail-item {
    display: flex;
    align-items: center;
}

.detail-label {
    color: #495057;
    font-weight: 500;
    font-size: 0.875rem;
}

.detail-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Channel Actions */
.channel-actions {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1rem;
}

.channel-actions .btn {
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    min-width: 120px;
}

.channel-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.channel-actions .btn i {
    font-size: 0.875rem;
}

/* Channel Detail Styles */
.channel-detail-card {
    border-radius: 20px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
    margin-top: 2rem;
}

.channel-detail-card .notification-header {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Information Cards */
.channel-info-card,
.template-card,
.account-card,
.actions-card,
.stats-card {
    border-radius: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.channel-info-card:hover,
.template-card:hover,
.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.channel-info-card { animation-delay: 0.1s; }
.template-card { animation-delay: 0.2s; }
.account-card { animation-delay: 0.3s; }
.actions-card { animation-delay: 0.1s; }
.stats-card { animation-delay: 0.2s; }

/* Card Headers */
.channel-info-card .card-header,
.template-card .card-header,
.account-card .card-header,
.actions-card .card-header,
.stats-card .card-header {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f8ff 100%);
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0 !important;
    padding: 1rem 1.25rem;
}

.channel-info-card .card-title,
.template-card .card-title,
.account-card .card-title,
.actions-card .card-title,
.stats-card .card-title {
    color: #2c3e50 !important;
    font-weight: 600;
    font-size: 1rem;
}

.channel-info-card .card-title i,
.template-card .card-title i,
.account-card .card-title i,
.actions-card .card-title i,
.stats-card .card-title i {
    color: #495057 !important;
}

.card-title {
    color: #495057;
    font-weight: 600;
    font-size: 1rem;
}

.card-title i {
    color: #6c757d;
}

/* Information Items */
.info-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

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

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

.info-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Code Displays */
.channel-code-display,
.dsn-display {
    background: #f8f9fa;
    color: #495057;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

/* Template Content */
.template-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.template-content {
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.template-text {
    background: white;
    color: #495057;
    padding: 1rem;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.template-text::-webkit-scrollbar {
    width: 6px;
}

.template-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.template-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.template-text::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Statistics Card */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.875rem;
}

.stat-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Badge Variants */
.bg-email {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white;
}

.bg-sms {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
    color: white;
}

.bg-push {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%) !important;
    color: white;
}

/* Empty State */
.empty-state {
    padding: 4rem 2rem;
}

.empty-icon {
    margin-bottom: 1.5rem;
}

.empty-state h5 {
    color: #495057;
    font-weight: 600;
}

.empty-state p {
    color: #6c757d;
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto 2rem;
}

/* Loading State */
.channel-loading,
.channel-detail-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.channel-loading .spinner-border,
.channel-detail-loading .spinner-border {
    color: #667eea;
}

.channel-detail-loading {
    height: 400px;
}

/* Responsive Design for Channels */
@media (max-width: 768px) {
    .channel-list-card,
    .channel-detail-card {
        margin-top: 1rem;
        border-radius: 15px !important;
    }
    
    .channel-card,
    .channel-info-card,
    .template-card,
    .account-card,
    .actions-card,
    .stats-card {
        margin-bottom: 1.5rem;
    }
    
    .channel-card-header {
        padding: 1rem;
    }
    
    .channel-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .channel-name {
        font-size: 0.9rem;
    }
    
    .channel-actions .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state .empty-icon i {
        font-size: 3rem !important;
    }
    
    .notification-header .col-md-4 {
        text-align: left !important;
        margin-top: 1rem;
    }
    
    .notification-header .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .template-text {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
    
    .actions-card .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
}
