﻿/* DTP
----------------------------------------------------------*/
:root {
    --ws-blue: #0047AB;
    --ws-blue-dark: #003579;
    --ws-blue-soft: #EAF1FF;
    --ws-gray-bg: #F4F6F9;
    --ws-border: #DDE3EA;
    --ws-text: #263238;
    --ws-muted: #6C757D;
    --ws-success: #11AD4F;
    --ws-danger: #C40017;
    --ws-warning: #F3B400;
}

/* BASE */
body {
    margin: 0;
    background: var(--ws-gray-bg);
    color: var(--ws-text);
    font-family: Verdana, Arial, sans-serif;
    font-size: 13px;
}

.ws-main {
    padding: 18px;
}

    .ws-main a {
        text-decoration: none !important;
    }

.ws-page-title-wrap {
    padding-top: 1.5rem;
    padding-left: 1.5rem;
}

.ws-topbar-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--ws-blue-dark);
}

/* CARDS */
.ws-card {
    background: #fff;
    border: 1px solid var(--ws-border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    margin-bottom: 16px;
}

.ws-card-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ws-border);
    font-weight: 700;
    color: var(--ws-blue-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ws-card-body {
    padding: 14px;
}

/* FORM / FILTROS */
.ws-filter-label {
    font-size: 11px;
    color: var(--ws-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ws-filtros-row {
    margin-bottom: 6px;
}

.ws-context-field {
    transition: .15s ease;
}

    .ws-context-field.d-none {
        display: none !important;
    }

.ws-search-btn-wrap {
    display: flex;
    align-items: flex-end;
}

.ws-search-btn {
    min-width: 42px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* BOTÕES */
.ws-btn-primary {
    background: var(--ws-blue);
    border-color: var(--ws-blue);
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
}

    .ws-btn-primary:hover,
    .ws-btn-primary:focus {
        background: var(--ws-blue-dark);
        border-color: var(--ws-blue-dark);
        color: #fff;
    }

.ws-btn-soft {
    background: var(--ws-blue-soft);
    color: var(--ws-blue);
    border: 1px solid #C7D8FF;
    border-radius: 6px;
    font-weight: 600;
}

    .ws-btn-soft:hover,
    .ws-btn-soft:focus {
        background: #dce9ff;
        color: var(--ws-blue-dark);
    }

/* CONTEXTUALIZAÇÃO */
.ws-search-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.ws-radio-card {
    position: relative;
    flex: 1 1 190px;
    margin: 0;
}

    .ws-radio-card input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .ws-radio-card span {
        min-height: 58px;
        border: 1px solid var(--ws-border);
        border-radius: 10px;
        background: #fff;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        cursor: pointer;
        transition: .15s ease;
    }

    .ws-radio-card i {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        background: var(--ws-blue-soft);
        color: var(--ws-blue);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        flex: 0 0 34px;
    }

.ws-radio-title {
    display: block;
    font-weight: 700;
    color: var(--ws-text);
}

.ws-radio-help {
    display: block;
    font-size: 11px;
    color: var(--ws-muted);
    margin-top: 1px;
}

.ws-radio-card input:checked + span {
    border-color: var(--ws-blue);
    background: var(--ws-blue-soft);
    box-shadow: 0 0 0 3px rgba(0,71,171,.08);
}

/* PILLS / BADGES */
.ws-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ws-summary-strip-separado {
    margin-top: 8px;
    padding-top: 2px;
}

.ws-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    padding: 5px 10px;
    background: #F1F3F5;
    color: #495057;
    font-size: 11px;
    font-weight: 700;
}

.ws-pill-blue {
    background: var(--ws-blue-soft);
    color: var(--ws-blue-dark);
}

.ws-pill-success {
    background: #E9F9F0;
    color: #168444;
}

.ws-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.ws-badge-generated {
    background: #EAF1FF;
    color: #0047AB;
}

.ws-badge-submitted {
    background: #E9F9F0;
    color: #168444;
}

.ws-badge-pending {
    background: #FFF6DA;
    color: #936800;
}

.ws-badge-neutral {
    background: #F1F3F5;
    color: #6C757D;
}

.ws-badge-active {
    background: #EAF8EF;
    color: #1f8f4d;
}

.ws-badge-inactive {
    background: #FFECEC;
    color: var(--ws-danger);
}

/* DOCUMENTOS + PREVIEW */
.ws-documents-card,
.ws-preview-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ws-doc-list {
    flex: 1;
    overflow-y: auto;
}

.ws-doc-row {
    display: grid;
    /*grid-template-columns: 36px minmax(220px, 1fr) 120px 130px 110px;*/
    grid-template-columns: 36px minmax(0, 1fr) 58px 38px 110px 95px 85px 70px;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #EEF1F5;
    cursor: pointer;
    transition: .15s ease;
}

    .ws-doc-row:hover {
        background: var(--ws-blue-soft);
    }

    .ws-doc-row.active {
        background: var(--ws-blue-soft);
        border-left: 4px solid var(--ws-blue);
        padding-left: 10px;
    }

.ws-doc-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.ws-doc-icon-pdf {
    background: #FFECEC;
    color: var(--ws-danger);
}

.ws-doc-icon-word {
    background: #EAF1FF;
    color: #1f5fbf;
}

.ws-doc-icon-excel {
    background: #EAF8EF;
    color: #1f8f4d;
}

.ws-doc-icon-image {
    background: #F3EAFE;
    color: #7b3fc7;
}

.ws-doc-icon-default {
    background: #F1F3F5;
    color: #6c757d;
}

.ws-doc-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.ws-doc-meta {
    font-size: 11px;
    color: var(--ws-muted);
}

.ws-doc-title,
.ws-doc-meta {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    line-height: 1.3;
}

.ws-doc-preview {
    flex: 1;
    margin: 0;
    padding: 16px;
    background: #f8fafc;
    border: none;
    border-radius: 0 0 10px 10px;
    min-height: 620px;
}

    .ws-doc-preview iframe {
        width: 100%;
        height: 100%;
        min-height: 590px;
        display: block;
        border: 1px solid #d9e2ef;
        border-radius: 8px;
        background: #ffffff;
    }

/* PAGINAÇÃO / ESTADOS */
.ws-pagination {
    text-align: center;
    margin-top: 16px;
    margin-bottom: 20px;
}

    .ws-pagination span {
        margin: 0 4px;
        font-size: 12px;
        font-weight: 600;
        color: #6c757d;
    }

.ws-empty-note {
    border: 1px dashed var(--ws-border);
    padding: 12px;
    color: var(--ws-muted);
    border-radius: 8px;
    background: #FAFBFC;
}

/* GERAÇÃO / UPLOAD */
.ws-upload-box {
    border: 1px dashed #B8C7DA;
    border-radius: 10px;
    background: #FAFCFF;
    padding: 16px;
}

.ws-upload-drop {
    border: 1px dashed #C7D8FF;
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    color: var(--ws-muted);
}

    .ws-upload-drop i {
        display: block;
        color: var(--ws-blue);
        font-size: 28px;
        margin-bottom: 8px;
    }

.ws-upload-file {
    max-width: 360px;
    margin: 10px auto 0;
}

/* DEVEXPRESS / OVERLAYS */
#campoPesquisaFormador {
    position: relative;
    z-index: 10;
}

.ws-message {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 12px;
}

.ws-message-success {
    background: #E9F9F0;
    color: #168444;
    border: 1px solid #BFEBD1;
}

.ws-message-warning {
    background: #FFF6DA;
    color: #936800;
    border: 1px solid #F3D987;
}

.ws-message-error {
    background: #FDECEF;
    color: #A91224;
    border: 1px solid #F3B8C1;
}

.ws-toggle {
    border: 0;
    width: 46px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    padding: 3px;
    cursor: pointer;
}

.ws-toggle-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    display: block;
    transition: transform .2s ease;
}

.ws-toggle.is-off {
    background: var(--ws-danger);
}

.ws-toggle.is-on {
    background: var(--ws-success);
}

    .ws-toggle.is-on .ws-toggle-circle {
        transform: translateX(22px);
    }

.ws-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    z-index: 2147483647 !important;
    min-width: 280px;
    max-width: 520px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(0,0,0,.24);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.ws-toast-hidden {
    display: none !important;
}

.ws-toast-success {
    background: #EAF8EF;
    color: #1f8f4d;
    border-left: 4px solid #26C465;
}

.ws-toast-error {
    background: #FFECEC;
    color: #CF142B;
    border-left: 4px solid #CF142B;
}

.ws-toast-warning {
    background: #FFF7E0;
    color: #9a6a00;
    border-left: 4px solid #F3B400;
}

.ws-toast-info {
    background: #EAF1FF;
    color: #003579;
    border-left: 4px solid #0047AB;
}

.ws-toast small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #555;
}

.doc-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-loading-box {
    min-width: 340px;
    max-width: 560px;
    padding: 28px 36px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
    text-align: center;
}

.doc-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 16px auto;
    border: 4px solid #D9E6F8;
    border-top-color: #0047AB;
    border-radius: 50%;
    animation: docSpin 0.85s linear infinite;
}

.doc-loading-title {
    font-size: 16px;
    font-weight: 700;
    color: #003579;
    margin-bottom: 6px;
}

.doc-loading-text {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

@keyframes docSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 35px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.20);
    text-align: center;
    font-family: Arial, sans-serif;
    color: #333;
}

.spinner {
    width: 45px;
    height: 45px;
    margin: 0 auto 15px auto;
    border: 5px solid #ddd;
    border-top: 5px solid #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 14px;
    line-height: 1.5;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ws-doc-actions {
    width: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background-color: #D97706;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .btn-icon i {
        font-size: 15px;
    }

    .btn-icon:hover {
        background-color: #1E4E8C;
        color: #ffffff;
        text-decoration: none;
    }
