* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #222;
}

.topo {
    background: #243447;
    color: #fff;
    padding: 22px 30px;
}

.topo h1 {
    margin: 0;
    font-size: 26px;
}

.topo p {
    margin: 6px 0 0;
    opacity: 0.95;
}

.container {
    max-width: 1180px;
    margin: 30px auto;
    padding: 0 20px;
}

.card-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    min-width: 240px;
    flex: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #243447;
}

.card p {
    margin: 0 0 15px;
    color: #555;
    line-height: 1.5;
}

.btn,
.btn-link,
a.btn,
button.btn {
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background: #2d6cdf;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.btn:hover,
.btn-link:hover,
a.btn:hover,
button.btn:hover {
    background: #245cc0;
}

.btn-danger {
    background: #c0392b;
}

.btn-danger:hover {
    background: #a93226;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5c636a;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.page-header h2 {
    margin: 0;
    color: #243447;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #e9eef5;
}

table th,
table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e6e6e6;
    vertical-align: top;
}

table th {
    color: #243447;
    font-size: 14px;
}

table td {
    font-size: 14px;
}

table tr:hover td {
    background: #fafcff;
}

.actions a {
    text-decoration: none;
    margin-right: 10px;
    color: #2d6cdf;
    font-weight: bold;
}

.actions a.delete {
    color: #c0392b;
}

.form-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    font-weight: bold;
    margin-bottom: 6px;
    color: #243447;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd3db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

hr {
    border: none;
    border-top: 1px solid #e3e3e3;
    margin: 25px 0;
}

.check-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.check-list label {
    font-weight: normal;
    margin-bottom: 0;
}

.info-box {
    background: #fff8e1;
    border: 1px solid #ffe08a;
    padding: 14px;
    border-radius: 10px;
    color: #7a5b00;
}

.empty-box {
    background: #fff;
    border-radius: 12px;
    padding: 35px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    color: #666;
}

.footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.badge {
    display: inline-block;
    background: #eef3ff;
    color: #245cc0;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        overflow-x: hidden;
    }

    .topo {
        padding: 18px 16px;
        text-align: center;
    }

    .topo h1 {
        font-size: 22px;
    }

    .container {
        margin: 18px auto;
        padding: 0 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-area {
        flex-direction: column;
    }

    .card {
        min-width: 100%;
        padding: 18px;
    }

    .toolbar,
    .footer-actions {
        flex-direction: column;
    }

    .btn,
    .btn-link,
    a.btn,
    button.btn {
        width: 100%;
        text-align: center;
        padding: 12px 14px;
        font-size: 15px;
    }

    .table-wrap {
        overflow-x: auto;
    }

    table {
        min-width: 650px;
    }

    table th,
    table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px;
    }
}

/* Classes gerais */

.acorde {
    color: #c62828;
    font-weight: bold;
}

.msg-ok {
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #a6f4c5;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.msg-erro {
    background: #fdecea;
    color: #b42318;
    border: 1px solid #f5c2c0;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.missas-lista {
    display: grid;
    gap: 16px;
}

.missa-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.missa-card h3 {
    margin: 8px 0 12px;
    color: #243447;
}

.missa-card p {
    margin: 8px 0;
    color: #555;
    line-height: 1.4;
}

.missa-data {
    display: inline-block;
    background: #eef3ff;
    color: #245cc0;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: bold;
}

.missa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.missa-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.missa-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 14px;
}

/* cores específicas */
.btn-ver {
    background: #2d6cdf;
}

.btn-editar {
    background: #6c757d;
}

.btn-excluir {
    background: #c0392b;
}

/* MOBILE */
@media (max-width: 480px) {
    .missa-actions {
        flex-direction: column;
    }

    .missa-actions .btn {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .pwa-box {
    margin: 20px auto;
    max-width: 900px;
    background: #ffffff;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.pwa-box p {
    margin: 5px 0 0;
    color: #555;
}

.btn-instalar-pwa {
    border: none;
    background: #243447;
    color: #fff;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .pwa-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .badge-alerta {
    display: inline-block;
    background: #b42318;
    color: #fff;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
}

    .btn-instalar-pwa {
        width: 100%;
        justify-content: center;
    }
}
}