/* Dashboard Specific Styles */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: var(--gray-100);
}

.dark .dashboard-layout {
    background: var(--gray-900);
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--gray-200);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.dark .sidebar {
    background: var(--gray-800);
    border-right-color: var(--gray-700);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.dark .sidebar-header {
    border-bottom-color: var(--gray-700);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dark .nav-link {
    color: var(--gray-300);
}

.nav-link:hover {
    background: var(--gray-50);
    color: var(--brand-primary);
}

.dark .nav-link:hover {
    background: var(--gray-700);
}

.nav-link.active {
    background: var(--gray-50);
    color: var(--brand-primary);
    border-left-color: var(--brand-primary);
    font-weight: 600;
}

.dark .nav-link.active {
    background: var(--gray-700);
}

.nav-icon {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dark .dashboard-header {
    background: var(--gray-800);
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.dark .dashboard-title {
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--brand-primary);
}

.dark .stat-card {
    background: var(--gray-800);
}

.stat-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.dark .stat-value {
    color: white;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.dark .stat-label {
    color: var(--gray-400);
}

.data-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dark .data-table {
    background: var(--gray-800);
}

.table-header {
    background: var(--gray-50);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
}

.dark .table-header {
    background: var(--gray-700);
    border-bottom-color: var(--gray-600);
}

.table-content {
    max-height: 400px;
    overflow-y: auto;
}

.table-row {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    transition: background 0.2s ease;
}

.dark .table-row {
    border-bottom-color: var(--gray-700);
}

.table-row:hover {
    background: var(--gray-50);
}

.dark .table-row:hover {
    background: var(--gray-700);
}

.table-row:last-child {
    border-bottom: none;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981;
    font-size: 0.9rem;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.chat-container {
    background: white;
    border-radius: 12px;
    height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dark .chat-container {
    background: var(--gray-800);
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.dark .chat-header {
    background: var(--gray-700);
    border-bottom-color: var(--gray-600);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.message.sent {
    align-self: flex-end;
    background: var(--brand-primary);
    color: white;
}

.message.received {
    align-self: flex-start;
    background: var(--gray-100);
    color: var(--gray-900);
}

.dark .message.received {
    background: var(--gray-700);
    color: white;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.map-container {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 1.1rem;
}

.dark .map-container {
    background: var(--gray-700);
    color: var(--gray-400);
}

.device-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.dark .device-status {
    background: var(--gray-700);
}

.status-online {
    color: #10b981;
}

.status-offline {
    color: #ef4444;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.dark .tabs {
    border-bottom-color: var(--gray-700);
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.dark .tab {
    color: var(--gray-400);
}

.tab.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

.tab:hover {
    color: var(--brand-primary);
    background: var(--gray-50);
}

.dark .tab:hover {
    background: var(--gray-700);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-200);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .dashboard-header {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .message {
        max-width: 85%;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Social Media App Specific Styles */
.social-app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-app-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.whatsapp { background: #25d366; }
.telegram { background: #0088cc; }
.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.snapchat { background: #fffc00; color: black !important; }
.facebook { background: #1877f2; }
.twitter { background: #1da1f2; }
.signal { background: #3a76f0; }
.discord { background: #5865f2; }

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-item:hover {
    background: var(--gray-50);
}

.dark .contact-item:hover {
    background: var(--gray-700);
}

.contact-item.active {
    background: var(--gray-100);
}

.dark .contact-item.active {
    background: var(--gray-600);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-last-message {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.dark .contact-last-message {
    color: var(--gray-400);
}

.app-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.app-tab {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark .app-tab {
    background: var(--gray-700);
    color: white;
}

.app-tab.active {
    background: var(--brand-primary);
    color: white;
}