@extends('layouts.app')

@section('page_title', 'My Profile')

@section('content')
    <div class="card w-100">
        <!-- Banner -->
        <div class="banner d-flex align-items-center p-3">
            <div class="banner-icon me-3">
                <i class="fas fa-user-circle" style="font-size: 40px; color: #6c757d;"></i>
            </div>
            <h4 class="fw-bold text-primary mb-0" style="margin-left:10px">{{ $user['admin']['username'] ?? 'N/A' }}</h4>
        </div>

        <!-- Profile Section -->
        <div class="card-body p-4">
            <div class="row">
                <!-- Profile Information -->
                <div class="col-md-9">
                    <h3 class="fw-bold mb-3" style="font-size: 20px; font-weight:400">My Information</h3>
                    <div class="mb-2">
                        <span class="fw-bold text-dark">Username: </span>
                        <span>{{ $user['admin']['username'] ?? 'N/A' }}</span>
                    </div>
                    <div class="mb-2">
                        <span class="fw-bold text-dark">Email: </span>
                        <a href="mailto:{{ $user['admin']['email'] ?? 'N/A' }}" class="text-primary">{{ $user['admin']['email'] ?? 'N/A' }}</a>
                    </div>
                    <div>
                        <span class="fw-bold text-dark">Access Role: </span>
                        <span>{{ $user['admin']['role'] ?? 'N/A' }}</span>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <style>
        .card {
            border-radius: 5px;
            border: 1px solid #dee2e6;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            margin-top: 1rem;
        }
        .banner {
            background-color: #e6f0fa;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
            border-bottom: 1px solid #dee2e6;
        }
        .text-primary {
            color: #003087 !important;
        }
        .text-dark {
            color: #343a40 !important;
        }
        .profile-picture img {
            transition: all 0.3s ease;
        }
        .profile-picture img:hover {
            opacity: 0.9;
        }
        .card-body {
            font-size: 0.9rem;
        }
        .card-body .fw-bold {
            font-size: 0.95rem;
        }
        .btn-primary {
            background-color: #0d6efd;
            border-color: #0d6efd;
            font-size: 0.85rem;
            padding: 0.25rem 0.75rem;
        }
        .btn-primary:hover {
            background-color: #0b5ed7;
            border-color: #0b5ed7;
        }
        @media (max-width: 576px) {
            .profile-picture img {
                width: 60px;
                height: 60px;
            }
            .card-body {
                font-size: 0.85rem;
            }
            .card-body .fw-bold {
                font-size: 0.9rem;
            }
            .banner {
                padding: 1.5rem;
            }
            .banner-icon i {
                font-size: 30px;
            }
            .banner h4 {
                font-size: 1.25rem;
            }
        }
    </style>
@endsection