/* ============================================
   MDC PLATFORM - COMPLETE STYLESHEET
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

/* Logo Section */
.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-logo:hover {
    background-color: rgba(233, 69, 96, 0.05);
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560 0%, #ff6b7a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.logo-text {
    flex: 1;
    min-width: 0;
}

.logo-main {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation */
.sidebar-nav {
    padding: 16px 0;
}

.nav-section {
    margin-bottom: 8px;
    padding: 0 12px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 8px 8px;
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.nav-item:hover {
    background-color: rgba(233, 69, 96, 0.15);
    color: white;
}

.nav-item.active {
    background-color: #e94560;
    color: white;
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #ff6b7a;
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item.active .nav-badge {
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-style-item {
    padding: 8px 12px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f7fa;
}

/* Top Bar */
.topbar {
    background-color: white;
    padding: 20px 32px;
    border-bottom: 1px solid #e8ecf1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topbar-left {
    flex: 1;
    min-width: 0;
}

.topbar-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.topbar-breadcrumb {
    font-size: 13px;
    color: #7f8c8d;
}

.topbar-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.topbar-breadcrumb a:hover {
    text-decoration: underline;
}

.topbar-center {
    flex: 0 1 300px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #e8ecf1;
    border-radius: 6px;
    font-size: 13px;
    background-color: #f9fafb;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    background-color: white;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #7f8c8d;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Footer */
.footer {
    background-color: white;
    padding: 20px 32px;
    border-top: 1px solid #e8ecf1;
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: auto;
}

/* ============================================
   CARDS AND STAT CARDS
   ============================================ */

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e8ecf1;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.stat-card-change {
    font-size: 12px;
    font-weight: 500;
}

.stat-card-change.positive {
    color: #27ae60;
}

.stat-card-change.negative {
    color: #e74c3c;
}

.stat-card-change.neutral {
    color: #95a5a6;
}

.stat-card.accent {
    border-left: 4px solid #e94560;
}

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

.card {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e8ecf1;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.card-header-actions {
    display: flex;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid #e8ecf1;
    background-color: #f9fafb;
    font-size: 13px;
    color: #7f8c8d;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
}

/* ============================================
   TABLES
   ============================================ */

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

.table thead {
    background-color: #f9fafb;
    border-bottom: 2px solid #e8ecf1;
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #7f8c8d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid #e8ecf1;
    transition: background-color 0.2s ease;
}

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

.table td {
    padding: 12px 16px;
    color: #2c3e50;
}

.table td.text-right {
    text-align: right;
}

.table td.text-center {
    text-align: center;
}

.table a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

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

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8ecf1;
}

.pagination-btn {
    padding: 6px 10px;
    border: 1px solid #e8ecf1;
    background-color: white;
    color: #2c3e50;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #3498db;
    color: #3498db;
}

.pagination-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

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

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

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

.btn-primary:hover {
    background-color: #d63a52;
}

.btn-primary-light {
    background-color: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

.btn-primary-light:hover {
    background-color: rgba(233, 69, 96, 0.15);
}

.btn-secondary {
    background-color: #3498db;
    color: white;
}

.btn-secondary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-outline {
    background-color: white;
    color: #2c3e50;
    border: 1px solid #e8ecf1;
}

.btn-outline:hover {
    border-color: #3498db;
    color: #3498db;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 6px;
    background-color: #f9fafb;
    color: #2c3e50;
    border: 1px solid #e8ecf1;
    font-size: 16px;
}

.btn-icon:hover {
    background-color: #e8ecf1;
}

/* ============================================
   FILTERS AND FORM ELEMENTS
   ============================================ */

.filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #e8ecf1;
    color: #2c3e50;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #d1d5db;
}

.filter-chip:hover {
    background-color: #d1d5db;
}

.filter-chip.active {
    background-color: #e94560;
    color: white;
    border-color: #e94560;
}

.filter-chip-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    font-size: 12px;
    cursor: pointer;
}

.filter-chip.active .filter-chip-close {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8ecf1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   BADGES AND STATUS INDICATORS
   ============================================ */

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

.badge-success {
    background-color: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.badge-warning {
    background-color: rgba(241, 196, 15, 0.1);
    color: #f39c12;
}

.badge-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.badge-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.badge-primary {
    background-color: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.active {
    background-color: #27ae60;
}

.status-dot.inactive {
    background-color: #95a5a6;
}

.status-dot.pending {
    background-color: #f39c12;
}

.status-dot.error {
    background-color: #e74c3c;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */

.activity-feed {
    list-style: none;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e8ecf1;
}

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background-color: #f9fafb;
    border: 1px solid #e8ecf1;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.activity-description {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: #95a5a6;
}

/* ============================================
   CHARTS AND PERFORMANCE
   ============================================ */

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 20px 0;
}

.performance-bar {
    width: 100%;
    height: 6px;
    background-color: #e8ecf1;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.performance-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #e94560 0%, #ff6b7a 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.performance-bar.success .performance-bar-fill {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
}

.performance-bar.warning .performance-bar-fill {
    background: linear-gradient(90deg, #f39c12 0%, #f1c40f 100%);
}

/* ============================================
   ENGAGEMENT BLOCKS
   ============================================ */

.engagement-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.engagement-item {
    background-color: white;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.engagement-item-value {
    font-size: 24px;
    font-weight: 700;
    color: #e94560;
    margin-bottom: 8px;
}

.engagement-item-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid {
    display: grid;
    gap: 20px;
}

.grid.two-col {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid.three-col {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid.four-col {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================
   LISTS
   ============================================ */

.list {
    list-style: none;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e8ecf1;
}

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

.list-item-content {
    flex: 1;
}

.list-item-label {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.list-item-secondary {
    font-size: 12px;
    color: #7f8c8d;
}

.list-item-value {
    font-size: 14px;
    font-weight: 600;
    color: #e94560;
    text-align: right;
}

.list-item-badge {
    margin-left: 12px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid.two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    .topbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .topbar-center {
        flex: 1;
    }

    .content-area {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .grid.three-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px 12px;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-chip {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .sidebar {
        width: 60px;
        padding: 12px 0;
    }

    .sidebar-logo {
        justify-content: center;
        padding: 16px 8px;
    }

    .logo-text {
        display: none;
    }

    .main-content {
        margin-left: 60px;
    }

    .nav-label {
        display: none;
    }

    .nav-badge {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 10px 8px;
    }

    .topbar {
        padding: 16px;
        flex-direction: column;
    }

    .topbar-title {
        font-size: 18px;
    }

    .topbar-center {
        width: 100%;
    }

    .content-area {
        padding: 16px;
    }

    .card-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header h2 {
        margin-bottom: 12px;
    }

    .card-body {
        padding: 16px;
    }

    .grid.three-col,
    .grid.four-col {
        grid-template-columns: 1fr;
    }

    .stat-card-value {
        font-size: 22px;
    }

    .table {
        font-size: 11px;
        overflow-x: auto;
    }

    .filters {
        gap: 8px;
    }

    .filter-chip {
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: #7f8c8d;
}

.text-primary {
    color: #e94560;
}

.text-success {
    color: #27ae60;
}

.text-warning {
    color: #f39c12;
}

.text-danger {
    color: #e74c3c;
}

.font-bold {
    font-weight: 600;
}

.font-light {
    font-weight: 300;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.hidden {
    display: none;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.rounded {
    border-radius: 6px;
}

.rounded-full {
    border-radius: 9999px;
}
