/* =========================================================
   PROCRM - CSS COMPLETO
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

/* =========================================================
   LOGIN
   ========================================================= */

body.login-page {
    min-height: 100vh;
    width: 100%;

    background: #12334d;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 20px;
}

.login-page .login-shell {
    width: 390px;
    max-width: calc(100vw - 40px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    margin: 0 auto;
    padding: 0;

    gap: 8px;
}

/* =========================================================
   LOGO DO LOGIN
   ========================================================= */

.login-page .login-logo img {
    width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}




.login-page .login-logo {
    width: 100%;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    margin: 0;
    padding: 0;

    line-height: 0;
}

.login-page .login-logo img {
    display: block;

    width: 180px;
    max-width: 180px;
    height: auto;

    margin: 0;
    padding: 0;
}

/* =========================================================
   CARD DE IDENTIFICAÇÃO
   ========================================================= */

.login-page .login-card {
    width: 100%;

    background: #ffffff;

    border-radius: 12px;

    padding: 24px;

    margin: 0;

    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.login-page .login-card h1 {
    margin: 0 0 6px 0;

    color: #102f49;

    font-size: 25px;
    font-weight: 700;

    line-height: 1.2;
}

.login-page .login-card p {
    margin: 0 0 18px 0;

    color: #60748a;

    font-size: 11px;
    line-height: 1.5;
}

.login-page .login-card label {
    display: block;

    margin: 0 0 6px 0;

    color: #16344e;

    font-size: 10px;
    font-weight: 700;
}

.login-page .login-card input {
    width: 100%;
    height: 36px;

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

    background: #f8fafc;

    padding: 0 11px;

    color: #18344d;

    font-size: 11px;

    outline: none;

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

.login-page .login-card input::placeholder {
    color: #8292a5;
}

.login-page .login-card input:focus {
    background: #ffffff;

    border-color: #1f6feb;

    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.10);
}

/* =========================================================
   BOTÃO PRINCIPAL
   ========================================================= */

.btn-primary {
    width: 100%;
    height: 36px;

    border: 0;
    border-radius: 6px;

    background: #2167d5;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    margin-top: 13px;

    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

.btn-primary:hover {
    background: #1859bf;
}

.btn-primary:active {
    transform: translateY(1px);
}

/* =========================================================
   ERRO LOGIN
   ========================================================= */

.login-error {
    margin: 0 0 12px 0;

    padding: 9px 10px;

    border-radius: 6px;

    background: #fff1f1;

    border: 1px solid #f2c4c4;

    color: #b42318;

    font-size: 10px;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

body.dashboard-page {
    width: 100%;
    height: 100vh;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: #eef3f8;

    font-family: Arial, Helvetica, sans-serif;
}

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

.topbar {
    width: 100%;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    background: #12334d;

    color: #ffffff;
}

.top-left {
    display: flex;
    align-items: center;

    gap: 14px;
}

.top-left strong {
    font-size: 19px;
    font-weight: 700;
}

.top-left span {
    color: #c7d8e8;

    font-size: 12px;
}

.top-right {
    display: flex;
    align-items: center;

    gap: 10px;
}

.top-control {
    height: 32px;

    padding: 0 10px;

    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;

    background: rgba(255,255,255,0.08);

    color: #ffffff;

    font-size: 11px;

    cursor: pointer;
}

.top-control:hover {
    background: rgba(255,255,255,0.14);
}

.top-control.ok {
    background: rgba(34,197,94,0.18);

    border-color: rgba(34,197,94,0.35);
}

.status {
    display: flex;
    align-items: center;

    gap: 6px;

    color: #d7e4ef;

    font-size: 11px;
}

.status i {
    width: 7px;
    height: 7px;

    display: inline-block;

    border-radius: 50%;

    background: #22c55e;
}

.operator {
    padding-left: 8px;

    color: #ffffff;

    font-size: 11px;
    font-weight: 600;
}

.logout-link {
    color: #c7d8e8;

    font-size: 11px;

    text-decoration: none;
}

.logout-link:hover {
    color: #ffffff;
}

/* =========================================================
   BARRA DE MODOS
   ========================================================= */

.modebar {
    width: 100%;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 16px;

    background: #ffffff;

    border-bottom: 1px solid #dce5ee;
}

.mode-buttons {
    display: flex;
    align-items: center;

    gap: 7px;
}

.mode {
    width: 38px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;

    border: 1px solid #d7e0ea;
    border-radius: 7px;

    background: #ffffff;

    cursor: pointer;

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

.mode:hover {
    background: #f3f7fb;

    border-color: #b9c9da;
}

.mode.active {
    background: #edf4ff;

    border-color: #2167d5;

    box-shadow: 0 0 0 2px rgba(33,103,213,0.08);
}

.mode img {
    width: 24px;
    height: 24px;

    object-fit: contain;
}

.mode-split {
    width: 50px;
}

.split-icons {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 2px;
}

.split-icons img {
    width: 18px;
    height: 18px;

    object-fit: contain;
}

.tools {
    color: #718398;

    font-size: 10px;
}

/* =========================================================
   ÁREA PRINCIPAL
   ========================================================= */

.workspace {
    width: 100%;

    height: calc(100vh - 110px);

    overflow: hidden;

    background: #e9eff5;
}

.panels {
    width: 100%;
    height: 100%;

    display: flex;
}

.panel {
    display: none;

    height: 100%;

    overflow: hidden;

    background: #ffffff;
}

.panel.active {
    display: block;
}

/* WhatsApp */
.workspace.whatsapp .panel {
    width: 100%;
}

/* Discador */
.workspace.discador .panel {
    width: 100%;
}

/* Lado a lado */
.workspace.split .panels {
    gap: 1px;

    background: #cbd5df;
}

.workspace.split .panel {
    display: block;

    width: 50%;
}

/* =========================================================
   IFRAMES
   ========================================================= */

.panel iframe {
    display: block;

    width: 100%;
    height: 100%;

    border: 0;

    background: #ffffff;
}

/* =========================================================
   MODAL DE PERMISSÕES
   ========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(7, 25, 39, 0.68);

    backdrop-filter: blur(3px);
}

.modal.open {
    display: flex;
}

.modal-card {
    width: 390px;
    max-width: 100%;

    padding: 28px;

    border-radius: 14px;

    background: #ffffff;

    box-shadow: 0 25px 70px rgba(0,0,0,0.25);

    text-align: center;
}

.modal-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 12px auto;

    border-radius: 50%;

    background: #edf4ff;

    font-size: 23px;
}

.modal-card h2 {
    margin: 0 0 8px 0;

    color: #12334d;

    font-size: 19px;
}

.modal-card p {
    margin: 0 0 18px 0;

    color: #65788c;

    font-size: 11px;

    line-height: 1.55;
}

.btn-secondary {
    width: 100%;
    height: 36px;

    margin-top: 8px;

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

    background: #ffffff;

    color: #17344e;

    font-size: 11px;
    font-weight: 600;

    cursor: pointer;
}

.btn-secondary:hover {
    background: #f5f8fb;
}

.btn-link {
    display: block;

    width: 100%;

    margin-top: 14px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #6b7d90;

    font-size: 10px;

    cursor: pointer;
}

.btn-link:hover {
    color: #2167d5;
}

.modal-card small {
    display: block;

    margin-top: 13px;

    color: #94a3b3;

    font-size: 9px;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 700px) {

    body.login-page {
        padding: 15px;
    }

    .login-page .login-shell {
        width: 100%;
        max-width: 390px;
    }

    .login-page .login-logo img {
        width: 160px;
        max-width: 160px;
    }

    .topbar {
        height: 56px;

        padding: 0 10px;
    }

    .top-left span,
    .top-control span,
    .status,
    .operator {
        display: none;
    }

    .top-right {
        gap: 5px;
    }

    .modebar {
        padding: 0 10px;
    }

    .tools {
        display: none;
    }

    .workspace {
        height: calc(100vh - 108px);
    }

    .workspace.split .panels {
        flex-direction: column;
    }

    .workspace.split .panel {
        width: 100%;
        height: 50%;
    }
}

/* =========================================================
   CELULARES PEQUENOS
   ========================================================= */

@media (max-width: 420px) {

    .login-page .login-shell {
        max-width: 100%;
    }

    .login-page .login-card {
        padding: 21px;
    }

    .login-page .login-card h1 {
        font-size: 23px;
    }

    .login-page .login-logo img {
        width: 150px;
        max-width: 150px;
    }
}