/* ============================================================
   CASTRAÇÃO AHDS
   ADMINISTRATIVO
   CSS PRINCIPAL
============================================================ */


/* ============================================================
   RESET
============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f7fa;

    color: #172033;

    min-height: 100vh;
}


a {
    color: inherit;

    text-decoration: none;
}


button,
input,
select,
textarea {
    font: inherit;
}


/* ============================================================
   LAYOUT
============================================================ */

.admin-page {

    margin-left: 280px;

    padding: 40px;

    min-height: calc(100vh - 80px);

    max-width: 1800px;
}


/* ============================================================
   PAGE HEADER
============================================================ */

.page-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    gap: 30px;

    margin-bottom: 30px;
}


.page-header h1 {

    color: #12356f;

    font-size: 34px;

    line-height: 1.15;

    font-weight: 800;

    margin-top: 5px;
}


.page-header p {

    color: #7d8798;

    margin-top: 8px;

    font-size: 15px;
}


.eyebrow {

    display: inline-block;

    color: #00a968;

    font-size: 12px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .12em;
}


.page-header-actions {

    display: flex;

    gap: 12px;

    align-items: center;
}


/* ============================================================
   BOTÕES
============================================================ */

.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    min-height: 48px;

    padding: 0 18px;

    border-radius: 12px;

    border: 1px solid transparent;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition:
        .2s ease;

    white-space: nowrap;
}


.btn:hover {

    transform: translateY(-1px);
}


.btn-primary {

    background: #00ad63;

    color: #fff;

    box-shadow:
        0 8px 18px rgba(0, 173, 99, .18);
}


.btn-primary:hover {

    background: #009857;
}


.btn-secondary {

    background: #fff;

    color: #536174;

    border-color: #e1e6ed;
}


.btn-secondary:hover {

    background: #f8fafc;
}


.btn-dark {

    background: #12356f;

    color: #fff;
}


.btn-dark:hover {

    background: #0d2b5c;
}


/* ============================================================
   CARDS
============================================================ */

.card {

    background: #fff;

    border: 1px solid #e8edf3;

    border-radius: 18px;

    box-shadow:
        0 5px 20px rgba(18, 53, 111, .045);

    overflow: hidden;

    margin-bottom: 24px;
}


/* ============================================================
   FILTROS
============================================================ */

.filters-card {

    padding: 20px;
}


.filters-form {

    display: grid;

    grid-template-columns:
        minmax(260px, 1fr)
        220px
        auto;

    gap: 16px;

    align-items: end;
}


