.edm-map-wrap {
    position: relative;
    margin: 24px 0;
}

.edm-map {
    width: 100%;
    min-height: 420px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #d9d9d9;
    background: #f3f6f8;
}

.edm-map:fullscreen,
.edm-map.edm-map-is-fullscreen,
.edm-map.edm-map-pseudo-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    border-radius: 0;
    border: 0;
    z-index: 999999;
    background: #f3f6f8;
}

.edm-map.edm-map-pseudo-fullscreen {
    position: fixed !important;
    inset: 0 !important;
}

html.edm-map-fullscreen-lock,
body.edm-map-fullscreen-lock {
    overflow: hidden !important;
}

.edm-fullscreen-control a.edm-fullscreen-button {
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-size: 21px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
    background: #fff;
}

.edm-fullscreen-control a.edm-fullscreen-button:hover,
.edm-fullscreen-control a.edm-fullscreen-button:focus {
    background: #f4f4f4;
    color: #000;
}

.edm-fullscreen-control a.edm-fullscreen-button.edm-fullscreen-active span::before {
    content: '×';
    font-size: 25px;
    line-height: 34px;
}

.edm-fullscreen-control a.edm-fullscreen-button.edm-fullscreen-active span {
    font-size: 0;
}

.edm-map-legend {
    margin-top: 14px;
    text-align: center;
}

.edm-map-legend-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.edm-map-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1.4;
}

.edm-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: -1px;
}

.edm-dot-load { background: #16803c; }
.edm-dot-unload { background: #d86b14; }
.edm-dot-live { background: #135e96; }

.edm-pin-wrap {
    background: transparent;
    border: 0;
}

.edm-pin-holder {
    position: relative;
    width: 86px;
    height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    pointer-events: auto;
}

.edm-pin-reference {
    display: inline-block;
    min-width: 62px;
    max-width: 82px;
    padding: 2px 6px;
    margin-bottom: 4px;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2937;
    border: 2px solid currentColor;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.24);
    font-size: 12px;
    font-weight: 900;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edm-pin-holder-load .edm-pin-reference {
    color: #16803c;
}

.edm-pin-holder-unload .edm-pin-reference {
    color: #d86b14;
}

.edm-pin {
    position: relative;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.edm-pin-load {
    background: #16803c;
    box-shadow: 0 0 0 3px rgba(22, 128, 60, 0.28), 0 3px 10px rgba(0, 0, 0, 0.28);
}

.edm-pin-unload {
    background: #d86b14;
    box-shadow: 0 0 0 3px rgba(216, 107, 20, 0.30), 0 3px 10px rgba(0, 0, 0, 0.28);
}

.edm-pin svg {
    width: 23px;
    height: 23px;
    display: block;
    color: #ffffff;
}

.edm-pin svg * {
    stroke: currentColor;
}

.edm-pin::after {
    content: attr(data-letter);
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #ffffff;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.edm-pin-load::after {
    color: #16803c;
}

.edm-pin-unload::after {
    color: #d86b14;
}


.edm-live-pin-wrap {
    background: transparent;
    border: 0;
}

.edm-live-pin-holder {
    position: relative;
    width: 96px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    pointer-events: auto;
}

.edm-live-pin-reference {
    display: inline-block;
    min-width: 66px;
    max-width: 90px;
    padding: 2px 7px;
    margin-bottom: 4px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--edm-live-color, #135e96);
    border: 2px solid currentColor;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.24);
    font-size: 12px;
    font-weight: 900;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edm-live-pin {
    position: relative;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 3px solid #ffffff;
    background: var(--edm-live-color, #135e96);
    box-shadow: 0 0 0 4px rgba(19, 94, 150, 0.20), 0 4px 12px rgba(0, 0, 0, 0.34);
}

.edm-live-pin::after {
    content: 'LIVE';
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(-50%);
    padding: 1px 5px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    background: #b42318;
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
    line-height: 12px;
    letter-spacing: 0.3px;
}

.edm-live-pin svg {
    width: 27px;
    height: 27px;
    display: block;
    color: #ffffff;
}

.edm-live-pin svg * {
    stroke: currentColor;
}

.edm-popup {
    min-width: 220px;
    font-size: 14px;
}

.edm-popup strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.edm-popup dl {
    margin: 0;
}

.edm-popup dt {
    margin-top: 7px;
    font-weight: 700;
}

.edm-popup dd {
    margin: 0;
}

.edm-empty {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff8e5;
    border: 1px solid #f3d17a;
}

.edm-driver-portal {
    max-width: 980px;
    margin: 24px 0;
}

.edm-card {
    padding: 22px;
    margin-bottom: 22px;
    border: 1px solid #d9d9d9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.05);
}

.edm-form h3,
.edm-driver-history h3 {
    margin-top: 0;
}

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

.edm-form input,
.edm-form select,
.edm-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #c8c8c8;
    border-radius: 8px;
    font-size: 15px;
}

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

.edm-help {
    color: #555;
    font-size: 14px;
}

.edm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    background: #135e96;
    color: #fff;
}

.edm-button:hover,
.edm-button:focus {
    background: #0b4775;
    color: #fff;
}

.edm-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.edm-logout {
    white-space: nowrap;
}

.edm-notice {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.edm-notice-success {
    background: #eaf7ed;
    border-color: #9bd3aa;
}

.edm-notice-error {
    background: #fdeaea;
    border-color: #f0a7a7;
}

.edm-table-scroll {
    overflow-x: auto;
}

.edm-driver-history table {
    width: 100%;
    border-collapse: collapse;
}

.edm-driver-history th,
.edm-driver-history td {
    padding: 10px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    vertical-align: top;
}

.edm-driver-history small {
    color: #666;
}

.edm-inline-delete-form {
    margin: 0;
}

.edm-button-small {
    padding: 7px 12px;
    font-size: 13px;
}

.edm-button-danger {
    background: #b42318;
}

.edm-button-danger:hover,
.edm-button-danger:focus {
    background: #8f1d14;
}


.edm-form textarea {
    min-height: 120px;
    resize: vertical;
}

.edm-note-box {
    margin: 16px 0 18px;
    padding: 16px;
    border: 1px solid #cfcfcf;
    border-radius: 12px;
    background: #fafafa;
}

.edm-note-box legend {
    padding: 0 8px;
    font-weight: 700;
    font-size: 16px;
}

.edm-admin-history {
    max-width: 1200px;
}

.edm-admin-history h3 {
    margin-top: 0;
}

.edm-history-table,
.edm-admin-history table {
    width: 100%;
    border-collapse: collapse;
}

.edm-history-table th,
.edm-history-table td,
.edm-admin-history th,
.edm-admin-history td {
    padding: 10px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    vertical-align: top;
}

.edm-history-table small,
.edm-admin-history small {
    color: #666;
}

@media (max-width: 700px) {
    .edm-grid {
        grid-template-columns: 1fr;
    }

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

.pac-container {
    z-index: 999999;
}

.edm-history-login-form {
    max-width: 460px;
}

.edm-google-autocomplete {
    display: block;
    width: 100%;
    max-width: 100%;
}

.edm-google-autocomplete::part(input) {
    width: 100%;
}


.edm-driver-management {
    max-width: 980px;
    margin: 24px 0;
}

.edm-driver-admin-add-form {
    margin-bottom: 24px;
}

.edm-driver-admin-add-form h4,
.edm-driver-admin-panel h4 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 20px;
}

.edm-driver-admin-table td,
.edm-driver-admin-table th {
    vertical-align: middle;
}

.edm-tracking-panel h3,
.edm-tracking-history h3 {
    margin-top: 0;
}

.edm-tracking-status {
    display: inline-flex;
    align-items: center;
    min-height: 41px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-weight: 700;
}

.edm-tracking-status-active {
    background: #eaf7ed;
    border-color: #9bd3aa;
    color: #16803c;
}

.edm-tracking-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
}

.edm-button-secondary {
    background: #475569;
}

.edm-button-secondary:hover,
.edm-button-secondary:focus {
    background: #334155;
}

.edm-button:disabled,
.edm-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.edm-tracking-history {
    max-width: 1200px;
}

.edm-tracking-map {
    margin: 14px 0 18px;
}

.edm-tracking-table-wrap {
    margin-top: 18px;
}
