<?php $__env->startSection('title', 'Theme & Branding'); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid">
    <?php if(session('success')): ?>
        <div class="alert alert-success alert-dismissible fade show mb-4 border-0 shadow-sm" role="alert">
            <i class="fas fa-check-circle me-2"></i> <?php echo e(session('success')); ?>

            <button type="button" class="btn-close" data-dismiss="alert" aria-label="Close"></button>
        </div>
    <?php endif; ?>

    <div class="row">
        <div class="col-md-9">
            <div class="card card-primary card-outline">
                <div class="card-header">
                    <h3 class="card-title font-weight-bold"><i class="fas fa-palette mr-1"></i> Visual Customization</h3>
                </div>
                <div class="card-body">
                    <form action="<?php echo e(route('settings.update')); ?>" method="POST">
                        <?php echo csrf_field(); ?>
                        <div class="row g-4">
                            <div class="col-12 mb-2">
                                <h6 class="fw-bold text-muted border-bottom pb-2">Color Palette</h6>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Primary Color / Highlight</label>
                                <div class="input-group">
                                    <input type="color" class="form-control form-control-color" style="max-width: 60px;" name="theme_color_primary" value="<?php echo e(old('theme_color_primary', $settings->theme_color_primary ?? '#6f42c1')); ?>" title="Choose primary color">
                                    <input type="text" class="form-control" value="<?php echo e(old('theme_color_primary', $settings->theme_color_primary ?? '#6f42c1')); ?>" readonly>
                                </div>
                                <small class="text-muted">Used for buttons, links, and active sidebar items.</small>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Navbar Color (Top Bar)</label>
                                <div class="input-group">
                                    <input type="color" class="form-control form-control-color" style="max-width: 60px;" name="theme_color_navbar" value="<?php echo e(old('theme_color_navbar', $settings->theme_color_navbar ?? '#ffffff')); ?>" title="Choose navbar color">
                                    <input type="text" class="form-control" value="<?php echo e(old('theme_color_navbar', $settings->theme_color_navbar ?? '#ffffff')); ?>" readonly>
                                </div>
                                <small class="text-muted">Background color of the top header area.</small>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Navbar Text/Icon Color</label>
                                <div class="input-group">
                                    <input type="color" class="form-control form-control-color" style="max-width: 60px;" name="theme_color_navbar_text" value="<?php echo e(old('theme_color_navbar_text', $settings->theme_color_navbar_text ?? '#333333')); ?>" title="Choose navbar text color">
                                    <input type="text" class="form-control" value="<?php echo e(old('theme_color_navbar_text', $settings->theme_color_navbar_text ?? '#333333')); ?>" readonly>
                                </div>
                                <small class="text-muted">Color of links and icons in top bar.</small>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Body Text Color</label>
                                <div class="input-group">
                                    <input type="color" class="form-control form-control-color" style="max-width: 60px;" name="theme_text_color" value="<?php echo e(old('theme_text_color', $settings->theme_text_color ?? '#333333')); ?>" title="Choose text color">
                                    <input type="text" class="form-control" value="<?php echo e(old('theme_text_color', $settings->theme_text_color ?? '#333333')); ?>" readonly>
                                </div>
                                <small class="text-muted">Main content text color.</small>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Sidebar Background Color</label>
                                <div class="input-group">
                                    <input type="color" class="form-control form-control-color" style="max-width: 60px;" name="theme_color_sidebar" value="<?php echo e(old('theme_color_sidebar', $settings->theme_color_sidebar ?? '#7386D5')); ?>" title="Choose sidebar color">
                                    <input type="text" class="form-control" value="<?php echo e(old('theme_color_sidebar', $settings->theme_color_sidebar ?? '#7386D5')); ?>" readonly>
                                </div>
                                <small class="text-muted">Background color of the side menu.</small>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Sidebar Text Color</label>
                                <div class="input-group">
                                    <input type="color" class="form-control form-control-color" style="max-width: 60px;" name="theme_color_sidebar_text" value="<?php echo e(old('theme_color_sidebar_text', $settings->theme_color_sidebar_text ?? '#ffffff')); ?>" title="Choose sidebar text color">
                                    <input type="text" class="form-control" value="<?php echo e(old('theme_color_sidebar_text', $settings->theme_color_sidebar_text ?? '#ffffff')); ?>" readonly>
                                </div>
                                <small class="text-muted">Text color for side menu items.</small>
                            </div>

                            <div class="col-12 mt-4 mb-2">
                                <h6 class="fw-bold text-muted border-bottom pb-2">Typography</h6>
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Font Family</label>
                                <select class="form-select" name="theme_font_family">
                                    <?php
                                        $fonts = [
                                            'Inter' => 'Inter, sans-serif',
                                            'Roboto' => 'Roboto, sans-serif',
                                            'Open Sans' => '"Open Sans", sans-serif',
                                            'Lato' => 'Lato, sans-serif',
                                            'Poppins' => 'Poppins, sans-serif'
                                        ];
                                        $currentFont = $settings->theme_font_family ?? 'Inter';
                                    ?>
                                    <?php $__currentLoopData = $fonts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name => $cssVal): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($name); ?>" <?php echo e($currentFont == $name ? 'selected' : ''); ?>><?php echo e($name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                                <small class="text-muted">Select the primary font for the application.</small>
                            </div>
                        </div>

                        <?php if(auth()->user()->canAccess('settings.theme')): ?>
                        <div class="text-end mt-4">
                            <button type="submit" class="btn btn-primary">
                                <i class="fas fa-save me-2"></i> Save Theme Settings
                            </button>
                        </div>
                        <?php endif; ?>
                    </form>
                </div>
            </div>
        </div>

        <div class="col-md-3">
            <div class="info-box bg-light shadow-none border">
                <span class="info-box-icon text-primary"><i class="fas fa-palette"></i></span>
                <div class="info-box-content">
                    <span class="info-box-text font-weight-bold">Customization</span>
                    <span class="info-box-number small text-muted">Personalize your HR experience.</span>
                </div>
            </div>
            <div class="alert alert-warning border shadow-none">
                <h5 class="font-weight-bold small text-uppercase"><i class="icon fas fa-exclamation-triangle mr-2"></i> System Note</h5>
                <p class="small mb-0">Changes to color themes and typography will apply globally upon clicking <strong>Save Settings</strong>.</p>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\hrms\resources\views/admin/settings/theme.blade.php ENDPATH**/ ?>