@extends('layouts.app')
@section('title', 'Companies')
@section('breadcrumb')
    <a href="{{ route('admin.index') }}" style="color:var(--text-secondary);">Admin</a>
    <span class="topbar-breadcrumb-sep">/</span>
    <span style="font-weight:600;color:var(--text-primary);">Companies</span>
@endsection

@section('content')
    <div class="page-header"><h1>Companies</h1></div>

    <div class="card">
        <div class="table-wrapper">
            <table>
                <thead>
                    <tr><th>Company</th><th>Plan</th><th>Users</th><th>Teams</th><th>Projects</th><th>Status</th></tr>
                </thead>
                <tbody>
                    @foreach($companies as $company)
                        <tr>
                            <td class="font-semibold">{{ $company->name }}</td>
                            <td><span class="badge badge-primary">{{ $company->subscription_plan }}</span></td>
                            <td>{{ $company->users_count }}</td>
                            <td>{{ $company->teams_count }}</td>
                            <td>{{ $company->projects_count }}</td>
                            <td><span class="badge badge-{{ $company->is_active ? 'success' : 'danger' }}">{{ $company->is_active ? 'Active' : 'Inactive' }}</span></td>
                        </tr>
                    @endforeach
                </tbody>
            </table>
        </div>
    </div>
@endsection
