* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f2f4f7;
    color: #222;
}

a {
    color: #1b5fa7;
    text-decoration: none;
}

.topbar {
    height: 58px;
    background: #16324f;
    color: #fff;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 20px;
    font-weight: bold;
}

.user-box a {
    color: #fff;
}

.layout {
    display: flex;
    min-height: calc(100vh - 94px);
}

.sidebar {
    width: 230px;
    background: #1f4165;
    padding: 18px 0;
}

.sidebar a,
.menu-title {
    display: block;
    color: #fff;
    padding: 12px 20px;
}

.sidebar a:hover {
    background: #2f5f8d;
}

.menu-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #b9c9d8;
    padding-top: 22px;
    padding-bottom: 6px;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 24px;
}

.footer {
    height: 36px;
    background: #16324f;
    color: #fff;
    text-align: center;
    padding-top: 10px;
    font-size: 12px;
}

.panel,
.dashboard-panel {
    background: #fff;
    border: 1px solid #d8dde3;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.panel h1,
.panel h2,
.dashboard-panel h1,
.dashboard-panel h2 {
    margin-top: 0;
}

.cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.card {
    background: #fff;
    border: 1px solid #d8dde3;
    border-left: 5px solid #1b5fa7;
    border-radius: 4px;
    padding: 18px;
    min-width: 210px;
    flex: 1;
}

.card .number {
    font-size: 30px;
    font-weight: bold;
    margin-top: 8px;
}

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

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

input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    max-width: 520px;
    padding: 10px;
    border: 1px solid #aeb8c2;
    border-radius: 3px;
    background: #fff;
}

button,
.button {
    display: inline-block;
    border: 0;
    border-radius: 3px;
    padding: 10px 16px;
    cursor: pointer;
    background: #1b5fa7;
    color: #fff;
}

button:hover,
.button:hover {
    opacity: 0.9;
}

.button-secondary {
    background: #697783;
}

.button-danger {
    background: #a83030;
}

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

th,
td {
    border: 1px solid #d8dde3;
    padding: 10px;
    text-align: left;
}

th {
    background: #e9edf2;
}

.alert {
    padding: 12px 15px;
    margin-bottom: 18px;
    border-radius: 3px;
}

.alert-success {
    background: #dff2e1;
    border: 1px solid #9bc79f;
}

.alert-danger {
    background: #f7dddd;
    border: 1px solid #d49b9b;
}

.alert-warning {
    background: #fff2cc;
    border: 1px solid #d7c16f;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #16324f;
}

.login-box {
    width: 390px;
    background: #fff;
    border-radius: 5px;
    padding: 28px;
}

.login-box h1 {
    margin-top: 0;
    text-align: center;
}

.small {
    font-size: 12px;
    color: #666;
}

.actions a {
    margin-right: 8px;
}

/* Dashboard */

.dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.dashboard-header h1 {
    margin: 0 0 4px 0;
}

