*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:Arial, sans-serif;
    background:#eef2f7;
    color:#111827;
}

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

a{
    color:#2563eb;
    text-decoration:none;
}

a:hover{
    text-decoration:underline;
}

.container{
    width:min(1100px, calc(100% - 32px));
    margin:0 auto;
}

.container-auth{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
}

/* ================================
   HEADER / TOPBAR
================================ */

.topbar{
    background:#0b1220;
    color:#fff;
    position:relative;
    z-index:1000;
}

.topbar-inner{
    max-width:1100px;
    margin:0 auto;
    padding:14px 16px;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:24px;
}

.topbar-mobile-left{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
}

.topbar-left-desktop{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
}

.topbar-brand{
    display:flex;
    align-items:center;
    height:42px;
    font-size:22px;
    font-weight:800;
    color:#fff;
    text-decoration:none;
    white-space:nowrap;
    flex-shrink:0;
    line-height:1;
}

.topbar-brand:hover{
    text-decoration:none;
}

.topnav{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:24px;
    min-width:0;
    flex-wrap:nowrap;
}

.topnav a{
    display:flex;
    align-items:center;
    height:42px;
    color:#fff;
    opacity:.92;
    text-decoration:none;
    font-weight:600;
    white-space:nowrap;
    line-height:1;
}

.topnav a:hover{
    opacity:1;
    text-decoration:none;
}

.topbar-user{
    display:flex;
    align-items:center;
    gap:14px;
    flex-shrink:0;
    white-space:nowrap;
    text-align:right;
}

.topbar-user-name{
    display:flex;
    align-items:center;
    height:42px;
    font-size:14px;
    line-height:1;
    font-weight:600;
}

.topbar-user .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:42px;
    min-width:160px;
    padding:0 18px;
    line-height:1;
}

.topbar-toggle{
    display:none;
    width:46px;
    height:46px;
    padding:0;
    border:0;
    border-radius:10px;
    background:#1f2937;
    cursor:pointer;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    flex-shrink:0;
}

.topbar-toggle span{
    display:block;
    width:20px;
    height:2px;
    background:#fff;
    border-radius:999px;
}

.mobile-sidebar,
.mobile-sidebar-backdrop{
    display:none;
}

/* Dropdown desktop */
.menu-dropdown{
    position:relative;
    display:flex;
    align-items:center;
    height:42px;
}

.menu-dropdown-title{
    display:flex;
    align-items:center;
    height:42px;
    padding:0 4px;
    color:#fff;
    opacity:.92;
    font-weight:600;
    white-space:nowrap;
    cursor:pointer;
    line-height:1;
}

.menu-dropdown-content{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    min-width:220px;
    background:#111827;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    box-shadow:0 18px 45px rgba(0,0,0,.28);
    padding:8px 0;
    z-index:1200;
}

.menu-dropdown-content a{
    display:block;
    padding:10px 14px;
    color:#fff;
    text-decoration:none;
    white-space:nowrap;
    height:auto;
    line-height:1.3;
}

.menu-dropdown-content a:hover{
    background:rgba(255,255,255,.06);
    text-decoration:none;
}

.menu-group-title{
    padding:10px 14px 6px;
    color:rgba(255,255,255,.68);
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.menu-subitem{
    padding-left:28px !important;
}

.menu-group-separator{
    height:1px;
    margin:8px 0;
    background:rgba(255,255,255,.08);
}

/* hover só em desktop */
@media (min-width: 901px){
    .menu-dropdown:hover .menu-dropdown-content{
        display:block;
    }
}

/* MOBILE */
@media (max-width: 900px){
    .topbar-inner{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:16px;
        padding:14px 16px;
    }

    .topbar-left-desktop,
    .topbar-user{
        display:none;
    }

    .topbar-toggle{
        display:flex;
    }

    .mobile-sidebar-backdrop{
        display:block;
        position:fixed;
        inset:0;
        background:rgba(0,0,0,.45);
        opacity:0;
        pointer-events:none;
        transition:opacity .2s ease;
        z-index:1190;
    }

    .mobile-sidebar-backdrop.is-open{
        opacity:1;
        pointer-events:auto;
    }

    .mobile-sidebar{
        display:flex;
        flex-direction:column;
        position:fixed;
        top:0;
        left:0;
        width:min(320px, 86vw);
        height:100vh;
        background:#0f172a;
        border-right:1px solid rgba(255,255,255,.08);
        box-shadow:18px 0 45px rgba(0,0,0,.28);
        transform:translateX(-100%);
        transition:transform .24s ease;
        z-index:1200;
        padding:18px 16px;
    }

    .mobile-sidebar.is-open{
        transform:translateX(0);
    }

    .mobile-sidebar-head{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        margin-bottom:18px;
        padding-bottom:14px;
        border-bottom:1px solid rgba(255,255,255,.10);
    }

    .mobile-sidebar-title{
        color:#fff;
        font-size:20px;
        font-weight:800;
    }

    .mobile-sidebar-close{
        width:42px;
        height:42px;
        border:0;
        border-radius:10px;
        background:#1f2937;
        color:#fff;
        font-size:28px;
        line-height:1;
        cursor:pointer;
    }

    .mobile-sidebar-nav{
        display:flex;
        flex-direction:column;
        gap:8px;
        overflow:auto;
    }

    .mobile-sidebar-nav a{
        display:block;
        padding:12px 0;
        color:#fff;
        text-decoration:none;
        font-weight:600;
        border-bottom:1px solid rgba(255,255,255,.06);
        line-height:1.3;
    }

    .mobile-sidebar-group{
        margin-top:8px;
        padding-top:8px;
    }

    .mobile-sidebar-group-title{
        color:rgba(255,255,255,.72);
        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        margin-bottom:6px;
    }

    .mobile-sidebar-footer{
        margin-top:auto;
        padding-top:16px;
        border-top:1px solid rgba(255,255,255,.10);
        display:flex;
        flex-direction:column;
        gap:12px;
    }

    .mobile-sidebar-user{
        color:#fff;
        font-size:14px;
        line-height:1.35;
        font-weight:600;
    }

    .mobile-sidebar-footer .btn{
        width:100%;
        justify-content:center;
    }

    body.mobile-menu-open{
        overflow:hidden;
    }
}

/* ================================
   CARDS / FORMS / BUTTONS
================================ */

.card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:24px;
    margin:24px 0;
    box-shadow:0 12px 30px rgba(15, 23, 42, 0.08);
}

.auth-card{
    width:min(420px, 100%);
}

.form-row{
    margin-bottom:16px;
}

.form-row label{
    display:block;
    margin-bottom:6px;
    font-weight:600;
}

.form-row input,
.form-row select,
.form-row textarea{
    width:100%;
    min-height:44px;
    padding:10px 12px;
    border:1px solid #d1d5db;
    border-radius:10px;
    background:#fff;
}

.form-row textarea{
    resize:vertical;
}

.checkbox-row label{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:0;
}

.checkbox-row input{
    width:auto;
    min-height:auto;
    padding:0;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:48px;
    padding:0 20px;
    border-radius:16px;
    border:1px solid transparent;
    font-size:0.95rem;
    font-weight:700;
    text-decoration:none;
    white-space:nowrap;
    cursor:pointer;
    transition:all .18s ease;
    color:#fff;
    background:#3b82f6;
}

.btn:hover{
    opacity:.96;
    transform:translateY(-1px);
    text-decoration:none;
}

.btn-inline{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    min-width:160px;
    padding:0 18px;
}

.btn-secondary{
    background:#374151;
    color:#fff;
}

.alert{
    padding:12px 14px;
    border-radius:10px;
    margin-bottom:16px;
}

.alert-error{
    background:#fee2e2;
    color:#991b1b;
}

.alert-list{
    margin:10px 0 0 18px;
    padding:0;
}

.page-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px;
}

.page-head h1{
    margin:0 0 6px;
}

.page-head-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

.text-muted{
    margin:0;
    color:#6b7280;
}

.form-grid{
    max-width:700px;
}

.form-actions{
    margin-top:8px;
}

.table-wrap{
    width:100%;
    overflow:auto;
    border:1px solid #e5e7eb;
    border-radius:14px;
}

.table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
}

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

.table th{
    font-size:14px;
    color:#374151;
    background:#f8fafc;
    font-weight:700;
}

.table tbody tr:hover{
    background:#f9fafb;
}

.detail-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:16px;
    margin-top:20px;
}

.detail-item{
    display:flex;
    flex-direction:column;
    gap:6px;
    padding:14px;
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:12px;
}

.detail-item strong{
    color:#374151;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.02em;
}

.detail-block{
    margin-top:20px;
    padding:16px;
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:12px;
}

.evaluation-list{
    display:grid;
    gap:16px;
    margin-top:16px;
}

.evaluation-item{
    padding:16px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#f9fafb;
}

.evaluation-item p{
    margin:0 0 10px;
}

.photo-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:16px;
    margin-top:16px;
}

.photo-item{
    border:1px solid #e5e7eb;
    border-radius:14px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 6px 18px rgba(15,23,42,.05);
}

.photo-item img{
    display:block;
    width:100%;
    height:220px;
    object-fit:cover;
    background:#f3f4f6;
}

.photo-meta{
    padding:10px 12px;
    border-top:1px solid #e5e7eb;
    background:#f9fafb;
    word-break:break-word;
}

.badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:30px;
    padding:4px 10px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
    line-height:1.2;
    white-space:nowrap;
}

.badge-status{
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.15);
    border:1px solid transparent;
}

.badge-gray{
    background:#e5e7eb;
    color:#374151;
    border-color:#d1d5db;
}

.badge-blue{
    background:#dbeafe;
    color:#1d4ed8;
    border-color:#bfdbfe;
}

.badge-yellow{
    background:#fef3c7;
    color:#92400e;
    border-color:#fde68a;
}

.badge-purple{
    background:#ede9fe;
    color:#6d28d9;
    border-color:#ddd6fe;
}

.badge-orange{
    background:#ffedd5;
    color:#c2410c;
    border-color:#fdba74;
}

.badge-green{
    background:#dcfce7;
    color:#166534;
    border-color:#bbf7d0;
}

.badge-dark{
    background:#d1d5db;
    color:#111827;
    border-color:#9ca3af;
}

.status-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:16px;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
    gap:16px;
    margin:24px 0;
}

.stat-card{
    background:#fff;
    border-radius:14px;
    padding:20px;
    box-shadow:0 10px 30px rgba(0,0,0,.06);
}

.stat-label{
    display:block;
    font-size:14px;
    color:#6b7280;
    margin-bottom:8px;
}

.stat-value{
    font-size:30px;
    line-height:1;
    color:#111827;
}

.quick-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.filters-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
    gap:16px;
    align-items:end;
}

.filters-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
}

.filters-actions .btn{
    width:auto;
    min-width:140px;
}

.btn-edit{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:6px 12px;
    border-radius:8px;
    background:#3b82f6;
    color:#fff;
    font-size:13px;
    font-weight:600;
    text-decoration:none;
    transition:all .15s ease;
}

.btn-edit:hover{
    background:#2563eb;
    transform:translateY(-1px);
}

.photo-actions{
    margin-top:10px;
}

.btn-delete-photo{
    display:inline-block;
    padding:6px 10px;
    border-radius:8px;
    background:#dc2626;
    color:#fff;
    font-size:12px;
    font-weight:600;
    text-decoration:none;
}

.btn-delete-photo:hover{
    background:#b91c1c;
    text-decoration:none;
}

.timeline{
    position:relative;
    padding-left:22px;
    margin-top:10px;
}

.timeline:before{
    content:'';
    position:absolute;
    left:7px;
    top:0;
    bottom:0;
    width:2px;
    background:#dbe2ea;
}

.timeline-item{
    position:relative;
    margin-bottom:20px;
}

.timeline-dot{
    position:absolute;
    left:-1px;
    top:4px;
    width:10px;
    height:10px;
    border-radius:50%;
    background:#3b82f6;
    box-shadow:0 0 0 4px #eff6ff;
}

.timeline-content{
    padding-left:15px;
}

.timeline-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    font-size:13px;
    margin-bottom:4px;
}

.timeline-date{
    color:#6b7280;
    white-space:nowrap;
}

.timeline-action{
    font-weight:700;
    font-size:14px;
    color:#111827;
    margin-bottom:4px;
}

.timeline-description{
    font-size:13px;
    color:#374151;
}

/* ================================
   RETOMAS MODULE - BASE
================================ */

.retoma-show-page,
.retoma-create-page,
.retoma-edit-page,
.retoma-index-page,
.retoma-negociar-page,
.retoma-photos-upload-page,
.retoma-negociacao-responder-page,
.avaliacao-create-page{
    display:block;
}

.retoma-show-page .page-head,
.retoma-create-page .retoma-create-head,
.retoma-edit-page .retoma-edit-head,
.retoma-index-page .retoma-index-head,
.retoma-negociar-page .retoma-negociar-head,
.retoma-photos-upload-page .retoma-photos-upload-head,
.retoma-negociacao-responder-page .retoma-negociacao-responder-head,
.avaliacao-create-page .avaliacao-create-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
    margin-bottom:14px;
}

.retoma-show-page .page-head-actions,
.retoma-create-page .retoma-create-head-actions,
.retoma-edit-page .retoma-edit-head-actions,
.retoma-index-page .retoma-index-head-actions,
.retoma-negociar-page .retoma-negociar-head-actions,
.retoma-photos-upload-page .retoma-photos-upload-head-actions,
.retoma-negociacao-responder-page .retoma-negociacao-responder-head-actions,
.avaliacao-create-page .avaliacao-create-head-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    justify-content:flex-end;
}

.retoma-show-page .page-head-actions .btn,
.retoma-show-page .page-head-actions .btn-edit,
.retoma-create-page .retoma-create-head-actions .btn,
.retoma-edit-page .retoma-edit-head-actions .btn,
.retoma-index-page .retoma-index-head-actions .btn,
.retoma-negociar-page .retoma-negociar-head-actions .btn,
.retoma-photos-upload-page .retoma-photos-upload-head-actions .btn,
.retoma-negociacao-responder-page .retoma-negociacao-responder-head-actions .btn,
.avaliacao-create-page .avaliacao-create-head-actions .btn{
    min-height:44px;
}

/* ================================
   RETOMA SHOW
================================ */

.retoma-show-page .detail-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
    margin-top:16px;
}

.retoma-show-page .detail-item{
    display:flex;
    flex-direction:column;
    gap:6px;
    padding:14px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#f9fafb;
}

.retoma-show-page .detail-block{
    margin-top:16px;
    padding:14px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#f9fafb;
}

.retoma-show-page .status-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:14px;
}

.retoma-show-page .photo-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
    margin-top:14px;
}

.retoma-show-page .photo-item{
    border:1px solid #e5e7eb;
    border-radius:14px;
    overflow:hidden;
    background:#fff;
}

.retoma-show-page .photo-item img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.retoma-show-page .photo-meta{
    padding:12px;
}

.retoma-show-page .evaluation-list{
    display:grid;
    gap:14px;
    margin-top:14px;
}

.retoma-show-page .evaluation-item{
    padding:14px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#f9fafb;
}

.retoma-show-page .timeline-item{
    display:grid;
    grid-template-columns:18px 1fr;
    gap:14px;
}

.retoma-show-page .timeline-dot{
    width:12px;
    height:12px;
    border-radius:999px;
    margin-top:6px;
    background:#4f8df7;
}

.retoma-show-page .retoma-empty{
    margin-top:10px;
}

.retoma-show-page .retoma-section-title{
    margin:0;
}

/* ================================
   RETOMA NEGOCIAR
================================ */

.retoma-negociar-page .retoma-negociar-wrap{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 320px;
    gap:18px;
    align-items:start;
}

.retoma-negociar-page .retoma-negociar-main,
.retoma-negociar-page .retoma-negociar-side{
    min-width:0;
}

.retoma-negociar-page .retoma-negociar-summary{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
    margin-top:14px;
}

.retoma-negociar-page .retoma-negociar-summary-item{
    padding:14px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#f9fafb;
}

.retoma-negociar-page .retoma-negociar-summary-item strong{
    display:block;
    margin-bottom:6px;
    font-size:.9rem;
    opacity:.85;
}

.retoma-negociar-page .retoma-negociar-alert{
    margin-bottom:14px;
}

.retoma-negociar-page .retoma-negociar-errors{
    margin:0;
    padding-left:18px;
}

.retoma-negociar-page .retoma-negociar-form-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}

.retoma-negociar-page .retoma-negociar-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:0;
}

.retoma-negociar-page .retoma-negociar-field-full{
    grid-column:1 / -1;
}

.retoma-negociar-page .retoma-negociar-field label{
    font-weight:600;
}

.retoma-negociar-page .retoma-negociar-field input,
.retoma-negociar-page .retoma-negociar-field select,
.retoma-negociar-page .retoma-negociar-field textarea{
    width:100%;
    min-height:46px;
}

.retoma-negociar-page .retoma-negociar-field textarea{
    min-height:120px;
    resize:vertical;
}

.retoma-negociar-page .retoma-negociar-help{
    font-size:.9rem;
    opacity:.8;
}

.retoma-negociar-page .retoma-negociar-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px;
}

.retoma-negociar-page .retoma-negociar-actions .btn{
    min-height:46px;
}

.retoma-negociar-page .retoma-negociar-list{
    display:grid;
    gap:12px;
}

.retoma-negociar-page .retoma-negociar-item{
    padding:14px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#f9fafb;
}

.retoma-negociar-page .retoma-negociar-item p{
    margin:0 0 10px;
    word-break:break-word;
}

.retoma-negociar-page .retoma-negociar-item p:last-child{
    margin-bottom:0;
}

/* ================================
   RETOMA CREATE
================================ */

.retoma-create-page .retoma-create-form{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}

.retoma-create-page .retoma-create-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:0;
}

.retoma-create-page .retoma-create-field-full{
    grid-column:1 / -1;
}

.retoma-create-page .retoma-create-field label{
    font-weight:600;
}

.retoma-create-page .retoma-create-field input,
.retoma-create-page .retoma-create-field select,
.retoma-create-page .retoma-create-field textarea{
    width:100%;
    min-height:46px;
}

.retoma-create-page .retoma-create-field textarea{
    min-height:120px;
    resize:vertical;
}

.retoma-create-page .retoma-create-help{
    font-size:.9rem;
    opacity:.8;
}

.retoma-create-page .retoma-create-actions{
    grid-column:1 / -1;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:8px;
}

.retoma-create-page .retoma-create-actions .btn{
    min-height:46px;
}

.retoma-create-page .retoma-create-alert{
    margin-bottom:14px;
}

.retoma-create-page .retoma-create-errors{
    margin:0;
    padding-left:18px;
}

/* ================================
   RETOMA EDIT
================================ */

.retoma-edit-page .retoma-edit-form{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}

.retoma-edit-page .retoma-edit-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:0;
}

.retoma-edit-page .retoma-edit-field-full{
    grid-column:1 / -1;
}

.retoma-edit-page .retoma-edit-field label{
    font-weight:600;
}

.retoma-edit-page .retoma-edit-field input,
.retoma-edit-page .retoma-edit-field select,
.retoma-edit-page .retoma-edit-field textarea{
    width:100%;
    min-height:46px;
}

.retoma-edit-page .retoma-edit-field textarea{
    min-height:120px;
    resize:vertical;
}

.retoma-edit-page .retoma-edit-actions{
    grid-column:1 / -1;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:8px;
}

.retoma-edit-page .retoma-edit-actions .btn{
    min-height:46px;
}

.retoma-edit-page .retoma-edit-alert{
    margin-bottom:14px;
}

.retoma-edit-page .retoma-edit-errors{
    margin:0;
    padding-left:18px;
}

/* ================================
   RETOMA INDEX
================================ */

.retoma-index-page .retoma-index-filters{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:14px;
}

.retoma-index-page .retoma-index-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:0;
}

.retoma-index-page .retoma-index-field label{
    font-weight:600;
}

.retoma-index-page .retoma-index-field input,
.retoma-index-page .retoma-index-field select{
    width:100%;
    min-height:46px;
}

.retoma-index-page .retoma-index-filter-actions{
    grid-column:1 / -1;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:6px;
}

.retoma-index-page .retoma-index-filter-actions .btn{
    min-height:46px;
}

.retoma-index-page .retoma-index-table{
    display:block;
}

.retoma-index-page .retoma-index-mobile{
    display:none;
}

.retoma-index-page .retoma-index-mobile-list{
    display:grid;
    gap:12px;
}

.retoma-index-page .retoma-index-mobile-card{
    padding:14px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#f9fafb;
}

.retoma-index-page .retoma-index-mobile-card p{
    margin:0 0 10px;
    word-break:break-word;
}

.retoma-index-page .retoma-index-mobile-card p:last-child{
    margin-bottom:0;
}

.retoma-index-page .retoma-index-mobile-title{
    margin-bottom:10px;
    font-size:1rem;
    font-weight:700;
}

.retoma-index-page .retoma-index-mobile-title a{
    text-decoration:none;
}

.retoma-index-page .retoma-index-empty{
    margin:0;
}

/* ================================
   RETOMA PHOTOS UPLOAD
================================ */

.retoma-photos-upload-page .retoma-photos-upload-form{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
}

.retoma-photos-upload-page .retoma-photos-upload-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:0;
}

.retoma-photos-upload-page .retoma-photos-upload-field label{
    font-weight:600;
}

.retoma-photos-upload-page .retoma-photos-upload-field input{
    width:100%;
    min-height:46px;
}

.retoma-photos-upload-page .retoma-photos-upload-help{
    font-size:.9rem;
    opacity:.8;
}

.retoma-photos-upload-page .retoma-photos-upload-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:8px;
}

.retoma-photos-upload-page .retoma-photos-upload-actions .btn{
    min-height:46px;
}

.retoma-photos-upload-page .retoma-photos-upload-alert{
    margin-bottom:14px;
}

.retoma-photos-upload-page .retoma-photos-upload-errors{
    margin:0;
    padding-left:18px;
}

/* ================================
   AVALIACAO CREATE
================================ */

.avaliacao-create-page .avaliacao-create-form{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}

.avaliacao-create-page .avaliacao-create-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:0;
}

.avaliacao-create-page .avaliacao-create-field-full{
    grid-column:1 / -1;
}

.avaliacao-create-page .avaliacao-create-field label{
    font-weight:600;
}

.avaliacao-create-page .avaliacao-create-field input,
.avaliacao-create-page .avaliacao-create-field select,
.avaliacao-create-page .avaliacao-create-field textarea{
    width:100%;
    min-height:46px;
}

.avaliacao-create-page .avaliacao-create-field textarea{
    min-height:140px;
    resize:vertical;
}

.avaliacao-create-page .avaliacao-create-checkbox{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:46px;
    padding:12px 14px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#f9fafb;
}

.avaliacao-create-page .avaliacao-create-checkbox input[type="checkbox"]{
    width:18px;
    height:18px;
    min-height:auto;
    margin:0;
}

.avaliacao-create-page .avaliacao-create-actions{
    grid-column:1 / -1;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:8px;
}

.avaliacao-create-page .avaliacao-create-actions .btn{
    min-height:46px;
}

.avaliacao-create-page .avaliacao-create-alert{
    margin-bottom:14px;
}

.avaliacao-create-page .avaliacao-create-errors{
    margin:0;
    padding-left:18px;
}

/* ================================
   RETOMA NEGOCIACAO RESPONDER
================================ */

.retoma-negociacao-responder-page .retoma-negociacao-responder-form{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:0;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-field-full{
    grid-column:1 / -1;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-field label{
    font-weight:600;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-field input,
.retoma-negociacao-responder-page .retoma-negociacao-responder-field select,
.retoma-negociacao-responder-page .retoma-negociacao-responder-field textarea{
    width:100%;
    min-height:46px;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-field textarea{
    min-height:130px;
    resize:vertical;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-actions{
    grid-column:1 / -1;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:8px;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-actions .btn{
    min-height:46px;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-alert{
    margin-bottom:14px;
}

.retoma-negociacao-responder-page .retoma-negociacao-responder-errors{
    margin:0;
    padding-left:18px;
}

/* ================================
   TABLET
================================ */

@media (max-width: 1024px){
    .retoma-show-page .detail-grid{
        grid-template-columns:repeat(2, 1fr);
    }

    .retoma-show-page .photo-grid{
        grid-template-columns:repeat(2, 1fr);
    }

    .retoma-negociar-page .retoma-negociar-wrap{
        grid-template-columns:1fr;
    }

    .retoma-index-page .retoma-index-filters{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

/* ================================
   GLOBAL MOBILE
================================ */

@media (max-width: 768px){
    .page-head{
        flex-direction:column;
        align-items:flex-start;
    }

    .page-head-actions{
        width:100%;
    }

    .page-head-actions .btn,
    .page-head-actions .btn-inline{
        width:100%;
    }

    .timeline-head{
        flex-direction:column;
        align-items:flex-start;
    }
}

/* ================================
   RETOMAS MOBILE
================================ */

@media (max-width: 640px){
    .retoma-show-page .page-head,
    .retoma-create-page .retoma-create-head,
    .retoma-edit-page .retoma-edit-head,
    .retoma-index-page .retoma-index-head,
    .retoma-negociar-page .retoma-negociar-head,
    .retoma-photos-upload-page .retoma-photos-upload-head,
    .retoma-negociacao-responder-page .retoma-negociacao-responder-head,
    .avaliacao-create-page .avaliacao-create-head{
        flex-direction:column;
        align-items:stretch;
    }

    .retoma-show-page .page-head-actions,
    .retoma-create-page .retoma-create-head-actions,
    .retoma-edit-page .retoma-edit-head-actions,
    .retoma-index-page .retoma-index-head-actions,
    .retoma-negociar-page .retoma-negociar-head-actions,
    .retoma-photos-upload-page .retoma-photos-upload-head-actions,
    .retoma-negociacao-responder-page .retoma-negociacao-responder-head-actions,
    .avaliacao-create-page .avaliacao-create-head-actions{
        width:100%;
        flex-direction:column;
        align-items:stretch;
        justify-content:flex-start;
    }

    .retoma-show-page .page-head-actions .btn,
    .retoma-show-page .page-head-actions .btn-edit,
    .retoma-create-page .retoma-create-head-actions .btn,
    .retoma-edit-page .retoma-edit-head-actions .btn,
    .retoma-index-page .retoma-index-head-actions .btn,
    .retoma-negociar-page .retoma-negociar-head-actions .btn,
    .retoma-photos-upload-page .retoma-photos-upload-head-actions .btn,
    .retoma-negociacao-responder-page .retoma-negociacao-responder-head-actions .btn,
    .avaliacao-create-page .avaliacao-create-head-actions .btn{
        width:100%;
        justify-content:center;
    }

    .retoma-show-page .detail-grid,
    .retoma-show-page .photo-grid,
    .retoma-negociar-page .retoma-negociar-summary,
    .retoma-negociar-page .retoma-negociar-form-grid,
    .retoma-create-page .retoma-create-form,
    .retoma-edit-page .retoma-edit-form,
    .retoma-index-page .retoma-index-filters,
    .avaliacao-create-page .avaliacao-create-form,
    .retoma-negociacao-responder-page .retoma-negociacao-responder-form{
        grid-template-columns:1fr;
    }

    .retoma-show-page .status-actions,
    .retoma-negociar-page .retoma-negociar-actions,
    .retoma-create-page .retoma-create-actions,
    .retoma-edit-page .retoma-edit-actions,
    .retoma-index-page .retoma-index-filter-actions,
    .retoma-photos-upload-page .retoma-photos-upload-actions,
    .avaliacao-create-page .avaliacao-create-actions,
    .retoma-negociacao-responder-page .retoma-negociacao-responder-actions{
        flex-direction:column;
    }

    .retoma-show-page .status-actions .btn,
    .retoma-negociar-page .retoma-negociar-actions .btn,
    .retoma-create-page .retoma-create-actions .btn,
    .retoma-edit-page .retoma-edit-actions .btn,
    .retoma-index-page .retoma-index-filter-actions .btn,
    .retoma-photos-upload-page .retoma-photos-upload-actions .btn,
    .avaliacao-create-page .avaliacao-create-actions .btn,
    .retoma-negociacao-responder-page .retoma-negociacao-responder-actions .btn{
        width:100%;
        justify-content:center;
    }

    .retoma-index-page .retoma-index-table{
        display:none;
    }

    .retoma-index-page .retoma-index-mobile{
        display:block;
    }

    .retoma-show-page h1,
    .retoma-create-page h1,
    .retoma-edit-page h1,
    .retoma-index-page h1,
    .retoma-negociar-page h1,
    .retoma-photos-upload-page h1,
    .retoma-negociacao-responder-page h1,
    .avaliacao-create-page h1{
        font-size:1.3rem;
    }

    .retoma-show-page h2{
        font-size:1.05rem;
    }
}