<div class="content-wrapper">
    <div class="container-fluid mt-4">
        <div class="row">
            <div class="col-lg-12">
                <div class="card shadow-sm mb-4 border-0">
                    <!-- Header -->
                    <div class="card-header bg-success text-white py-2 px-3">
                        <h6 class="mb-0">
                            <i class="fas fa-pen me-2"></i> Favor Prense Formulariu Materia
                        </h6>
                    </div>

                    <!-- Body -->
                    <div class="card-body p-4">
                        <?= form_open('materia/saluva'); ?>

                        <div class="row">
                            <div class="col-md-6 form-group mb-3">
                                <label class="small font-weight-bold text-muted">Kode Materia</label>
                                <input type="text" name="kode_materia" class="form-control" required>
                            </div>
                            <div class="col-md-6 form-group mb-3">
                                <label class="small font-weight-bold text-muted">Naran Materia</label>
                                <input type="text" name="naran_materia" class="form-control" required>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-4 form-group mb-3">
                                <label class="small font-weight-bold text-muted">Credito</label>
                                <input type="text" name="credito" class="form-control" required>
                            </div>
                            <div class="col-md-4 form-group mb-3">
                                <label class="small font-weight-bold text-muted">Semestre</label>
                                <select name="semestre" class="form-control" required>
                                    <option value="">-- Hili Semestre --</option>
                                    <option value="I">I</option>
                                    <option value="II">II</option>
                                    <option value="III">III</option>
                                    <option value="IV">IV</option>
                                    <option value="V">V</option>
                                    <option value="VI">VI</option>
                                    <option value="VII">VII</option>
                                    <option value="VIII">VIII</option>
                                </select>
                            </div>
                            <div class="col-md-4 form-group mb-3">
                                <label class="small font-weight-bold text-muted">Total Credito</label>
                                <input type="text" name="total_credito" class="form-control" min="0" required>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-4 form-group mb-3">
                                <label class="small font-weight-bold text-muted">Total Materia</label>
                                <input type="text" name="total_materia" class="form-control" required>
                            </div>
                            <div class="col-md-4 form-group mb-3">
                                <label class="small font-weight-bold text-muted">Tipu</label>
                                <select name="tipu" class="form-control" required>
                                    <option value="">-- Hili Tipu --</option>
                                    <option value="Espesifiku">Espesifiku</option>
                                    <option value="Geral">Geral</option>
                                </select>
                            </div>
                            <div class="col-md-4 form-group mb-3">
                                <label class="small font-weight-bold text-muted">Departamentu</label>
                                <select name="departamentu" id="departamentu" class="form-control" required>
                                    <option value="">-- Hili Departamentu --</option>
                                    <option value="Tecnicas de Computacao e Informatica">Tecnicas de Computacao e Informatica</option>
                                    <option value="Contabilidade e Gestão">Contabilidade e Gestão</option>
                                    <option value="Turismo e Culinária">Turismo e Culinária</option>
                                </select>
                            </div>
                        </div>

                        <hr>

                        <!-- Button Group -->
                        <div class="d-flex justify-content-end gap-2 mt-3">
                            <a href="<?= base_url('materia'); ?>" class="btn btn-secondary px-4">
                                <i class="fas fa-times me-1"></i> Kansela
                            </a>
                            <button type="submit" class="btn btn-success px-4">
                                <i class="fas fa-save me-1"></i> Save
                            </button>
                        </div>

                        <?= form_close(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<style>
    /* Konsistensi Margin dengan Sidebar */
    .content-wrapper {
        margin-left: 230px;
        padding: 20px;
    }
</style>