<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<style>
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:0; }
.detail-item { padding:10px 16px; border-bottom:1px solid #f0f2f5; }
.detail-item.full { grid-column:1/-1; }
.detail-item .dl { font-size:10px; font-weight:700; color:#aaa; text-transform:uppercase; letter-spacing:.5px; display:block; margin-bottom:3px; }
.detail-item .dv { font-size:13px; color:#222; }
@media(max-width:767px){ .detail-grid{grid-template-columns:1fr} .detail-item.full{grid-column:1} }
</style>

<section class="content-header">
    <h1><i class="fa fa-bullhorn"></i> <?php echo lang('notice') ?> <small><?php echo lang('view') ?></small></h1>
    <ol class="breadcrumb">
        <li><a href="<?php echo site_url('admin') ?>"><i class="fa fa-dashboard"></i> Dashboard</a></li>
        <li><a href="<?php echo site_url('admin/notice') ?>"><?php echo lang('notice') ?></a></li>
        <li class="active"><?php echo lang('view') ?></li>
    </ol>
</section>

<section class="content">
<div class="box box-primary">
    <div class="box-header with-border" style="background:linear-gradient(135deg,#1e3a5f,#2e75b6);border-radius:10px 10px 0 0">
        <h3 class="box-title" style="color:#fff"><i class="fa fa-bullhorn"></i> <?php echo htmlspecialchars($notice->title ?? '') ?></h3>
    </div>
    <div class="box-body no-padding">
        <div class="detail-grid">
            <div class="detail-item">
                <span class="dl">Título</span>
                <span class="dv"><?php echo htmlspecialchars($notice->title ?? '—') ?></span>
            </div>
            <div class="detail-item">
                <span class="dl">Data / Hora</span>
                <span class="dv"><i class="fa fa-clock-o"></i> <?php echo date_time_convert($notice->date_time ?? '') ?></span>
            </div>
            <div class="detail-item full">
                <span class="dl">Descrição</span>
                <span class="dv" style="white-space:pre-wrap"><?php echo $notice->description ?? '—' ?></span>
            </div>
        </div>
    </div>
    <div class="box-footer">
        <a href="<?php echo site_url('admin/notice') ?>" class="btn btn-default btn-sm"><i class="fa fa-arrow-left"></i> Voltar</a>
        <?php if(check_user_role(148)==1): ?>
        <a href="<?php echo site_url('admin/notice/edit/'.$notice->id) ?>" class="btn btn-warning btn-sm"><i class="fa fa-pencil"></i> Editar</a>
        <?php endif; ?>
    </div>
</div>
</section>