.dashboard-subtitle {
    margin: 0;
    color: #657180;
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.dashboard-controls label {
    font-weight: bold;
}

.dashboard-controls select {
    width: auto;
    min-width: 160px;
}

.dashboard-status-line {
    min-height: 22px;
    margin-bottom: 12px;
    color: #6a7480;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.dashboard-hidden {
    display: none;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.metric-card {
    background: #fff;
    border: 1px solid #d8dde3;
    border-top: 4px solid #61758a;
    border-radius: 5px;
    padding: 17px;
    min-height: 125px;
}

.metric-card.metric-inbound {
    border-top-color: #2472a4;
}

.metric-card.metric-outbound {
    border-top-color: #c06b22;
}

.metric-card.metric-internal {
    border-top-color: #6b4fa1;
}

.metric-card.metric-success {
    border-top-color: #2d824a;
}

.metric-card.metric-warning {
    border-top-color: #b48a18;
}

.metric-label {
    color: #5d6875;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: bold;
}

.metric-value {
    font-size: 34px;
    line-height: 42px;
    font-weight: bold;
    margin-top: 8px;
}

.metric-time {
    font-size: 26px;
}

.metric-detail {
    color: #76818d;
    font-size: 12px;
    margin-top: 4px;
}

.dashboard-grid {
    display: grid;
    gap: 20px;
}

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

.panel-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 18px;
}

.panel-heading span {
    color: #73808d;
    font-size: 12px;
}

.bar-row {
    margin-bottom: 18px;
}

.bar-row:last-child {
    margin-bottom: 0;
}

.bar-row-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.bar-track,
.ranking-track {
    height: 12px;
    background: #edf0f3;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill,
.ranking-fill {
    height: 100%;
    min-width: 2px;
    border-radius: 6px;
}

.bar-inbound {
    background: #2472a4;
}

.bar-outbound {
    background: #c06b22;
}

.bar-internal {
    background: #6b4fa1;
}

.chart-legend {
    display: flex;
    gap: 18px;
    margin-bottom: 12px;
    font-size: 12px;
}

.legend-box {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
}

.legend-inbound {
    background: #2472a4;
}

.legend-outbound {
    background: #c06b22;
}

.legend-internal {
    background: #6b4fa1;
}

.hourly-chart {
    height: 190px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    border-bottom: 1px solid #ccd3da;
    padding: 0 4px;
    overflow-x: auto;
}

.hour-group {
    min-width: 24px;
    flex: 1;
    text-align: center;
}

.hour-bars {
    height: 160px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
}

.hour-bar {
    display: inline-block;
    width: 5px;
    min-height: 2px;
}

.hour-inbound {
    background: #2472a4;
}

.hour-outbound {
    background: #c06b22;
}

.hour-internal {
    background: #6b4fa1;
}

.hour-label {
    font-size: 10px;
    color: #66727e;
    padding-top: 5px;
}

.ranking-row {
    margin-bottom: 15px;
}

.ranking-header {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 7px;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.ranking-position {
    width: 23px;
    height: 23px;
    line-height: 23px;
    text-align: center;
    border-radius: 50%;
    background: #e8edf2;
    font-weight: bold;
}

.ranking-fill {
    background: #2472a4;
}

.empty-state {
    padding: 30px 10px;
    text-align: center;
    color: #75818d;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.dashboard-table {
    min-width: 780px;
}

.dashboard-table th {
    white-space: nowrap;
}

.call-type,
.call-status {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.call-type-entrante {
    background: #dcecf7;
    color: #175c87;
}

.call-type-sainte {
    background: #f7e6d7;
    color: #914c14;
}

.call-type-interna {
    background: #e9e1f6;
    color: #573887;
}

.call-type-outros {
    background: #e8ecef;
    color: #52606c;
}

.call-status-answered {
    background: #dcefdc;
    color: #246638;
}

.call-status-unanswered {
    background: #f3dddd;
    color: #8d2f2f;
}

@media (max-width: 1150px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
    }

    .dashboard-grid-two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .layout {
        display: block;
    }

    .sidebar {
        width: 100%;
    }

    .cards {
        display: block;
    }

    .card {
        margin-bottom: 12px;
    }

    .dashboard-header {
        display: block;
    }

    .dashboard-controls {
        margin-top: 14px;
        display: block;
        white-space: normal;
    }

    .dashboard-controls label,
    .dashboard-controls select,
    .dashboard-controls button {
        display: block;
        width: 100%;
        max-width: none;
        margin-bottom: 8px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }
}

/* Etapa 3 */
.filter-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px}.filter-grid .form-row{margin:0}.filter-grid input,.filter-grid select{max-width:none}.report-actions{margin-top:18px;display:flex;gap:8px;flex-wrap:wrap}.report-metrics{grid-template-columns:repeat(4,minmax(180px,1fr))}.report-table{font-size:12px}.pagination{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:18px}.sip-toolbar{display:flex;gap:10px;margin-bottom:16px}.sip-toolbar input{max-width:360px}.sip-toolbar select{max-width:220px}.sip-state{display:inline-block;padding:4px 7px;border-radius:3px;font-size:11px;font-weight:bold}.sip-state-online{background:#dcefdc;color:#246638}.sip-state-unreachable{background:#f3dddd;color:#8d2f2f}.sip-state-unknown,.sip-state-unmonitored{background:#fff2cc;color:#725b0c}@media(max-width:1200px){.filter-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}}@media(max-width:700px){.filter-grid{grid-template-columns:1fr}.sip-toolbar{display:block}.sip-toolbar input,.sip-toolbar select{max-width:none;margin-bottom:8px}}

/* Etapa 3.1 - Ramais SIP */
.sip-metric-grid {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.sip-result-count {
    margin-left: auto;
    align-self: center;
    color: #66727e;
    font-size: 12px;
    white-space: nowrap;
}

.sip-table {
    min-width: 1050px;
}

.sip-state-lagged {
    background: #fff0c2;
    color: #7b5c00;
}

.sip-state-other {
    background: #e8ecef;
    color: #52606c;
}

.sip-muted {
    color: #8a949e;
    font-style: italic;
}

.sip-realtime {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.sip-realtime-yes {
    background: #dcecf7;
    color: #175c87;
}

.sip-realtime-no {
    background: #e8ecef;
    color: #52606c;
}

@media (max-width: 1450px) {
    .sip-metric-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }
}

@media (max-width: 800px) {
    .sip-metric-grid {
        grid-template-columns: 1fr;
    }

    .sip-result-count {
        display: block;
        margin: 8px 0 0 0;
    }
}


/* Versão 5.0 - Pesquisa de Satisfação */
.satisfaction-filter-grid {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
}

.satisfaction-metric-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.satisfaction-card-5 {
    border-top-color: #2d824a;
}

.satisfaction-card-4 {
    border-top-color: #5a9d45;
}

.satisfaction-card-3 {
    border-top-color: #b48a18;
}

.satisfaction-card-2 {
    border-top-color: #c06b22;
}

.satisfaction-card-1 {
    border-top-color: #a83030;
}

.satisfaction-bar-5 {
    background: #2d824a;
}

.satisfaction-bar-4 {
    background: #5a9d45;
}

.satisfaction-bar-3 {
    background: #b48a18;
}

.satisfaction-bar-2 {
    background: #c06b22;
}

.satisfaction-bar-1 {
    background: #a83030;
}

.satisfaction-table {
    min-width: 760px;
}

.satisfaction-daily-table {
    min-width: 420px;
}

.satisfaction-note {
    display: inline-block;
    min-width: 34px;
    padding: 5px 8px;
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
}

.satisfaction-note-5 {
    background: #dcefdc;
    color: #246638;
}

.satisfaction-note-4 {
    background: #e4f1dd;
    color: #42752f;
}

.satisfaction-note-3 {
    background: #fff2cc;
    color: #725b0c;
}

.satisfaction-note-2 {
    background: #f7e6d7;
    color: #914c14;
}

.satisfaction-note-1,
.satisfaction-note-invalid {
    background: #f3dddd;
    color: #8d2f2f;
}

@media (max-width: 1200px) {
    .satisfaction-filter-grid {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
    }

    .satisfaction-metric-grid {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }
}

@media (max-width: 700px) {
    .satisfaction-filter-grid,
    .satisfaction-metric-grid {
        grid-template-columns: 1fr;
    }
}


/* Versão 5.1 - Inventário de Ramais SIP Online */
.sip-inventory-filter-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.sip-inventory-metric-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
}

.sip-model-card-value {
    font-size: 20px;
    line-height: 27px;
    word-break: break-word;
}

.sip-model-bar {
    background: #2472a4;
}

.sip-inventory-table {
    min-width: 1120px;
}

.sip-useragent-cell {
    max-width: 300px;
    font-size: 12px;
    color: #66727e;
    word-break: break-word;
}

.sip-latency-badge {
    display: inline-block;
    min-width: 65px;
    padding: 5px 8px;
    border-radius: 4px;
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
}

.sip-latency-good {
    background: #2d824a;
}

.sip-latency-warning {
    background: #b48a18;
}

.sip-latency-bad {
    background: #a83030;
}

@media (max-width: 1300px) {
    .sip-inventory-metric-grid {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }
}

@media (max-width: 750px) {
    .sip-inventory-filter-grid,
    .sip-inventory-metric-grid {
        grid-template-columns: 1fr;
    }
}


/* Versão 5.2 - Agentes via AMI */
.agents-filter-grid{grid-template-columns:repeat(4,minmax(180px,1fr))}
.agents-metric-grid{grid-template-columns:repeat(6,minmax(150px,1fr))}
.agent-card-busy{border-top-color:#a83030}
.agents-table{min-width:1200px}
.agent-status{display:inline-block;min-width:105px;padding:5px 8px;border-radius:4px;color:#fff;text-align:center;font-size:11px;font-weight:bold}
.agent-status-free{background:#2d824a}
.agent-status-busy{background:#a83030}
.agent-status-paused{background:#b48a18}
.agent-status-ringing{background:#2472a4}
.agent-status-offline{background:#697783}
@media(max-width:1350px){.agents-metric-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}}
@media(max-width:1050px){.agents-filter-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}}
@media(max-width:700px){.agents-filter-grid,.agents-metric-grid{grid-template-columns:1fr}}

/* Versão 5.3 - Firewall / Fail2Ban */
.firewall-hidden {
    display: none;
}

.firewall-metric-grid {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.firewall-card-danger {
    border-top-color: #a83030;
}

.firewall-status-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: 3px;
}

.firewall-status-ok {
    background: #2d824a;
}

.firewall-status-down {
    background: #a83030;
}

.firewall-config-list {
    border-top: 1px solid #e1e5e9;
}

.firewall-config-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid #e1e5e9;
    font-size: 13px;
}

.firewall-config-row span {
    color: #697783;
}

.firewall-config-row strong {
    text-align: right;
    word-break: break-all;
}

.firewall-help {
    margin-top: 16px;
    padding: 12px;
    background: #f4f7f9;
    border-left: 4px solid #61758a;
    color: #5f6c78;
    font-size: 12px;
    line-height: 18px;
}

.firewall-toolbar {
    justify-content: space-between;
}

.firewall-table {
    min-width: 650px;
}

.firewall-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.firewall-badge-banned {
    background: #f3dddd;
    color: #8d2f2f;
}

.firewall-table button {
    padding: 7px 11px;
}

@media (max-width: 1250px) {
    .firewall-metric-grid {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
    }
}

@media (max-width: 800px) {
    .firewall-metric-grid {
        grid-template-columns: 1fr;
    }

    .firewall-config-row {
        display: block;
    }

    .firewall-config-row strong {
        display: block;
        margin-top: 4px;
        text-align: left;
    }
}

/* ==========================================================
   FIREWALL V2
   ========================================================== */

.firewall-period{display:flex;gap:8px;margin-bottom:18px}
.firewall-period-btn{padding:8px 14px;border:1px solid #cfd7df;background:#fff;border-radius:4px;cursor:pointer}
.firewall-period-btn.active{background:#34495e;color:#fff}
.firewall-v2-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px}
.firewall-v2-stats>div{background:#f4f7f9;border-left:4px solid #61758a;padding:14px}
.firewall-v2-stats span{display:block;color:#697783;font-size:12px}
.firewall-v2-stats strong{font-size:24px}
.firewall-chart,.firewall-top{min-height:220px}
.firewall-bar-row{display:flex;align-items:center;gap:8px;margin:7px 0;font-size:11px}
.firewall-bar-label{width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.firewall-bar-track{flex:1;background:#edf1f4;height:16px;border-radius:3px;overflow:hidden}
.firewall-bar-fill{height:100%;background:#61758a;min-width:2px}
.firewall-bar-value{width:42px;text-align:right;font-weight:bold}
.firewall-whitelist{padding:12px;background:#f4f7f9;line-height:24px;word-break:break-all}
.firewall-event-ban{color:#a83030;font-weight:bold}
.firewall-event-unban{color:#2d824a;font-weight:bold}

@media(max-width:800px){
    .firewall-v2-stats{grid-template-columns:1fr}
}

/* CADASTRO DE RAMAIS V1 */
.extension-registry-metrics{grid-template-columns:repeat(3,minmax(190px,1fr))}
.extension-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:14px;align-items:end}
.extension-filter-actions{padding-bottom:1px}
.extension-form-panel{max-width:950px}
.extension-form-grid{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:14px 20px}
.extension-form-grid select{width:100%;padding:10px;border:1px solid #cfd7df;border-radius:4px;background:#fff}
.extension-status{display:inline-block;padding:5px 9px;border-radius:3px;font-size:11px;font-weight:bold}
.extension-online{background:#dcefe2;color:#267443}
.extension-offline{background:#f3dddd;color:#8d2f2f}
.inline-form{display:inline}
.button-secondary{background:#7b8792}
.extension-registry-table{min-width:900px}
@media(max-width:900px){.extension-registry-metrics,.extension-filter-grid,.extension-form-grid{grid-template-columns:1fr}}

/* CADASTRO DE EMPRESAS */
.company-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr)) auto;gap:14px;align-items:end}
@media(max-width:900px){.company-filter-grid{grid-template-columns:1fr}}

/* FILAS DE ATENDIMENTO V1 */
.queue-home-grid{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:20px}.queue-home-card{display:block;background:#fff;border:1px solid #dce3e8;border-left:5px solid #61758a;padding:24px;text-decoration:none;color:#263746;border-radius:4px}.queue-home-card strong{display:block;font-size:20px;margin-bottom:8px}.queue-home-card span{color:#697783}.queue-filter{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:14px;align-items:end}.agent-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr)) auto;gap:14px;align-items:end}.agent-filter-grid select,.agent-form-panel select{width:100%;padding:10px;border:1px solid #cfd7df;border-radius:4px;background:#fff}.agent-form-panel{max-width:1050px}.dual-list-wrap{display:grid;grid-template-columns:1fr 70px 1fr;gap:15px;align-items:center;margin:24px 0}.dual-list-wrap label{display:block;font-weight:bold;margin-bottom:8px}.dual-list-wrap select{min-height:270px}.dual-list-buttons{display:flex;flex-direction:column;gap:8px}.dual-list-buttons button{padding:9px;border:1px solid #c5cfd7;background:#f4f7f9;cursor:pointer;border-radius:4px;font-weight:bold}@media(max-width:900px){.queue-home-grid,.queue-filter,.agent-filter-grid,.dual-list-wrap{grid-template-columns:1fr}.dual-list-buttons{flex-direction:row;justify-content:center}}

/* =========================================================
   CADASTRO DE AGENTES - LAYOUT V2
   ========================================================= */

.agent-form-panel {
    max-width: none;
}

/* Nome e Ramal */
.agent-form-panel .extension-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
}

.agent-form-panel .form-row {
    margin: 0;
}

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

.agent-form-panel .form-row input,
.agent-form-panel .form-row select {
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cfd7df;
    border-radius: 5px;
    background: #fff;
}

/* Seletor das filas */
.agent-form-panel .dual-list-wrap {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 70px minmax(300px, 1fr);
    gap: 18px;
    align-items: center;
    margin: 10px 0 26px;
}

.agent-form-panel .dual-list-wrap > div:not(.dual-list-buttons) {
    min-width: 0;
}

.agent-form-panel .dual-list-wrap label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* As duas caixas exatamente iguais */
.agent-form-panel .dual-list-wrap select {
    display: block;
    width: 100%;
    height: 330px;
    min-height: 330px;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #cfd7df;
    border-radius: 5px;
    background: #fff;
}

/* Botões centrais */
.agent-form-panel .dual-list-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.agent-form-panel .dual-list-buttons button {
    width: 54px;
    height: 38px;
    padding: 0;
    margin: 0 auto;
    border: 0;
    border-radius: 5px;
    background: #1f66ad;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.agent-form-panel .dual-list-buttons button:hover {
    background: #18548f;
}

/* Salvar / Cancelar */
.agent-form-panel .form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}

/* Responsivo */
@media (max-width: 900px) {

    .agent-form-panel .extension-form-grid {
        grid-template-columns: 1fr;
    }

    .agent-form-panel .dual-list-wrap {
        grid-template-columns: 1fr;
    }

    .agent-form-panel .dual-list-buttons {
        flex-direction: row;
        justify-content: center;
        padding: 4px 0;
    }

    .agent-form-panel .dual-list-buttons button {
        margin: 0;
    }
}

/* =========================================================
   CADASTRO DE SAIDAS
   ========================================================= */

.outbound-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(200px, 1fr)
        minmax(220px, 1fr)
        minmax(140px, .5fr)
        minmax(140px, .5fr)
        auto;
    gap: 14px;
    align-items: end;
}

.outbound-filter-grid select,
.outbound-filter-grid input,
.agent-form-panel select,
.extension-form-panel select {
    width: 100%;
    box-sizing: border-box;
}

.outbound-registry-table .outbound-col-actions {
    width: 190px;
    white-space: nowrap;
}

.outbound-registry-table code {
    font-size: 12px;
    white-space: nowrap;
}

@media(max-width:1100px) {
    .outbound-filter-grid {
        grid-template-columns: repeat(2, minmax(200px,1fr));
    }
}

@media(max-width:700px) {
    .outbound-filter-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   CORREÇÃO - CONTROLES DO RELATÓRIO CDR
   Impede os botões de esticarem verticalmente
   ========================================================= */


/* =========================================================
   RELATÓRIO CDR - BARRA DE AÇÕES
   ========================================================= */

.report-actions {
    margin-top: 18px;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
}

/* Todos os botões, inclusive o <button> Pesquisar */
.report-actions button,
.report-actions a,
.report-actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;

    padding: 0 16px !important;
    margin: 0 !important;

    flex: 0 0 auto !important;

    line-height: 1 !important;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Evita que o grid dos filtros estique elementos */
.filter-grid {
    align-items: end;
}

/* Responsivo */
@media (max-width: 700px) {
    .report-actions {
        justify-content: flex-start;
    }

    .report-actions button,
    .report-actions a,
    .report-actions .button {
        width: auto !important;
    }
}

/* =========================================================
   RELATÓRIO CDR - CAMPOS DE FILTRO
   ========================================================= */

.filter-grid .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-grid .form-row label {
    font-size: 14px;
    font-weight: 600;
    color: #263746;
    margin: 0;
}

/* Todos os campos com o mesmo padrão visual */
.filter-grid input,
.filter-grid select {
    width: 100%;
    height: 42px;
    box-sizing: border-box;

    padding: 0 12px;

    border: 1px solid #cfd8e3;
    border-radius: 6px;

    background: #ffffff;
    color: #263746;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

/* Destaque quando clicar no campo */
.filter-grid input:focus,
.filter-grid select:focus {
    border-color: #2468a9;
    box-shadow: 0 0 0 3px rgba(36, 104, 169, 0.12);
}

/* Data e hora */
.filter-grid input[type="date"],
.filter-grid input[type="time"] {
    min-width: 0;
    cursor: pointer;
}

/* Ícones de calendário e relógio */
.filter-grid input[type="date"]::-webkit-calendar-picker-indicator,
.filter-grid input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.65;
    padding: 6px;
}

.filter-grid input[type="date"]::-webkit-calendar-picker-indicator:hover,
.filter-grid input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

