/* Monitora CRC - Submissões - Frontend & Admin styles */

.mcrc-form-wrap,
.mcrc-wrap {
    max-width: 760px;
    margin: 30px auto;
    padding: 24px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #222;
    line-height: 1.5;
}

.mcrc-form-title,
.mcrc-page-title {
    margin: 0 0 16px;
    font-size: 22px;
    color: #111;
}

.mcrc-section-title {
    margin: 18px 0 8px;
    font-size: 16px;
    color: #222;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.mcrc-form .mcrc-fieldset {
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 14px 0;
}

.mcrc-form .mcrc-fieldset legend {
    padding: 0 6px;
    font-weight: 600;
    color: #333;
}

.mcrc-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin: 12px 0 4px;
    color: #333;
}

.mcrc-input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #222;
    box-sizing: border-box;
}

select.mcrc-input {
    padding-right: 32px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    height: auto;
    min-height: 42px;
}

select.mcrc-input option {
    white-space: normal;
}

.mcrc-input:focus {
    outline: 0;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

textarea.mcrc-input {
    resize: vertical;
    min-height: 100px;
}

.mcrc-radio,
.mcrc-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 12px 6px 0;
    font-size: 14px;
}

.mcrc-checkbox {
    display: flex;
    margin: 6px 0;
}

.mcrc-help {
    margin: 4px 0 0;
    font-size: 12px;
    color: #666;
}

.mcrc-paragraph {
    font-size: 14px;
    color: #333;
    margin: 8px 0;
}

.mcrc-link-list {
    list-style: disc;
    padding-left: 22px;
    margin: 10px 0;
}

.mcrc-link-list li {
    margin: 4px 0;
}

/* Botões */

.mcrc-btn {
    display: inline-block;
    padding: 9px 18px;
    margin: 12px 4px 0 0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.2;
}

.mcrc-btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}
.mcrc-btn-primary:hover { background: #135e96; border-color: #135e96; color: #fff; }

.mcrc-btn-secondary {
    background: #f6f7f7;
    border-color: #c3c4c7;
    color: #2c3338;
}
.mcrc-btn-secondary:hover { background: #ececec; color: #111; }

/* Mensagens */

.mcrc-msg {
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 14px;
}
.mcrc-msg-success { background: #ecf7ed; border-color: #b6dfb9; color: #1e6b27; }
.mcrc-msg-error   { background: #fdecea; border-color: #f5c2c0; color: #a3271b; }
.mcrc-msg-warning { background: #fff8e1; border-color: #ffe082; color: #7a5b00; }
.mcrc-msg-info    { background: #e8f1fb; border-color: #bcd5ee; color: #14457b; }

.mcrc-error-list { margin: 0; padding-left: 18px; }

/* Toolbar */

.mcrc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Tabelas */

.mcrc-table-wrap {
    overflow-x: auto;
}

.mcrc-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

.mcrc-table th,
.mcrc-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.mcrc-table th {
    background: #f4f6f8;
    font-weight: 600;
    color: #222;
}

.mcrc-table tr:hover td {
    background: #fafbfc;
}

/* Cards */

.mcrc-card {
    padding: 16px;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    margin: 14px 0;
    background: #fff;
}

.mcrc-card h2,
.mcrc-card h3 {
    margin-top: 0;
}

.mcrc-text-block {
    background: #f9f9f9;
    border: 1px solid #ececec;
    border-radius: 4px;
    padding: 10px 12px;
    white-space: pre-wrap;
    font-size: 14px;
    color: #333;
}

/* Lista de arquivos */

.mcrc-file-list {
    list-style: none;
    padding-left: 0;
    margin: 8px 0;
}

.mcrc-file-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

/* Preview de arquivos selecionados no input */
.mcrc-file-preview-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.mcrc-file-preview-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f0f6fc;
    border: 1px solid #bcd5ee;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 13px;
    color: #14457b;
}

.mcrc-file-preview-list li::before {
    content: "📎";
    flex-shrink: 0;
}

.mcrc-file-preview-list li span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mcrc-file-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background .1s;
    font-size: 0;
    line-height: 0;
}
.mcrc-file-remove:hover { background: #fdecea; }
.mcrc-file-remove::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #c62828;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6h14zM10 11v6M14 11v6'  stroke='%23c62828' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6h14zM10 11v6M14 11v6'  stroke='%23c62828' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    vertical-align: middle;
}
.mcrc-file-remove:hover::before { background-color: #a31b1b; }

/* Badges de status */

.mcrc-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}
.mcrc-badge-pendente  { background: #d59a00; }
.mcrc-badge-aprovado  { background: #2e7d32; }
.mcrc-badge-reprovado { background: #c62828; }

/* Admin */

.mcrc-admin-wrap .mcrc-admin-filters {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 4px;
}

.mcrc-admin-wrap .mcrc-admin-filters label {
    display: inline-block;
    margin-right: 12px;
    font-size: 13px;
}

.mcrc-admin-wrap .mcrc-admin-table th,
.mcrc-admin-wrap .mcrc-admin-table td {
    vertical-align: middle;
}

.mcrc-admin-wrap .mcrc-card {
    background: #fff;
    border: 1px solid #ccd0d4;
}

.mcrc-pagination {
    margin: 14px 0;
}

.mcrc-pagination .page-numbers {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 2px;
    border: 1px solid #ccd0d4;
    background: #fff;
    color: #2271b1;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
}
.mcrc-pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Responsivo */

@media (max-width: 600px) {
    .mcrc-form-wrap,
    .mcrc-wrap {
        margin: 12px;
        padding: 16px;
    }
    .mcrc-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .mcrc-table thead { display: none; }
    .mcrc-table tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #eee;
        border-radius: 4px;
    }
    .mcrc-table td {
        display: block;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
    }
    .mcrc-table td:last-child { border-bottom: 0; }
}

/* ============================================================
 * Barra de navegação flutuante do usuário
 * ============================================================ */

.mcrc-navbar {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
}

.mcrc-navbar-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    transition: background .15s;
    white-space: nowrap;
}
.mcrc-navbar-toggle:hover { background: #135e96; }

.mcrc-navbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.25);
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.mcrc-navbar-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mcrc-navbar-arrow {
    font-size: 10px;
    opacity: .8;
    flex-shrink: 0;
}

.mcrc-navbar-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    min-width: 210px;
    overflow: hidden;
}

.mcrc-navbar-menu[hidden] { display: none; }

.mcrc-navbar-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.mcrc-navbar-list li a {
    display: block;
    padding: 9px 18px;
    color: #2c3338;
    text-decoration: none;
    transition: background .1s;
    font-size: 14px;
}
.mcrc-navbar-list li a:hover { background: #f0f6fc; color: #2271b1; }

.mcrc-navbar-header {
    padding: 10px 18px 6px;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .04em;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
}

.mcrc-navbar-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

.mcrc-navbar-logout {
    color: #c62828 !important;
}
.mcrc-navbar-logout:hover { background: #fdecea !important; }

@media (max-width: 480px) {
    .mcrc-navbar { bottom: 16px; right: 16px; }
    .mcrc-navbar-name { display: none; }
}
