@extends('layouts.admin')

@section('title', 'Call Management')

@section('content')
<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                    <h3 class="card-title">Call Management</h3>
                    <button class="btn btn-primary float-right">
                        <i class="fas fa-plus"></i> New Call
                    </button>
                </div>
                <div class="card-body">
                    <div class="row mb-4">
                        <div class="col-md-3">
                            <div class="card stat-card">
                                <div class="card-body text-center">
                                    <h5>Total Calls</h5>
                                    <h2>24,862</h2>
                                    <span class="text-success">+8% this week</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="card stat-card">
                                <div class="card-body text-center">
                                    <h5>Active Calls</h5>
                                    <h2>42</h2>
                                    <span class="text-success">+12 today</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="card stat-card">
                                <div class="card-body text-center">
                                    <h5>Avg. Duration</h5>
                                    <h2>5:12</h2>
                                    <span class="text-success">+0:30 avg</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="card stat-card">
                                <div class="card-body text-center">
                                    <h5>Success Rate</h5>
                                    <h2>87%</h2>
                                    <span class="text-success">+3% this month</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                                <tr>
                                    <th>Call ID</th>
                                    <th>From</th>
                                    <th>To</th>
                                    <th>Duration</th>
                                    <th>Status</th>
                                    <th>Cost</th>
                                    <th>Date/Time</th>
                                    <th>Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>CL-1001</td>
                                    <td>+91 9876543210</td>
                                    <td>+91 8765432109</td>
                                    <td>05:12</td>
                                    <td><span class="badge bg-success">Completed</span></td>
                                    <td>₹12.50</td>
                                    <td>15 May, 10:30 AM</td>
                                    <td>
                                        <button class="btn btn-sm btn-info" title="View Details">
                                            <i class="fas fa-info-circle"></i>
                                        </button>
                                        <button class="btn btn-sm btn-warning" title="Transcript">
                                            <i class="fas fa-file-alt"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>CL-1002</td>
                                    <td>+91 9876543211</td>
                                    <td>+91 8765432108</td>
                                    <td>03:45</td>
                                    <td><span class="badge bg-success">Completed</span></td>
                                    <td>₹8.75</td>
                                    <td>15 May, 11:45 AM</td>
                                    <td>
                                        <button class="btn btn-sm btn-info" title="View Details">
                                            <i class="fas fa-info-circle"></i>
                                        </button>
                                        <button class="btn btn-sm btn-warning" title="Transcript">
                                            <i class="fas fa-file-alt"></i>
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection