:root {
    --mev-bg: #f4f6f9;
    --mev-surface: #ffffff;
    --mev-text: #172033;
    --mev-muted: #697386;
    --mev-border: #e5e9f0;
    --mev-primary: #182a46;
    --mev-primary-soft: #263b5d;
    --mev-accent: #3d77f3;
    --mev-success: #177b50;
    --mev-danger: #c13535;
    --mev-radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--mev-bg);
    color: var(--mev-text);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.mevecx-auth-layout,
.mevcx-auth-layout {
    min-height: 100vh;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns:
        minmax(380px, 520px)
        minmax(0, 1fr);
    background: #fff;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 72px;
    background: #fff;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 76px;
}

.brand-mark,
.admin-logo span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--mev-primary);
    color: #fff;
    font-weight: 800;
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .02em;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--mev-muted);
    font-size: 12px;
}

.login-copy h1 {
    margin: 0 0 10px;
    font-size: 34px;
    letter-spacing: -.03em;
}

.login-copy p {
    margin: 0 0 34px;
    color: var(--mev-muted);
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 13px;
    font-weight: 700;
}

.field input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--mev-border);
    border-radius: 11px;
    background: #fff;
    color: var(--mev-text);
    outline: none;
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.field input:focus {
    border-color: var(--mev-accent);
    box-shadow:
        0 0 0 3px
        rgba(61, 119, 243, .12);
}

.login-button {
    height: 52px;
    border: 0;
    border-radius: 11px;
    background: var(--mev-primary);
    color: #fff;
    font-weight: 700;
    transition:
        transform .15s ease,
        background .15s ease;
}

.login-button:hover {
    background: var(--mev-primary-soft);
}

.login-button:active {
    transform: translateY(1px);
}

.login-button:disabled {
    opacity: .65;
    cursor: default;
}

.login-error {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff0f0;
    color: var(--mev-danger);
    font-size: 13px;
}

.login-footer {
    margin-top: 38px;
    color: #9aa3b2;
    font-size: 12px;
}

.login-visual {
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
    padding: 80px;
    color: #fff;
    background:
        radial-gradient(
            circle at 75% 15%,
            rgba(80, 125, 216, .75),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #101d31,
            #1d3355 55%,
            #233f68
        );
}

.visual-content {
    max-width: 650px;
}

.visual-label {
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .7;
}

.visual-content h2 {
    margin: 0;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.02;
    letter-spacing: -.05em;
}

.visual-content > p {
    max-width: 520px;
    margin: 28px 0 42px;
    font-size: 17px;
    line-height: 1.7;
    opacity: .72;
}

.visual-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.visual-stat {
    padding: 20px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(10px);
}

.visual-stat strong,
.visual-stat span {
    display: block;
}

.visual-stat span {
    margin-top: 6px;
    font-size: 12px;
    opacity: .65;
}

.workspace-page,
.agent-placeholder,
.app-loading {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    background: var(--mev-bg);
}

.workspace-card,
.agent-placeholder-card {
    width: min(780px, 100%);
    padding: 46px;
    border: 1px solid var(--mev-border);
    border-radius: 22px;
    background: #fff;
    box-shadow:
        0 24px 70px
        rgba(24, 42, 70, .08);
}

.workspace-brand {
    margin-bottom: 28px;
    color: var(--mev-accent);
    font-weight: 800;
    letter-spacing: .08em;
}

.workspace-card h1,
.agent-placeholder-card h1 {
    margin: 0;
    font-size: 30px;
}

.workspace-card > p,
.agent-placeholder-card > p {
    margin: 10px 0 30px;
    color: var(--mev-muted);
}

.workspace-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.workspace-option {
    display: grid;
    gap: 10px;
    padding: 24px;
    text-align: left;
    border: 1px solid var(--mev-border);
    border-radius: 15px;
    background: #fff;
}

.workspace-option:hover {
    border-color: #b7c6e0;
    box-shadow:
        0 10px 30px
        rgba(24, 42, 70, .07);
}

.workspace-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #edf3ff;
    color: var(--mev-accent);
    font-weight: 800;
}

.workspace-option small {
    color: var(--mev-muted);
    line-height: 1.5;
}

.text-button {
    margin-top: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mev-muted);
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 245px 1fr;
    background: var(--mev-bg);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    background: var(--mev-primary);
    color: #fff;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    margin-bottom: 40px;
}

.admin-logo span {
    background: rgba(255,255,255,.12);
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 9px;
    color: rgba(255,255,255,.67);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 10px;
    opacity: .5;
}

.admin-main {
    min-width: 0;
}

.admin-header {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 34px;
    border-bottom: 1px solid var(--mev-border);
    background: #fff;
}

.admin-header h1 {
    margin: 3px 0 0;
    font-size: 24px;
}

.page-eyebrow {
    color: var(--mev-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.admin-user > div:nth-child(2) {
    display: grid;
}

.admin-user strong {
    font-size: 13px;
}

.admin-user span {
    color: var(--mev-muted);
    font-size: 11px;
}

.admin-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #edf3ff;
    color: var(--mev-accent);
    font-weight: 800;
}

.logout-button {
    margin-left: 8px;
    padding: 8px 12px;
    border: 1px solid var(--mev-border);
    border-radius: 8px;
    background: #fff;
    color: var(--mev-muted);
    font-size: 12px;
}

.admin-content {
    padding: 34px;
}

.welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 30px;
    border: 1px solid var(--mev-border);
    border-radius: var(--mev-radius);
    background: #fff;
}

.welcome-card h2 {
    margin: 7px 0 8px;
    font-size: 25px;
}

.welcome-card p {
    max-width: 650px;
    margin: 0;
    color: var(--mev-muted);
}

.status-badge {
    flex: 0 0 auto;
    padding: 9px 13px;
    border-radius: 999px;
    background: #e9f8f1;
    color: var(--mev-success);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.dashboard-card,
.module-card {
    padding: 22px;
    border: 1px solid var(--mev-border);
    border-radius: 14px;
    background: #fff;
}

.dashboard-card span,
.dashboard-card strong,
.dashboard-card small {
    display: block;
}

.dashboard-card span {
    color: var(--mev-muted);
    font-size: 12px;
}

.dashboard-card strong {
    margin: 12px 0 5px;
    font-size: 22px;
}

.dashboard-card small {
    color: #9aa3b2;
}

.module-section {
    margin-top: 32px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-heading h3 {
    margin: 0;
    font-size: 18px;
}

.section-heading span {
    color: var(--mev-success);
    font-size: 12px;
}

.module-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.module-card strong {
    font-size: 14px;
}

.module-card p {
    margin: 8px 0 0;
    color: var(--mev-muted);
    font-size: 12px;
    line-height: 1.6;
}

#blazor-error-ui {
    display: none;
}

@media (max-width: 1000px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        max-width: 540px;
        width: 100%;
        margin: auto;
        padding: 48px 34px;
    }

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

@media (max-width: 720px) {
    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        padding: 18px;
    }

    .admin-nav {
        display: flex;
        overflow-x: auto;
    }

    .sidebar-bottom {
        display: none;
    }

    .admin-header {
        align-items: flex-start;
        padding: 20px;
    }

    .admin-content {
        padding: 20px;
    }

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

    .welcome-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-user > div:nth-child(2) {
        display: none;
    }
}

/* MEV CX - User Management */
.users-toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 28px;margin-bottom:18px;border:1px solid var(--mev-border);border-radius:var(--mev-radius);background:#fff}.users-toolbar h2{margin:6px 0 7px;font-size:24px}.users-toolbar p{margin:0;color:var(--mev-muted)}.users-count{min-width:105px;padding:15px 18px;text-align:center;border-radius:13px;background:#f4f7fc}.users-count strong,.users-count span{display:block}.users-count strong{font-size:24px}.users-count span{margin-top:2px;color:var(--mev-muted);font-size:11px}.users-table-card{overflow:hidden;border:1px solid var(--mev-border);border-radius:var(--mev-radius);background:#fff}.users-table-wrap{overflow-x:auto}.users-table{width:100%;border-collapse:collapse}.users-table th{padding:14px 18px;text-align:left;border-bottom:1px solid var(--mev-border);background:#fafbfd;color:var(--mev-muted);font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.users-table td{padding:16px 18px;border-bottom:1px solid #eef1f5;vertical-align:middle;font-size:13px}.users-table tbody tr:last-child td{border-bottom:0}.users-table tbody tr:hover{background:#fbfcfe}.user-cell{display:flex;align-items:center;gap:11px;min-width:190px}.user-cell>div:last-child{display:grid;gap:2px}.user-cell span{color:var(--mev-muted);font-size:11px}.user-list-avatar{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:11px;background:#edf3ff;color:var(--mev-accent);font-weight:800}.table-chip{display:inline-block;margin:2px 4px 2px 0;padding:5px 8px;border-radius:7px;background:#edf3ff;color:#315fae;font-size:11px;font-weight:700}.workspace-chip{background:#f2efff;color:#6552a9;text-transform:capitalize}.status-pill{display:inline-block;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.status-pill.active{background:#e9f8f1;color:var(--mev-success)}.status-pill.passive{background:#f1f2f4;color:#7d8490}.empty-value,.date-cell{color:var(--mev-muted);font-size:12px}@media(max-width:720px){.users-toolbar{align-items:flex-start;flex-direction:column}}

/* MEV CX - User Management Step 2 */

.users-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.primary-action-button,
.secondary-action-button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
}

.primary-action-button {
    border: 1px solid var(--mev-primary);
    background: var(--mev-primary);
    color: #fff;
}

.primary-action-button:hover {
    background: var(--mev-primary-soft);
}

.secondary-action-button {
    border: 1px solid var(--mev-border);
    background: #fff;
    color: var(--mev-muted);
}

.primary-action-button:disabled,
.secondary-action-button:disabled {
    opacity: .6;
    cursor: default;
}

.create-user-card {
    margin-bottom: 18px;
    padding: 26px 28px;
    border: 1px solid var(--mev-border);
    border-radius: var(--mev-radius);
    background: #fff;
}

.create-user-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.create-user-heading h3 {
    margin: 5px 0 0;
    font-size: 20px;
}

.dev-password-note {
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff8e8;
    color: #927021;
    font-size: 11px;
    font-weight: 700;
}

.create-user-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.role-selector {
    display: grid;
    gap: 8px;
    min-height: 50px;
    padding: 10px;
    border: 1px solid var(--mev-border);
    border-radius: 11px;
    background: #fafbfd;
}

.check-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.check-option input {
    margin-top: 4px;
}

.check-option > span {
    display: grid;
    gap: 2px;
}

.check-option strong {
    font-size: 12px;
}

.check-option small {
    color: var(--mev-muted);
    font-size: 11px;
    line-height: 1.45;
}

.agent-option-card {
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr)
        minmax(220px, 1fr);
    gap: 18px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    background: #f7f9fc;
}

.agent-check {
    align-self: center;
}

.agent-account-field {
    align-self: center;
}

.form-success {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #e9f8f1;
    color: var(--mev-success);
    font-size: 13px;
}

.create-user-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 850px) {
    .create-user-grid,
    .agent-option-card {
        grid-template-columns: 1fr;
    }

    .users-toolbar-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .users-count {
        width: 100%;
    }
}

/* MEV CX - User Management Step 2 */

.users-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.primary-action-button,
.secondary-action-button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
}

.primary-action-button {
    border: 1px solid var(--mev-primary);
    background: var(--mev-primary);
    color: #fff;
}

.primary-action-button:hover {
    background: var(--mev-primary-soft);
}

.secondary-action-button {
    border: 1px solid var(--mev-border);
    background: #fff;
    color: var(--mev-muted);
}

.primary-action-button:disabled,
.secondary-action-button:disabled {
    opacity: .6;
    cursor: default;
}

.create-user-card {
    margin-bottom: 18px;
    padding: 26px 28px;
    border: 1px solid var(--mev-border);
    border-radius: var(--mev-radius);
    background: #fff;
}

.create-user-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.create-user-heading h3 {
    margin: 5px 0 0;
    font-size: 20px;
}

.dev-password-note {
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff8e8;
    color: #927021;
    font-size: 11px;
    font-weight: 700;
}

.create-user-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.role-selector {
    display: grid;
    gap: 8px;
    min-height: 50px;
    padding: 10px;
    border: 1px solid var(--mev-border);
    border-radius: 11px;
    background: #fafbfd;
}