.form-group {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.form-group label {

    color: #465268;

    font-size: 13px;

    font-weight: 700;
}


.input-icon {

    position: relative;
}


.input-icon i {

    position: absolute;

    left: 15px;

    top: 50%;

    transform: translateY(-50%);

    color: #9ba5b5;

    font-size: 19px;

    pointer-events: none;
}


.input-icon input {

    padding-left: 45px !important;
}


input,
select,
textarea {

    width: 100%;

    border: 1px solid #dce2e9;

    background: #fff;

    color: #263248;

    border-radius: 11px;

    outline: none;

    transition:
        border-color .2s,
        box-shadow .2s;
}


input,
select {

    height: 48px;

    padding: 0 14px;
}


textarea {

    padding: 14px;

    resize: vertical;

    min-height: 130px;
}


input:focus,
select:focus,
textarea:focus {

    border-color: #00ad63;

    box-shadow:
        0 0 0 3px rgba(0, 173, 99, .10);
}


/* ============================================================
   TABELA
============================================================ */

.table-wrapper {

    width: 100%;

    overflow-x: auto;
}


.admin-table {

    width: 100%;

    border-collapse: collapse;

    min-width: 900px;
}


.admin-table thead {

    background: #f8fafc;
}


.admin-table th {

    padding: 15px 20px;

    text-align: left;

    color: #8a95a6;

    font-size: 11px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .08em;

    border-bottom: 1px solid #e8edf3;
}


.admin-table td {

    padding: 17px 20px;

    border-bottom: 1px solid #edf0f4;

    vertical-align: middle;
}


.admin-table tbody tr {

    transition: background .15s;
}


.admin-table tbody tr:hover {

    background: #fbfcfe;
}


.admin-table tbody tr:last-child td {

    border-bottom: 0;
}


/* ============================================================
   EVENTO
============================================================ */

.event-cell {

    display: flex;

    align-items: center;

    gap: 13px;

    min-width: 280px;
}


.event-thumb {

    width: 54px;

    height: 54px;

    border-radius: 12px;

    object-fit: cover;

    flex: 0 0 54px;
}


.event-thumb-placeholder {

    display: flex;

    align-items: center;

    justify-content: center;

    background: #edf6ff;

    color: #1f6fff;

    font-size: 23px;
}


.event-info {

    display: flex;

    flex-direction: column;

    gap: 4px;
}


.event-info strong {

    color: #12356f;

    font-size: 15px;

    line-height: 1.35;
}


.event-info span {

    color: #667286;

    font-size: 12px;
}


.event-info small {

    color: #a0a9b7;

    font-size: 11px;
}


/* ============================================================
   DATA / LOCAL
============================================================ */

.date-location {

    display: flex;

    flex-direction: column;

    gap: 7px;
}


.date-location strong {

    color: #384457;

    font-size: 14px;
}


.date-location span {

    color: #8a94a3;

    font-size: 12px;
}


.date-location i {

    margin-right: 5px;

    color: #00a968;
}


/* ============================================================
   OCUPAÇÃO
============================================================ */

.occupancy {

    width: 130px;
}


.occupancy-numbers {

    display: flex;

    align-items: center;

    gap: 4px;

    margin-bottom: 8px;

    color: #7b8595;

    font-size: 13px;
}


.occupancy-numbers strong {

    color: #3b4658;

    font-size: 14px;
}


.progress {

    height: 7px;

    background: #e8edf2;

    border-radius: 999px;

    overflow: hidden;
}


.progress span {

    display: block;

    height: 100%;

    background: #00ad63;

    border-radius: inherit;
}


/* ============================================================
   STATUS
============================================================ */

.status-badge {

    display: inline-flex;

    align-items: center;

    padding: 7px 11px;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 800;
}


.status-aberta {

    background: #e8f8f0;

    color: #008b50;
}


.status-encerrada {

    background: #fff0f0;

    color: #d64545;
}


.status-oculta {

    background: #f0f2f5;

    color: #667085;
}


.status-rascunho {

    background: #fff7e6;

    color: #a76b00;
}


/* ============================================================
   AÇÕES DA TABELA
============================================================ */

.table-actions {

    display: flex;

    align-items: center;

    gap: 7px;
}


.icon-btn {

    width: 38px;

    height: 38px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    border: 1px solid #dfe5ed;

    color: #536174;

    background: #fff;

    transition: .2s ease;
}


.icon-btn:hover {

    border-color: #12356f;

    color: #12356f;

    background: #f5f8fc;
}


.icon-btn.danger:hover {

    color: #dc4444;

    border-color: #ffcaca;

    background: #fff5f5;
}


/* ============================================================
   EMPTY STATE
============================================================ */

.empty-state {

    padding: 80px 30px;

    text-align: center;
}


.empty-icon {

    width: 70px;

    height: 70px;

    margin: 0 auto 18px;

    border-radius: 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #edf6ff;

    color: #1f6fff;

    font-size: 30px;
}


.empty-state h3 {

    color: #263a5c;

    font-size: 18px;

    margin-bottom: 7px;
}


.empty-state p {

    color: #929baa;

    font-size: 14px;

    margin-bottom: 22px;
}


/* ============================================================
   FORMULÁRIOS DE MUTIRÃO
============================================================ */

.back-link {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: #617087;

    font-size: 13px;

    font-weight: 600;

    margin-bottom: 15px;
}


.back-link:hover {

    color: #12356f;
}


.form-card {

    background: #fff;

    border: 1px solid #e7ecf2;

    border-radius: 18px;

    margin-bottom: 22px;

    overflow: hidden;

    box-shadow:
        0 5px 20px rgba(18, 53, 111, .04);
}


.form-card-header {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 22px 26px;

    border-bottom: 1px solid #edf0f4;
}


.form-card-icon {

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 12px;

    background: #edf8f2;

    color: #00a968;

    font-size: 21px;
}


.form-card-header h2 {

    color: #12356f;

    font-size: 17px;

    font-weight: 800;
}


.form-card-header p {

    color: #8c96a5;

    font-size: 12px;

    margin-top: 3px;
}


.form-card-body {

    padding: 26px;
}


.form-grid {

    display: grid;

    gap: 20px;
}


.form-grid-2 {

    grid-template-columns: repeat(2, minmax(0, 1fr));
}


.form-grid-3 {

    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


.form-span-2 {

    grid-column: span 2;
}


/* ============================================================
   LABELS
============================================================ */

.form-group label {

    color: #445066;

    font-size: 13px;

    font-weight: 700;
}


.form-group label span {

    color: #ef4b4b;
}


/* ============================================================
   UPLOAD DE IMAGEM
============================================================ */

.image-upload-area {

    width: 100%;
}


.upload-box {

    width: 100%;

    min-height: 250px;

    border: 2px dashed #d8e0e9;

    border-radius: 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    cursor: pointer;

    background: #fafcfe;

    transition: .2s ease;
}


.upload-box:hover {

    border-color: #00ad63;

    background: #f7fffb;
}


.upload-placeholder {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 8px;

    color: #8994a4;

    text-align: center;
}


.upload-placeholder i {

    font-size: 38px;

    color: #00ad63;
}


.upload-placeholder strong {

    color: #526078;

    font-size: 15px;
}


.upload-placeholder span {

    font-size: 12px;
}


#previewImagem {

    width: 100%;

    height: 300px;

    object-fit: cover;
}


.image-preview.hidden,
.hidden {

    display: none !important;
}


.checkbox-line {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-top: 12px;

    color: #687488;

    font-size: 13px;

    cursor: pointer;
}


.checkbox-line input {

    width: auto;

    height: auto;
}


/* ============================================================
   TEXTOS AUXILIARES
============================================================ */

.form-group small {

    display: block;

    margin-top: 7px;

    color: #929baa;

    font-size: 11px;

    line-height: 1.5;
}


/* ============================================================
   BOTÕES DO FORM
============================================================ */

.form-actions {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 12px;

    margin-top: 8px;

    margin-bottom: 40px;
}


/* ============================================================
   RESPONSIVIDADE
============================================================ */

@media (max-width: 1100px) {

    .admin-page {

        margin-left: 0;

        padding: 28px;
    }


    .filters-form {

        grid-template-columns: 1fr 1fr;
    }


    .filters-form .btn {

        width: 100%;
    }


    .page-header {

        align-items: flex-start;

        flex-direction: column;
    }

}


@media (max-width: 760px) {

    .admin-page {

        padding: 20px 15px;
    }


    .page-header {

        margin-bottom: 20px;
    }


    .page-header h1 {

        font-size: 27px;
    }


    .page-header-actions {

        width: 100%;

        display: grid;

        grid-template-columns: 1fr 1fr;
    }


    .page-header-actions .btn {

        width: 100%;

        padding: 0 10px;
    }


    .filters-card {

        padding: 15px;
    }


    .filters-form {

        grid-template-columns: 1fr;
    }


    .form-grid-2,
    .form-grid-3 {

        grid-template-columns: 1fr;
    }


    .form-span-2 {

        grid-column: auto;
    }


    .form-card-header {

        padding: 18px;
    }


    .form-card-body {

        padding: 18px;
    }


    .form-actions {

        flex-direction: column-reverse;

        width: 100%;
    }


    .form-actions .btn {

        width: 100%;
    }


    .upload-box {

        min-height: 200px;
    }


    #previewImagem {

        height: 220px;
    }

}


/* ============================================================
   TELAS MUITO PEQUENAS
============================================================ */

@media (max-width: 480px) {

    .page-header-actions {

        grid-template-columns: 1fr;
    }


    .event-thumb {

        width: 45px;

        height: 45px;

        flex-basis: 45px;
    }


    .event-info strong {

        font-size: 13px;
    }


    .admin-table {

        min-width: 760px;
    }

}