.ms-account {
    position: relative;
    display: inline-block;
    color: #242424;
    font-family: "Segoe UI", Arial, sans-serif;
}

.ms-account .ms-account-toggle {
    background: transparent;
    border: 0;
    padding: 3px;
    margin: 0;
    cursor: pointer;
}

.ms-account .ms-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.ms-account .ms-avatar-fallback {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0078d4;
    color: #fff;
    font-weight: 600;
    align-items: center;
    justify-content: center;
}

/* MENU */

.ms-account .ms-account-menu {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    width: 420px;
    background: #fff;
    color: #242424;
    border: 1px solid #e1dfdd;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    z-index: 10000;
}

.ms-account:hover .ms-account-menu {
    display: block;
}

/* HLAVIČKA */

.ms-account .ms-account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 20px;
    background: #fafafa;
    border-bottom: 1px solid #e1dfdd;
}

.ms-account .ms-company {
    color: #242424;
    font-size: 14px;
    font-weight: 600;
}

.ms-account .ms-logout {
    color: #242424;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
}

.ms-account .ms-logout:hover {
    text-decoration: underline;
}

/* UŽIVATEL */

.ms-account .ms-account-user {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 20px;
    background: #fff;
}

.ms-account .ms-account-photo {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
}

.ms-account .ms-account-photo img {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.ms-account .ms-avatar-fallback.large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 22px;
}

/* INFORMACE */
.ms-account .ms-account-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ms-account .ms-name {
    color: #242424;
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
}

.ms-account .ms-email {
    margin-top: 2px;
    color: #605e5c;
    font-size: 13px;
    line-height: 18px;
}

.ms-account .ms-account-link {
    margin-top: 5px;
    color: #0067b8;
    font-size: 13px;
    text-decoration: none;
}

.ms-account .ms-account-link:hover {
    text-decoration: underline;
}

/* SPODNÍ AKCE */
.ms-account .ms-account-actions {
    padding: 6px 0;
    background: #fff;
    border-top: 1px solid #e1dfdd;
}

.ms-account .ms-action {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 14px;
    padding: 7px 20px;
    box-sizing: border-box;
    background: transparent;
    color: #242424;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
}

.ms-account .ms-action:hover {
    background: #f3f2f1;
    color: #242424;
    text-decoration: none;
}

/* IKONY */
.ms-account .ms-action > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.ms-account .icon.check {
    width: 20px;
    height: 20px;
    position: relative;
    background: #107c10;
    border-radius: 50%;
}

.ms-account .icon.check::after {
    content: "✓";
    position: static;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}

.ms-account .icon.location::before {
    content: "📍";
    font-size: 18px;
}

.ms-account .icon.pencil::before {
    content: "✎";
    color: #424242;
    font-size: 21px;
}

/* PRVNÍ IKONA */
.ms-account .ms-action:first-child > span::before {
    content: "+";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1.5px solid #424242;
    border-radius: 50%;
    color: #424242;
    font-size: 16px;
}

/* =========================================================
   AVATAR V HORNÍ LIŠTĚ
   ========================================================= */
.ms-account .ms-account-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 4px;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.ms-account .ms-account-toggle .ms-avatar {
    display: block !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    max-width: 36px;
    border-radius: 50% !important;
    object-fit: cover !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 2px solid rgba(255, 255, 255, .75);
    background: #fff;
}

.ms-account .ms-account-toggle .ms-avatar-fallback {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    padding: 0 !important;
    margin: 0 !important;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50% !important;
}

/* =========================================================
   RESET STYLU NAVIGACE UVNITR MS MENU
   ========================================================= */

.ms-account .ms-account-menu a {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    text-transform: none !important;
}

/* zrušení koleček / šipek / dekorací z hlavní navigace */
.ms-account .ms-account-menu a::before,
.ms-account .ms-account-menu a::after {
    display: none !important;
    content: none !important;
}

/* ODHLÁSIT SE */
.ms-account .ms-account-menu .ms-logout {
    display: inline !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #242424 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: normal !important;
    text-decoration: none !important;
}

.ms-account .ms-account-menu .ms-logout:hover {
    color: #242424 !important;
    text-decoration: underline !important;
}

/* ZOBRAZIT ÚČET */
.ms-account .ms-account-menu .ms-account-link {
    display: inline !important;
    width: fit-content !important;
    padding: 0 !important;
    margin-top: 5px !important;
    color: #0067b8 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 18px !important;
    text-decoration: none !important;
}

.ms-account .ms-account-menu .ms-account-link:hover {
    color: #004578 !important;
    text-decoration: underline !important;
}

/* SPODNÍ POLOŽKY */
.ms-account .ms-account-menu .ms-action {
    display: flex !important;
    width: 100% !important;
    min-height: 44px !important;
    align-items: center !important;
    padding: 7px 20px !important;
    margin: 0 !important;
    color: #242424 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    text-decoration: none !important;
}

/* nepřihlášený stav */
.ms-account-item .ms-login-link,
.ms-account-item .ms-login-link:hover,
.ms-account-item .ms-login-link:focus,
.ms-account-item .ms-login-link:active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    color: inherit !important;
    text-decoration: none !important;
    text-transform: none !important;
}

.ms-account-item .ms-login-link .ms-avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #e5e7eb;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}

.ms-account .ms-account-menu .ms-action:hover {
    background: #f3f2f1 !important;
}