.check-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.check-option input {
    margin-top: 4px;
}

.check-option > span {
    display: grid;
    gap: 2px;
}

.check-option strong {
    font-size: 12px;
}

.check-option small {
    color: var(--mev-muted);
    font-size: 11px;
    line-height: 1.45;
}

.agent-option-card {
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr)
        minmax(220px, 1fr);
    gap: 18px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    background: #f7f9fc;
}

.agent-check {
    align-self: center;
}

.agent-account-field {
    align-self: center;
}

.form-success {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #e9f8f1;
    color: var(--mev-success);
    font-size: 13px;
}

.create-user-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 850px) {
    .create-user-grid,
    .agent-option-card {
        grid-template-columns: 1fr;
    }

    .users-toolbar-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .users-count {
        width: 100%;
    }
}
/* MEVCX_AGENT_LAYOUT_FINAL_V1_START */

/*
   MEV CX Agent UI final compact layout.
   GLOBAL app.css override by design.

   Visual only:
   - no WebRTC changes
   - no Agent state changes
   - no routing/API/persistence changes
*/

/* =========================================================
   1) TOP HEADER
   ========================================================= */

body .agent-shell .agent-topbar {
    height: 66px !important;
    min-height: 66px !important;
    padding: 6px 28px !important;
}

body .agent-shell .agent-topbar .brand-lockup,
body .agent-shell .agent-topbar .agent-user {
    min-height: 0 !important;
}

body .agent-shell .agent-topbar .brand-mark-wrap {
    transform: scale(0.82) !important;
    transform-origin: left center !important;
}

body .agent-shell .agent-topbar .brand-subtitle {
    margin-top: 0 !important;
}

body .agent-shell .agent-topbar .agent-user {
    gap: 11px !important;
}

body .agent-shell .agent-topbar .top-registration {
    min-height: 36px !important;
    padding: 5px 11px !important;
}

body .agent-shell .agent-topbar .logout-button {
    min-height: 38px !important;
    padding: 7px 16px !important;
}

/* =========================================================
   2) PAGE SPACING
   ========================================================= */

body .agent-shell .agent-content {
    margin-top: 10px !important;
    margin-bottom: 12px !important;
    column-gap: 16px !important;
    row-gap: 10px !important;
}

/* =========================================================
   3) LEFT WORKSPACE
   Desktop:
   [ Çağrı çalışma alanı ] [ Numara | Ara | Agent Ara ]
   Any active call/result/disposition below spans full width.
   ========================================================= */

body .agent-shell .phone-card {
    display: grid !important;
    grid-template-columns:
        minmax(220px, 0.28fr)
        minmax(0, 1fr) !important;
    column-gap: 18px !important;
    row-gap: 12px !important;
    align-items: end !important;
    padding: 14px 24px 16px !important;
}

/*
   Default all direct children to full width.
   Only header + dial area occupy the first row.
*/
body .agent-shell .phone-card > * {
    grid-column: 1 / -1;
}

body .agent-shell .phone-card > .phone-header {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .agent-shell .phone-card > .dial-area {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    min-width: 0 !important;
}

/* Keep only the meaningful title in the left header. */
body .agent-shell .phone-header .eyebrow,
body .agent-shell .phone-header .phone-intro,
body .agent-shell .phone-header .registration-card {
    display: none !important;
}

body .agent-shell .phone-header h1 {
    margin: 0 !important;
    font-size: 25px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
}

/* "Numara ile ara" is redundant once controls are on the title row. */
body .agent-shell .dial-area > label {
    display: none !important;
}

body .agent-shell .dial-row {
    display: grid !important;
    grid-template-columns:
        minmax(260px, 1fr)
        auto
        auto !important;
    align-items: center !important;
    gap: 10px !important;
}

body .agent-shell .dial-input-wrap {
    min-width: 0 !important;
}

body .agent-shell .dial-input-wrap input {
    width: 100% !important;
}

/* Existing idle/post-call cleanup decisions. */
body .agent-shell .idle-card,
body .agent-shell .mevcx-idle-hidden,
body .agent-shell .mevcx-ui-idle-hide {
    display: none !important;
}

body .agent-shell .mevcx-last-result-hidden,
body .agent-shell .mevcx-ui-postcall-hide,
body .agent-shell .mevcx-final-postcall-hide {
    display: none !important;
}

/*
   Critical: active call must always become a normal full-width second row.
*/
body .agent-shell .phone-card > .call-card {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    width: 100% !important;
}

/* Alerts/errors/status blocks also remain full width. */
body .agent-shell .phone-card > .phone-alert,
body .agent-shell .phone-card > .alert,
body .agent-shell .phone-card > .error-card {
    grid-column: 1 / -1 !important;
}

/* =========================================================
   4) RIGHT SESSION CARD
   Row 1: identity | Telefon + Agent status
   Row 2: Mola nedeni | dropdown
   Row 3: Hazır / Mola
   ========================================================= */

body .agent-shell .status-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
        "identity states"
        "pause pause"
        "actions actions" !important;
    column-gap: 12px !important;
    row-gap: 8px !important;
    align-content: start !important;
    padding: 12px 18px 14px !important;
}

body .agent-shell .status-card .profile-head {
    grid-area: identity !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    gap: 10px !important;
}

body .agent-shell .status-card .profile-head .eyebrow {
    display: none !important;
}

body .agent-shell .status-card .profile-avatar {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
}

body .agent-shell .status-card .profile-name {
    line-height: 1.05 !important;
}

body .agent-shell .status-card .profile-email {
    margin-top: 2px !important;
    white-space: nowrap !important;
}

/* Telefon + Agent state on one compact top-right line. */
body .agent-shell .status-card .profile-status-list {
    grid-area: states !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Remove "Çalışma alanı / Agent". */
body .agent-shell .status-card
.profile-status-list .profile-status-row:nth-child(3) {
    display: none !important;
}

body .agent-shell .status-card .profile-status-row {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 4px 7px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: #f7f9fc !important;
    white-space: nowrap !important;
}

body .agent-shell .status-card
.profile-status-row > span:first-child {
    font-size: 10px !important;
    opacity: 0.62 !important;
}

body .agent-shell .status-card
.profile-status-value,
body .agent-shell .status-card
.operational-state-pill {
    font-size: 12px !important;
    white-space: nowrap !important;
}

/*
   Mola nedeni and select on one line.
*/
body .agent-shell .status-card .pause-reason-picker {
    grid-area: pause !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 2px 0 0 !important;
}

body .agent-shell .status-card
.pause-reason-picker > label {
    margin: 0 !important;
    white-space: nowrap !important;
}

body .agent-shell .status-card
.pause-reason-picker > select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
}

/* Ready / Pause remain below. */
body .agent-shell .status-card .operational-state-actions {
    grid-area: actions !important;
    margin: 0 !important;
    gap: 8px !important;
}

body .agent-shell .status-card
.state-ready-button,
body .agent-shell .status-card
.state-pause-button {
    min-height: 36px !important;
}

body .agent-shell .status-card
.profile-footnote,
body .agent-shell .status-card
.technical-note {
    display: none !important;
}

/* =========================================================
   5) HISTORY
   Son Çağrılar | Yenile
   ========================================================= */

body .agent-shell .history-card {
    margin-top: 0 !important;
    padding: 12px 24px 18px !important;
}

body .agent-shell .history-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 7px !important;
}

body .agent-shell .history-header .eyebrow,
body .agent-shell .history-header p {
    display: none !important;
}

body .agent-shell .history-header h2 {
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 1.05 !important;
}

body .agent-shell .history-refresh {
    min-height: 38px !important;
    padding: 7px 15px !important;
}

body .agent-shell .history-table-wrap {
    margin-top: 0 !important;
}

/* =========================================================
   6) DISPOSITION
   Existing Razor compact title preserved.
   ========================================================= */

body .agent-shell .mevcx-disposition-hidden,
body .agent-shell .mevcx-final-visual-hide,
body .agent-shell .mevcx-final-disposition-old-row {
    display: none !important;
}

body .agent-shell .mevcx-disposition-title,
body .agent-shell .mevcx-final-disposition-title {
    margin: 0 0 9px 0 !important;
    line-height: 1.08 !important;
}

body .agent-shell .mevcx-disposition-activity-inline,
body .agent-shell .mevcx-ui-disposition-activity,
body .agent-shell .mevcx-final-disposition-activity {
    font-size: 0.52em !important;
    font-weight: 500 !important;
    opacity: 0.72 !important;
    vertical-align: middle !important;
}

/* =========================================================
   7) RESPONSIVE SAFETY
   ========================================================= */

/*
   At narrower widths, preserve function over compactness:
   call heading returns above dial controls,
   session sections stack safely.
*/
@media (max-width: 1180px) {
    body .agent-shell .phone-card {
        grid-template-columns: 1fr !important;
    }

    body .agent-shell .phone-card > .phone-header,
    body .agent-shell .phone-card > .dial-area {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    body .agent-shell .phone-header h1 {
        white-space: normal !important;
    }

    body .agent-shell .status-card {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "identity"
            "states"
            "pause"
            "actions" !important;
    }

    body .agent-shell .status-card .profile-status-list {
        justify-content: flex-start !important;
    }
}

@media (max-width: 920px) {
    body .agent-shell .agent-topbar {
        height: auto !important;
        min-height: 62px !important;
        padding: 6px 16px !important;
    }

    body .agent-shell .agent-content {
        margin-top: 8px !important;
        row-gap: 9px !important;
    }

    body .agent-shell .phone-card,
    body .agent-shell .history-card {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    body .agent-shell .dial-row {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }

    body .agent-shell .dial-row > :last-child {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 640px) {
    body .agent-shell .agent-topbar {
        padding: 6px 12px !important;
    }

    body .agent-shell .phone-header h1 {
        font-size: 22px !important;
    }

    body .agent-shell .dial-row {
        grid-template-columns: 1fr !important;
    }

    body .agent-shell .dial-row > * {
        width: 100% !important;
    }

    body .agent-shell .status-card
    .pause-reason-picker {
        grid-template-columns: 1fr !important;
        gap: 5px !important;
    }

    body .agent-shell .history-header h2 {
        font-size: 22px !important;
    }
}

/* MEVCX_AGENT_LAYOUT_FINAL_V1_END */

/* MEVCX_AGENT_FINAL_COMBINED_V4_START */

/* Dış Arama first row */
body .agent-shell .phone-card {
    grid-template-columns:
        minmax(135px, 0.18fr)
        minmax(0, 1fr) !important;
}

body .agent-shell .phone-header h1 {
    font-size: 24px !important;
    white-space: nowrap !important;
}

/* Right Agent card - overlap safe */
body .agent-shell .status-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
        "identity"
        "states"
        "pause"
        "actions" !important;
    row-gap: 7px !important;
    padding: 12px 16px 14px !important;
    align-content: start !important;
}

body .agent-shell .status-card .profile-head {
    grid-area: identity !important;
    margin: 0 !important;
    padding: 0 0 8px 0 !important;
    border-bottom: 1px solid #edf1f6 !important;
    gap: 9px !important;
    min-width: 0 !important;
}

body .agent-shell .status-card .profile-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
}

body .agent-shell .status-card .profile-head > div:last-child {
    min-width: 0 !important;
}

body .agent-shell .status-card .profile-name,
body .agent-shell .status-card .profile-email {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body .agent-shell .status-card .profile-status-list {
    grid-area: states !important;
    display: grid !important;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr) !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body .agent-shell .status-card
.profile-status-list .profile-status-row:nth-child(3) {
    display: none !important;
}

body .agent-shell .status-card .profile-status-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 5px !important;
    min-width: 0 !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 5px 7px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #f7f9fc !important;
    overflow: hidden !important;
}

body .agent-shell .status-card
.profile-status-row > span:first-child {
    min-width: 0 !important;
    font-size: 10px !important;
    opacity: 0.65 !important;
    white-space: nowrap !important;
}

body .agent-shell .status-card
.profile-status-value,
body .agent-shell .status-card
.operational-state-pill {
    min-width: 0 !important;
    font-size: 11px !important;
    white-space: nowrap !important;
}

body .agent-shell .status-card .pause-reason-picker {
    grid-area: pause !important;
    display: grid !important;
    grid-template-columns:
        auto
        minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 9px !important;
    margin: 1px 0 0 0 !important;
}

body .agent-shell .status-card
.pause-reason-picker > label {
    margin: 0 !important;
    white-space: nowrap !important;
    font-size: 12px !important;
}

body .agent-shell .status-card
.pause-reason-picker > select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
}

body .agent-shell .status-card
.operational-state-actions {
    grid-area: actions !important;
    margin: 0 !important;
    gap: 8px !important;
}

/* Active call number | Activity | Queue */
body .agent-shell .call-card-main:not(
    .mevcx-outbound-result-notice
) {
    min-width: 0 !important;
}

body .agent-shell .call-card-main:not(
    .mevcx-outbound-result-notice
) > div:first-child {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

body .agent-shell .call-card-main:not(
    .mevcx-outbound-result-notice
) .remote-party {
    display: block !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: clamp(
        14px,
        1.25vw,
        22px
    ) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.018em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body .agent-shell .call-card-main:not(
    .mevcx-outbound-result-notice
) .audio-activity-panel {
    flex: 0 0 auto !important;
}

/* Sonuç Kodu */
body .agent-shell .mevcx-disposition-title {
    margin: 0 0 8px 0 !important;
    font-size: 22px !important;
    line-height: 1.12 !important;
    font-weight: 750 !important;
    letter-spacing: -0.02em !important;
}

body .agent-shell .mevcx-disposition-activity-inline {
    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    opacity: 0.68 !important;
    vertical-align: middle !important;
}

body .agent-shell #agent-disposition-select {
    min-height: 42px !important;
}

body .agent-shell section:has(
    #agent-disposition-select
) {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

/* Transient outbound mapped technical result */
body .agent-shell .call-card:has(
    .mevcx-outbound-result-notice
) {
    margin-top: 8px !important;
    min-height: 0 !important;
    padding: 10px 14px !important;
    background: #fff8ed !important;
    border-color: #fed7aa !important;
}

body .agent-shell .mevcx-outbound-result-notice {
    min-height: 0 !important;
    padding: 0 !important;
}

body .agent-shell
.mevcx-outbound-result-notice .call-state {
    font-size: 10px !important;
    margin-bottom: 2px !important;
}

body .agent-shell
.mevcx-outbound-result-notice .remote-party {
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

@media (max-width: 1180px) {
    body .agent-shell .phone-card {
        grid-template-columns: 1fr !important;
    }

    body .agent-shell .phone-header h1 {
        white-space: normal !important;
    }
}

@media (max-width: 640px) {
    body .agent-shell .status-card
    .profile-status-list {
        grid-template-columns: 1fr !important;
    }

    body .agent-shell .status-card
    .pause-reason-picker {
        grid-template-columns: 1fr !important;
        gap: 5px !important;
    }

    body .agent-shell .call-card-main:not(
        .mevcx-outbound-result-notice
    ) .remote-party {
        font-size: 14px !important;
    }
}

/* MEVCX_AGENT_FINAL_COMBINED_V4_END */

/* MEVCX_AGENT_UI_PAUSE_REASON_FINAL_V1_START */

/* Small section titles */
body .agent-shell .phone-header h1 {
    font-size: 20px !important;
    line-height: 1.08 !important;
}

body .agent-shell .history-header h2 {
    font-size: 20px !important;
    line-height: 1.08 !important;
}

/* Right card: Telefon and Agent status vertically separated */
body .agent-shell .status-card
.profile-status-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
}

body .agent-shell .status-card
.profile-status-row {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 5px 8px !important;
    overflow: visible !important;
}

body .agent-shell .status-card
.profile-status-list .profile-status-row:nth-child(3) {
    display: none !important;
}

body .agent-shell .status-card
.profile-status-value,
body .agent-shell .status-card
.operational-state-pill {
    max-width: 68% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Keep Mola nedeni + dropdown on one line */
body .agent-shell .status-card
.pause-reason-picker {
    display: grid !important;
    grid-template-columns:
        auto
        minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 9px !important;
}

/*
   Audio meters:
   do NOT replace call-card-main layout.
   Only make the two rows horizontal inside the existing panel.
*/
body .agent-shell .audio-activity-panel {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
}

body .agent-shell .audio-activity-row {
    flex: 1 1 0 !important;
    min-width: 140px !important;
    margin: 0 !important;
}

/* Slightly reduce call -> disposition whitespace */
body .agent-shell
section:has(#agent-disposition-select) {
    margin-top: -10px !important;
}

/* Dropdown left + actions right, same line */
body .agent-shell
.mevcx-disposition-control-grid {
    display: grid !important;
    grid-template-columns:
        minmax(0, 1fr)
        auto !important;
    align-items: end !important;
    column-gap: 12px !important;
    row-gap: 8px !important;
}

body .agent-shell
.mevcx-disposition-control-grid > * {
    grid-column: 1 / -1;
}

body .agent-shell
.mevcx-disposition-control-grid
> .mevcx-disposition-select-cell {
    grid-column: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
}

body .agent-shell
.mevcx-disposition-control-grid
> .mevcx-disposition-actions-cell {
    grid-column: 2 !important;
    align-self: end !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

body .agent-shell
.mevcx-disposition-select-cell
#agent-disposition-select {
    width: 100% !important;
    margin: 0 !important;
}

body .agent-shell
.mevcx-disposition-actions-cell button {
    min-height: 42px !important;
    margin: 0 !important;
}

/* Keep compact result-code title */
body .agent-shell .mevcx-disposition-title {
    font-size: 22px !important;
    line-height: 1.1 !important;
}

body .agent-shell
.mevcx-disposition-activity-inline {
    font-size: 14px !important;
}

@media (max-width: 900px) {
    body .agent-shell .audio-activity-panel {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    body .agent-shell
    section:has(#agent-disposition-select) {
        margin-top: -4px !important;
    }

    body .agent-shell
    .mevcx-disposition-control-grid {
        grid-template-columns: 1fr !important;
    }

    body .agent-shell
    .mevcx-disposition-control-grid
    > .mevcx-disposition-select-cell,
    body .agent-shell
    .mevcx-disposition-control-grid
    > .mevcx-disposition-actions-cell {
        grid-column: 1 !important;
    }

    body .agent-shell
    .mevcx-disposition-actions-cell {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}

/* MEVCX_AGENT_UI_PAUSE_REASON_FINAL_V1_END */

/* MEVCX_AGENT_CALL_LAYOUT_PAUSE_CONFIRM_V1_START */

/*
   Active call:
   number first line, Activity/Queue second line.
   Audio meters return to vertical layout.
*/

body .agent-shell .mevcx-call-party {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
}

body .agent-shell .mevcx-call-number {
    display: block !important;
    max-width: 100% !important;
    font-size: 20px !important;
    line-height: 1.08 !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body .agent-shell .mevcx-call-metadata {
    display: block !important;
    max-width: 100% !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    font-weight: 650 !important;
    opacity: 0.68 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Mikrofon above, Hoparlör below. */
body .agent-shell .audio-activity-panel {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 7px !important;
    width: clamp(
        270px,
        24vw,
        330px
    ) !important;
    max-width: 100% !important;
    margin: 0 !important;
}

body .agent-shell .audio-activity-row {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

/* Make pending pause reason visibly selectable,
   but application still requires Mola button. */
body .agent-shell .status-card
.pause-reason-picker select {
    cursor: pointer !important;
}

@media (max-width: 900px) {
    body .agent-shell .mevcx-call-number {
        font-size: 18px !important;
    }

    body .agent-shell .mevcx-call-metadata {
        font-size: 11px !important;
    }

    body .agent-shell .audio-activity-panel {
        width: 100% !important;
    }
}

/* MEVCX_AGENT_CALL_LAYOUT_PAUSE_CONFIRM_V1_END */

/* MEVCX_AGENT_LOGGED_IN_V2_START */

body .agent-shell .state-logged-in {
    background: rgba(59, 130, 246, 0.10) !important;
    border-color: rgba(59, 130, 246, 0.22) !important;
    color: #315a9c !important;
}

body .agent-shell .directory-state-logged-in {
    color: #5d6f8e !important;
}

body .agent-shell
.directory-state-logged-in
.agent-directory-dot {
    background: #7890b4 !important;
}

/* MEVCX_AGENT_LOGGED_IN_V2_END */

